CB
Clay Burch
Syncfusion Team
September 20, 2002 05:39 AM UTC
To get a value at cell(2,3), use
'VB.NET
Dim cellValue as String = Me.GridDataBoundGrid1(2, 3).Text
'or
Dim o as Object = Me.GridDataBoundGrid1(2, 3).CellValue
//C#
string cellValue = me.gridDataBoundGrid1[2,3].Text;
//or
object o = me.gridDataBoundGrid1[2,3].CellValue;
Using an indexer on the grid returns the GridStyleInfo object for that indexed cell. Once you have the style, you can then get the value or the text or any other style property.
To move the currentcell to a particular position, you call the MoveTo method of the CurrentCell property of the grid. So, to move to cell 2,3, use
'VB.NET
Me.GridDataBoundGrid1.CurrentCell.MoveTo(2,3)
//C#
this.gridDataBoundGrid1.CurrentCell.MoveTo(2,3);