How do you set the content of single cell. For example I would like to set the grid cell at row 2, column 3 = 67 c1grid(2,3) = 67. Then how do you read that value back programatically. I don't want to bind to anything and I am only interested in the values of a single cell.
Brian
Hi Brian,
In order to change the value of a cell you must change the corresponding data item, you don't need to change anything in the datagrid. But the data item must implement INotifyPropertyChanged to be auto-refreshed.
Why do you want to set a cell value? do you mind giving us more info about you want to achieve?
Regards,
Alvaro.
Alvaro,
Thanks for your fast reply. I was hoping to be able to treat the grid similar to a flexGrid (winForms) where I can write and retrieve cell by cell. I can do the same thing with my asp.net grid component by one of your competitors. Many times it is nice to be able to do a series of calculations and write the results directly to the grid with out the over-head of creating a class with get and set properties and then use the class as a data source.
If I understand what you are saying the only way to change the cell data is to change the underlying class data that is used for the data source and the datagrid will be updated.
What are you defining as a data item?
Thanks
Andrew8: If I understand what you are saying the only way to change the cell data is to change the underlying class data that is used for the data source and the datagrid will be updated.
You're right.
Andrew8: What are you defining as a data item?
The data object could be any object, this object should have properties to bind these properties against the columns.
Follow me: Twitter.com/leovernazza/
Thanks for the clarification.