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?
ADAdministrator Syncfusion Team September 12, 2003 04:38 AM
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 = "aaaaaaaaaa";
MKMarkus KraftSeptember 12, 2003 06:07 AM
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?
ADAdministrator Syncfusion Team September 12, 2003 09:05 AM
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.