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

Refresh filterbar in GDBG

Hi, i have a GDBG with a datatable source. At runtime the values in the table will be sporadic updated but the filter dont shows the new values. unwire and wire take to much runtime. Is another way possible to update/refresh the filterbar? greetings Markus

3 Replies

AD Administrator Syncfusion Team September 12, 2003 08:38 AM UTC

The datasource for the filterbar combobox cell is stored in a cached style in a headerrow of the grid. So, you can retrieve it and modify it. private void button3_Click(object sender, System.EventArgs e) { DataTable dt = this.gridDataBoundGrid1[1,4].DataSource as DataTable; if(dt != null) { dt.Rows[4][0] = "aaaaaaaaaa"; } }

MK Markus Kraft September 12, 2003 10:07 AM UTC

Hi Clay, your answer means i must permanently scan-up my DataSource to refresh manually the filtertables. I dont want change the filter from extern, only changes in the DataSource should be visible in the wired filterbar. Is a simpler solution available? greetings markus

AD Administrator Syncfusion Team September 12, 2003 01:05 PM UTC

The datasources for the dropdowns in the comboboxes are dynamically created when the FilterBar is wired. So, they are not bound to any particular datasource that you provide. If you want to automate this updating, I think you would have to subscribe to the whatever change events the datasource that you provided as the grid's datasource has. In the change event handlers, you would decide exactly what value in the datasource changed, and then use the code I suggested above to explcitly make the change to the proper combobox's datasource. Another option that avoid all this would be to postpone creating the droplist until the th ecombobox is dropped, and each time recreate teh list. This woul dbe simpler, but if you were concerned about rewiring taking too long, this may also be a concern here. You would do this in the CurrentCellShowingDropDown event.

Live Chat Icon For mobile
Up arrow icon