I have a GDBG that is bound to a DataTable. I have carefully initialized the grid with all the events I am interested in, and used the CurrencyManager to apply StyleInfo to all my columns.
Assume my DataTable has 1 row in it when the program starts. Everything looks great.
Now I add 4 more rows to the DataTable (when viewed all 5 rows are there and look perfect) but the grid only displays the last row.
I have tried Grid.Refresh() and Grid.Model.Refresh() and a lot of other things - nothing is working and I'm going nuts.
I'm really not interested in looping through the grid and manually populating it using an indexer like:
MyGrid[row, col] = "MyData"
I dont want to do this because I have already told the grid everything it needs to know to display my data (using CurrencyManager & StyleInfo), and I have also tried to get the data loaded using PopulateValues() but still cant.
---
What I simply want to do is this:
1) initialize the grid
2) bind the DataTable
3) if I change the records in the DataTable, have those changes reflected in the grid using a Refresh() command
---
I manage all the data in the DataTable. The grid doesnt need to track adds, deletes or changes. I manage everything. I dont care if I have to unbind and rebind, I just want the grid to Refresh() on my command and display whatever is in the DataTable that is attached to the grid's DataSource.
Can anyone help?
Thank you!
MyTitle1
JJ
Jisha Joy
Syncfusion Team
September 7, 2009 12:56 PM UTC
Hi George,
Your incident 59845 for the same query has been updated. Please follow up there.
Regards,
Jisha
AD
Administrator
Syncfusion Team
September 7, 2009 03:58 PM UTC
Thank you very much for the prompt response!
I'm an idiot. When I was scanning the DataTable that as the grid's DataSource, I was applying a filter to DataTable.DefaultView.RowFilter so I could determine if a row existed in the grid. If it didn't I added it to the DataTable.
Once I was finished (in the example above where I added 4 rows) I forgot to reset the DataTable.DefaultView.RowFilter so my new rows weren't displayed.
Sorry to have bothered you.
LS
Lingaraj S
Syncfusion Team
September 8, 2009 08:24 AM UTC
Hi George,
Thank you for the update.
We are glad to hear that you solved the issue.
Thank you for using Syncfusion products.
Regards,
Lingaraj S.