Hi, i bind my Wingrid to a custom generated Dataset. This Dataset consist of an id column, a date and serveral integer and string columns.i get my data from a sql server database get the data and loop through each row from the table and build from this data a custom dataset, this i bind to the Wingrid.Now when i edit a cell of a row how can i recognize the changed cell and how can i update the data in my table
the table has the following constructid date description value1,12.06.2009, test,40002,12.06.2009,test2,50003,12.06.2009,test3,60004,13.06.2009, test,44005,13.06.2009,test2,55006,13.06.2009,test3,66007,14.06.2009, test,47008,14.06.2009,test2,58009,14.06.2009,test3,6900
the custom dataset and the following grid i create from them looks likeid,date, test,test2,test3
1,12.06.2009 ,4000,5000,60002,13.06.2009 , 4400,5500,66003,14.06.2009 , 4700,5800,6900
now i wanna change the value of the marked row,marked valueis that possible ?greetings
Hi,
This doesn't seem to be a question about the WinGrid. You appear to be asking who you can associate a row in your custom DataSet with a row in the original DataSet or SQL Server database. The grid, of course, knows nothing about your original data, it only knows the data source it is bound to.
So you would have to come up with a way to associate the data yourself.
So I'm not sure I understand the question.
If I'm reading this correctly, you want to map the row from your custom DataSet back to the original DataSet that you got from your database. This isn't really anything specific to the grid, but you'd probably have to loop through all the rows to find the matching value in that column and then update the other values accordingly. One thing you might consider is to keep an unbound column with the index of the original row so that you can look it up later, then set the column.Hidden property on the grid so that the user can't see it.
-Matt
Hello Martin,
If you only want to visualize the edited rows you can set a backColor or Font or FontWeight in either the AfterRowUpdate or AfterCellUpdate events.
If you need the dataTable row to be recognizable trough code you should have a boolean column for that which you can hide from the ultraGrid visualized columns.
Hope this is what you ment. If not please describe your situation in more details.
Sincerely,
Petar Monov
Developer Support Engineer,
Infragistics, Inc