This is a migrated thread and some comments may be shown as answers.

Grids - Parent Child

1 Answer 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
T
Top achievements
Rank 1
T asked on 17 Feb 2008, 03:22 PM
I used to use Infragistics grids with this code and it worked fine but doesnt work with the Telerik Grids

Dim

AuthCheck As New MySql.Data.MySqlClient.MySqlConnection(Conn)

Dim AuthGo As New MySql.Data.MySqlClient.MySqlCommand("Auth", AuthCheck)

AuthGo.CommandType = Data.CommandType.Text

Dim AuthGo2 As New MySql.Data.MySqlClient.MySqlCommand("Auth", AuthCheck)

AuthGo2.CommandType = Data.CommandType.Text

AuthGo.CommandText =

"SELECT recipe as Recipe, ingredients as Ingredients, id as ID FROM book"
AuthGo2.CommandText = "SELECT ingredients as Ingredients, id FROM book"

Dim AuthGoAdapter As New MySql.Data.MySqlClient.MySqlDataAdapter(AuthGo)

Dim DS As New Data.DataSet()

Dim DST As New Data.DataTable()

Dim DST2 As New Data.DataTable()

Dim AuthGoAdapter2 As New MySql.Data.MySqlClient.MySqlDataAdapter(AuthGo2)

AuthGoAdapter2.Fill(DS,

"DST2")

AuthGoAdapter.Fill(DS,

"DST")

DS.Relations.Add(

"DST6", DS.Tables("DST").Columns("id"), DS.Tables("DST2").Columns("id"))

rgv.DataSource = DS.Tables(

"DST")

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 18 Feb 2008, 10:08 AM
Hello T,

You can use following code snippet to show your data in hierarchy mode in RadGridView:

this.radGridView1.DataMember = "DST";  
this.radGridView1.DataSource = DS;  
this.radGridView1.AutoGenerateHierarchyFromDataSet = true

I hope this was helpful.

Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
T
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or