We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG - GridDropDownMonthCalendarCellModel text flow direction

Thread ID:

Created:

Updated:

Platform:

Replies:

67728 Aug 29,2007 07:40 AM UTC Sep 4,2007 02:22 PM UTC WinForms 1
loading
Tags: GridControl
Miki Watts
Asked On August 29, 2007 07:40 AM UTC

I'm using version 4.4.0.5

I'm using a right to left GDBG, and I have a date cell in it, using the GridDropDownMonthCalendarCellModel for the cell model, and a GridMaskEditCellRenderer for the cell renderer.

I can get the mask to show aligned to the right, but when you start entering text into it, the text start from right to left.

This is what I do in overriding the OnPrepareViewStyleInfo in the renderer:
public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
{
base.OnPrepareViewStyleInfo(e);

e.Style.RightToLeft = RightToLeft.No;
e.Style.HorizontalAlignment = GridHorizontalAlignment.Right;
e.Style.TextAlign = GridTextAlign.Left;
}

The same code has been working just fine for me when I use it with a regular MaskedTextBox that's not in a grid.

I need to make the text in the grid cell start from the left, even though the grid is set to RightToLeft.Yes

Golda Rebecal [Syncfusion]
Replied On September 4, 2007 02:22 PM UTC

Hi Miki,

Sorry for the delay in responding.

GridTextAlign is used to align the text when image and text is present in the cell. GridHorizontalAlignment is used for horizontal alignment of contents in the cell. Hence in order to make the text in the cell start from left, you can set HorizontalAlignment to Left in the PrepareViewStyleInfo event.

Please refer to the attached sample that illustrates the same:
http://websamples.syncfusion.com/samples/Grid.Windows/F67728/main.htm

Kindly let me know if this helps you.

Best regards,
Golda

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;