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

Bind a column to another SQL DataSource

3 Answers 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adigard
Top achievements
Rank 1
Adigard asked on 07 Oct 2011, 11:10 AM
Hello,

I have my Radgrid binded to a first SQLDataSource.
But, I need to have a column (i have created manually) from my RADGrid binded to another SQLDataSource(informations from another table)

Is this possible ?
Thank you in advance for your help!

3 Answers, 1 is accepted

Sort by
0
Adigard
Top achievements
Rank 1
answered on 07 Oct 2011, 03:34 PM
To be more precise all i need is to use a special SQLdatasource for a column while the other ones use another SQLDataSource
0
Adigard
Top achievements
Rank 1
answered on 10 Oct 2011, 11:33 AM
I'm still looking for a solution ... does anyone have an idea about this ?
0
Shinu
Top achievements
Rank 2
answered on 10 Oct 2011, 12:08 PM
Hello Adigard,

One suggestion is to create a dataTable from the two DataSource and merge them into a new one.
C#:
Dim dt As New DataTable("dt")
dt.Columns.Add("1")
dt.Columns.Add("2")
dt.Columns.Add("3")
 
Dim dr As DataRow
dr = dt.NewRow
dr("1") = "11"
dr("2") = "21"
dr("3") = "31"
dt.Rows.Add(dr)
 
Dim dt2 As New DataTable("dt")
dt2.Columns.Add("1")
dt2.Columns.Add("2")
dt2.Columns.Add("3")
 
dr = dt2.NewRow
dr("1") = "12"
dr("2") = "22"
dr("3") = "32"
dt2.Rows.Add(dr)
 
Dim ds As New DataSet
ds.Tables.Add(dt)
ds.Merge(dt2)

Thanks,
Shinu.
Tags
Grid
Asked by
Adigard
Top achievements
Rank 1
Answers by
Adigard
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or