Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
WinGrid support for RightToLeft Languages
posted

I'm developing an Application that is targeted for the Arabic language.

When using a standard GridView to get the grid to display in a right to left fashion you need to mirror the control.  The code to do this looks like this:

protected override CreateParams CreateParams
        {
            get
            {
                CreateParams CP;
                CP = base.CreateParams;
                if(_mirrored)
                    CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT;
                return CP;
            }
        }

This works perfectly with the GridView, However with the WinGrid the text is painted in reverse as if it was flipped.

 

Is there a way to override this behavior and get it to paint correctly?

Parents
  • 17259
    Offline posted

    As far as I know, there is no way to do this with CreateParams.

    If you have version 9.2, you can use the UltraControlContainerEditor as an EditorComponent of a column, and you can attach an MS TextBox that supports rtl to the UltraControlContainerEditor. I don't know if this will work with CreateParams. If you really want to work hard, you can use CreationFilter to move things in the grid while it is drawing itself.

    I think Infragistics should support rtl and you can help that by creating a feature request.

Reply Children