|
Subject:
|
Bind a grid from multi tables?
|
|
Posted By:
|
hany
|
Post Date:
|
1/21/2006 2:56:04 AM
|
Hi, I have complex problem here, any help on this I appreciate it. My problem is: I want to bind datagrid from multi tables selection,until here it's ok because I can use data table to solve it, but I want to add select button for each row so i can know wich row selected and do other things depends on the selection. So, any Ideas?
Regards Hani
|
|
Reply By:
|
jbenson001
|
Reply Date:
|
1/21/2006 4:47:21 PM
|
You have to have some sort of ID column in the grid to determine which row it is, then use the SelectedIndexChanged event of the grid. EX: Private Sub DataGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.SelectedIndexChanged 'This is assuming your ID column is the 2nd column in the grid. Response.Write(DataGrid1.SelectedItem.Cells(1).Text) End Sub
Jim
|
|
Reply By:
|
planoie
|
Reply Date:
|
1/22/2006 10:26:21 AM
|
Bind data from multiple tables by building a select query that gets data from multiple tables.
-Peter
|