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. Image for the cookie policy date
close icon

set rowfilter will not displayed in filterbar row

Hi, when i set the rowfilter like: filterBar.RowFilter = "[Systems] = 'System_A'"; the argument "System_A" will not be displayed in the filtercombobox at column "Systems". the defined filter works correct, but the filterargument will not displayed in the filterbar. why? 2. question: When will the "LIKE" operator in the custom filter runs? greetings markus

3 Replies

AD Administrator Syncfusion Team October 27, 2003 09:18 AM UTC

1) Changing the filterBar.RowFilter does not affect the values shown in the filterbar row of the grid. The reason is that you are free to enter whatever you like in the RowFilter, and this may or may not translate readily to values that could be displayed in the grid row. If you want to see these values in the grid when they make sense, then when you set the FilterRow property, set the grid value at the same time. int col = this.gridDataBoundGrid1.Binder.NameToColIndex("CustomerID"); this.gridDataBoundGrid1[1, col].Text = "ANTON"; this.theFilterBar.RowFilter = "[CustomerID] = 'ANTON'"; 2) I am not sure I understand. The custom dialog is displayed in a CurrentCellAcceptedChanges event handler. In this same handler, the RowFilter property is set with the string returned by the dialog. Setting this RowFilter property is what sets the DataView.RowFilter which is what changes the display. The LIKE is recognized and used in the DataView.RowFilter property.


MK Markus Kraft November 11, 2003 04:51 AM UTC

Hi Clay, I understand the way filter arguments to show in the filter line, but in my solution it is possibly columns to display and to hide. I have two Arrays. One Array contains the Mappingnames and the other includes the filterarguments. colName[x] // include MappingNames argument[x] // filterargumnet to display So the absolute positioning suggested by you of the texts in the Grid cannot work with me since a column isn't just visible with Filterargumnet. How can I place in the current view on the Grid via MappingNames? My approach would be: for(int x = 0; x < colName.Length;x++) { ValueGrid[1,colName[x]].Text = argument[x]; } greetings markus


AD Administrator Syncfusion Team November 11, 2003 06:40 AM UTC

If you just want to put text into the filterbar cells, you can try handling PrepareViewStyleInfo. There, when e.ColIndex and e.RowIndex point to a particular cell, you can set e.Style.Text to be whatever text you want to see in that cell. If you need to convert a mapping name to a colindex, you can use grid.Binder.NameToColIndex to do so.

Loader.
Live Chat Icon For mobile
Up arrow icon