Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
1077 | Sep 19,2002 06:35 PM UTC | Sep 20,2002 05:39 AM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
'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);
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.