How to let two gridview side by side in one form?
-
Because there is only one form running at server in one page, I let two gridview in one form. However, they are in 2 level, not side by side. How to do ? Thanks!
'------------------------------------------------ 'place a grid dgMaster 'inside a template col place grid dgChild 'u can design both grid at design time 'call below code after binding master grid 'u can also do this in itemcreated event '------------------------------------------------ '--declare a data grid object Dim dgchild As DataGrid '--suppose the master grid is dgmaster '--loop thro all items of a datagrid For i = 0 To dgMaster.Items.Count - 1 'find child grid dgChild = dgMaster.Items(i).FindControl("dgChild") 'bind this grid dgchild.DataSource = myDataSource dgchild.DataBind() Next Hope this helps Arvind B
-
Because there is only one form running at server in one page, I let two gridview in one form. However, they are in 2 level, not side by side. How to do ? Thanks!