BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Setting Filtering for particular column in form loading can achieved by adding modified filtering condition to the particular column as per below code snippet. Changing text in FilterBar can be done by using gridGroupingControl1.TableControlDrawCellDisplayText .
FilterCondition condition = new FilterCondition(FilterCompareOperator.Like, "Sample data1"); // Add the Condition to the particular Column. RecordFilterDescriptor rf = new RecordFilterDescriptor("Sample Test", condition); // Add the RecordFilterDescriptor to the RecordFilters. this.gridGroupingControl1.TableDescriptor.RecordFilters.Add(rf);
// changing FilaterBar Display Text. void gridGroupingControl1_TableControlDrawCellDisplayText(object sender, GridTableControlDrawCellDisplayTextEventArgs e) { GridTableCellStyleInfo style = this.gridGroupingControl1.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex); if (e.Inner.ColIndex == 1) { if ( style.TableCellIdentity.TableCellType == GridTableCellType.FilterBarCell) { e.Inner.DisplayText = "Sample data1"; } } } |
Sample: GridGroupingControl_Demo_CS
Please let me know of you have any concerns.
Thanks,
Mahendran.A
Query how to focus the filter bar on the form load. That mean, when the windows form open, user can type the text on filter bar without using the mouse to click filter bar instead |
Suggestion 1: If you want to set the focus to the filter bar cell on Form_Load, you can move the current cell to the specific row, col index. Please refer the below code snippet, Code snippet: //Activate the Filterbar cell on form load (RowIndex,ColIndex) |
Suggestion 2: If you want to type the text on FilterBar Cell without using mouse click, It can be achieved by using the CurrentCell.Activate() method in DrawCellDisplayText event. Please refer the following code snippet, Code Snippet: //Activate the CurrentCell on the Filterbar cell using (RowIndex,ColIndex) |
Hi Michael,
Regret for the inconvenience.
Please use the second suggestion of my previous update. It will focus the filter bar cell properly and you can have access to type the text in the cell continuously.
Code Snippet:
//Activate the CurrentCell on the Filterbar cell using (RowIndex,ColIndex)
this.gridGroupingControl1.TableControl.CurrentCell.Activate(RowIndex,ColIndex);
Sample:
http://www.syncfusion.com/downloads/support/forum/119921/ze/FilterBar1068739918
Please let me know if you have any other concern.
Regards,
Adhi.
Dear Mahendran :One more question , how to focus the filter bar on the form load. That mean, when the windows form open, user can type the text on filter bar without using the mouse to click filter bar insteadThanks for your helpMichael