Hi
Fab,
You
can access the CellValue of the particular cell by using gird.Model[Rowindex,
Columnindex].CellValue property as in the below code snippet,
private void Button_Click_1(object sender, RoutedEventArgs e)
{
var
cellValue = this.grid.Model[3,3].CellValue;
MessageBox.Show(" cellvalue\t" + CellValue);
}
|
In another
way, you can access the underlying data of the particular row based on rowindex
by resolving to RecordIndex. From RecordIndex, you can access the data from
Model.View.Records (If not Grouped) / Mode.View.TopLevelGroup.DisplayElements
(if Grid is grouped) as in the below code snippet,
private void Button_Click_1(object sender, RoutedEventArgs e)
{
var
recordindex = this.grid.Model.ResolveIndexToRecordPosition(5);
Student stud;
if
(grid.Model.Table.HasGroups)
{
var
displ = this.grid.Model.View.TopLevelGroup.DisplayElements[recordindex];
if (displ.IsRecords)
stud = (this.grid.Model.View.TopLevelGroup.DisplayElements[recordindex]
as RecordEntry).Data as Student;
}
else
stud = this.grid.Model.View.Records[recordindex].Data
as Student;
}
|
Please let
us know if you have any questions.
Regards,
Akila