Hy!
I'm using a UltraDataSource object in order to load a custom object list into a WinGrid. And I'm looking for the best way to update a single row without having to reload the entire grid.
The thing is that the load process takes a while, and every time a property of my entity is modified the entire reload makes the application a little a annoying.
Why I'm using a UltraDataSource? Because the object is an interface, so in order to get all the properties of that object (including the inherited ones) I have to use a UltraDataSource.
Thanks, Luciano.
To be exact I also save business object with changed properties to datarow's Tag, because I use it further.
Hi, ldcampana.
I replace the cell value like:
row.SetCellValue("ColumnA", new_value)
or
row["ColumnA"] = new_value;
and it works - row in the grid is updated.
As far as I understood only this direct setting new_value to the data cell can update the corresponding data row. I encounter with this situation too( when setting new value to data row's Tag does not force the UltraDataSource to call CellDataRequested event and reload the row.
Alex.
Hi!
And, when you said "row["a"] = new_value" you mean "dataRow.tag = new_value"? Or you replace the cell value like row.SetCellValue("ColumnA", new_value)?
Thanks!
Well, like I said, there are just too many variables here for me to tell you what you need to do or why my suggestions are not working. Maybe the easiest thing to do at this point is for you to create a small sample project demonstrating the behavior you are getting and Submit an incident to Infragistics Developer Support so they can check it out.
Hi.
I do not know which means of updating one row is the most accurate but I do it head-on:
1. I store the business object for each data row in tag.
2. Then when it's necessary to update the corresponding row I find it by the appropriate key of object that is in tag. I do it via iterating thru all rows of the grid until find the necessary one.
3. Then update it like this:
row["a"] = new_value;