Good Morning
So I have the following multi-row XamDataGrid. Each Column is an attribute of an external database table. What I need to do is access each cell and extract it in string form in order to save it to the data base. How can I do so?
Hello Nour,
In order to access each cell of your XamDataGrid, I would recommend looping through the Records collection of the grid. Each DataRecord in this collection has a Cells collection that you can then use an inner-loop to loop through. Each Cell in this cells collection has a Value property that you can use to get the cell’s values. I am adding a code-snippet below to demonstrate this, where “xdg1” is the XamDataGrid:
foreach(DataRecord record in xdg1.Records) { foreach(Cell cell in record.Cells) { string str = cell.Value.ToString(); } }
Please let me know if you have any other questions or concerns on this matter.