Hi Miguel,
Thanks for contacting Syncfusion Support.
In SfDataGrid, it is possible to get the value of specific row and specific column using SfDataGrid.GetCellValue(RowData,ColumnName) method by passing row data and column name as parameters. Please refer the below code snippet to know how to get the cell value of each rows and columns.
foreach (var row in sfGrid.View.Records)
{
foreach (var column in sfGrid.Columns)
{
//Get the cell value of each column
var getCellValue = sfGrid.GetCellValue(row.Data, column.MappingName);
}
} |
You can also get the cell value for the specific column and row as follows.
foreach (var column in sfGrid.Columns)
{
//Get the cell value of specific row and column
if (column.MappingName == "OrderID")
{
var rowData = sfGrid.GetRecordAtRowIndex(2);
var getCellValue = sfGrid.GetCellValue(rowData, column.MappingName);
}
} |
We have prepared the sample based on your query and you can download the same from the below link.
Regards,
Divakar,