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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

UseRightToLeftCompatibleTextBox propert change for v5.1

Thread ID:





63923 Jul 11,2007 05:20 PM UTC Jul 11,2007 09:54 PM UTC WinForms 1
Tags: GridControl
Burke Harris
Asked On July 11, 2007 05:20 PM UTC

I have some code in an CurrentCellActivated event handler that I have been using to highlight the text in our custom grid filter row. It has been working fine for years but when we switched to v5.1 we started getting an exception trying to convert our filter comboboxes to GridDropDownEditPartControl. After some digging around I found this new property UseRightToLeftCompatibleTextBox being set to true is causing the issue.

My questions are:

Does it make sense for UseRightToLeftCompatibleTextBox to be defaulted to true?

If so should I stop using GridDropDownEditPartControl (I ma using in two other places)?

If so, what should I use instead of GridDropDownEditPartControl?

Burke Harris
Senior Developer
Quellos Group LLC

Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.GridOriginalTextBoxControl' to type 'Syncfusion.Windows.Forms.Grid.GridDropDownEditPartControl'."


private void QDataBoundGrid_CurrentCellActivated(object sender, System.EventArgs e)
//Skip processing if the grid is binding.
if (this.m_blnDataSourceChanging) { return; }

//Set the cell display if this is a filter cell.
if (this.IsFilterBarCell(CurrentCell.RowIndex, CurrentCell.ColIndex))
//Get a reference to the drop down control.
GridDropDownEditPartControl objDropDownTextBox = (GridDropDownEditPartControl)CurrentCell.Renderer.Control;

//Select all text in the filter cell by default.

catch (Exception ex)



haneefm [Syncfusion]
Replied On July 11, 2007 09:54 PM UTC


By default The TextBox celltype uses in a grid cell. The Filtered TextBox celltype uses a GridDropDownEditPartControl as editing control. But if you set the UseRightToLeftCompatibleTextBox property then grid uses the OriginalTextBox celltype in a grid cell. The OriginalTextBox celltype uses a Wndows.Forms.TextBox as the editing control. This different base control is the reason they behave differently. One way you can resolve this by using the GridOriginalTextBoxControl instead of GridDropDownEditPartControl. Below is a code snippet

GridOriginalTextBoxControl objDropDownTextBox = ( GridOriginalTextBoxControl )CurrentCell.Renderer.Control;

//Select all text in the filter cell by default.


Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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