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
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Amna,



I believe that you are trying to just setup the parent-child relationships if I am not mistaken. There are a number of samples on this as well as documentation. As far as binding to a grid, that is great. You will want to use the BusinessBindingSource that wraps a BO and allows direct binding to a grid.



My first suggestion would be to download and install the StrataFlix sample. This sample shows everything that you are trying to do in regards to setting up parent-child relationships as well as using our ChildFormDialog (if necessary). Adding in the grid portion is the easy part.



This might be the best place to start and then we can field questions from there.
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