The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
Thanks, Burke Harris Senior Developer Quellos Group LLC
Exception: Unable to cast object of type 'Syncfusion.Windows.Forms.Grid.GridOriginalTextBoxControl' to type 'Syncfusion.Windows.Forms.Grid.GridDropDownEditPartControl'."
Code:
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)) { try { //Get a reference to the drop down control. GridDropDownEditPartControl objDropDownTextBox = (GridDropDownEditPartControl)CurrentCell.Renderer.Control;
//Select all text in the filter cell by default. objDropDownTextBox.SelectAll();
HAhaneefm Syncfusion Team July 11, 2007 09:54 PM UTC
Hi,
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