BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
I see that with many other types of SF grids, but not with GriddataControl.
The other methods do not work with GDC.
Help please or link to what I missed or FAQ for that control ?
Thanks,
Fab
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
Thanks Akila .
Looks stupid question, but was not in any SF forum or help page.
And thanks to give complementary answer and other example !
BR,
Fab
Hi Fab,
Thanks for your update. Please let us know if you have any queries. We will always happy to assist you.
Regards,