About GridControl (DevExpress), please help me


Author
Message
Robinson Robinsonit...
Robinson Robinsonit Robinson_niit
StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)StrataFrame Beginner (3 reputation)
Group: Forum Members
Posts: 3, Visits: 8


'

'get value of current row

'

Private Sub loadQByID_Grid()

Dim ds As New DataSet()

Dim dr As DataGridViewRow = gv.CurrentRow

Dim str As Integer = Convert.ToInt16(dr.Cells(0).Value.ToString())

Try

ds = getQuestionByID(str)

txtContent.Text = ds.Tables(0).Rows(0).Item(1)

Catch ex As Exception

Dim strError As String = "Error : " + ex.Message()

End Try

End Sub





This above code, I use DataGridView.

I want to use GridControl (DevExpress).

But when I used it, I don't see any object DataGridViewRow and method CurrentRow

How do I use GridControl (DevExpress) to get value of current row.

Please help me

Regards

PS: you can use C# to solve

Reply
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
A grid control can have many grid views.  A new instance of the grid control will have one grid view by default (gridView1).  Using the designer you can rename it, add new views, etc.  I just used the sample naming convention of "MyGridView" just to give you an idea of how to access the data in the grid.

Have fun!
Bill

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search