G
Guest
How to bind Multiple results into a datagrid.
For example Assume the values for dsCustCode.Tables(0).Rows.Count = 4,and
the values are "'Val1','val2','val3','val4'" in the below loop
In the above situation four datasource needs to be bind in the grid. I know
the below is binding the last value's (Val4) datasource in the DataGrid
For iCountCustCode = 0 To dsCustCode.Tables(0).Rows.Count - 1
CusCode =
dsCustCode.Tables(0).Rows(iCountCustCode)("CustCode").ToString ' say the
values are 'Val1','val2','val3','val4'
DataGrid1.DataSource = _Dac.GetOrders(CusCode, ControlNum,
AppLast, AppFirst, AppSocial, CaseNum) 'assume ControlNum, AppLast, AppFirst,
AppSocial, CaseNum are null
DataGrid1.DataKeyField = "RECORD_NUMBER"
DataGrid1.DataBind()
Next
if http://www.codeproject.com/aspnet/DataGridMultipleResultset.asp helps,
then let me know how to modify the sample code according to my requirement.
For example Assume the values for dsCustCode.Tables(0).Rows.Count = 4,and
the values are "'Val1','val2','val3','val4'" in the below loop
In the above situation four datasource needs to be bind in the grid. I know
the below is binding the last value's (Val4) datasource in the DataGrid
For iCountCustCode = 0 To dsCustCode.Tables(0).Rows.Count - 1
CusCode =
dsCustCode.Tables(0).Rows(iCountCustCode)("CustCode").ToString ' say the
values are 'Val1','val2','val3','val4'
DataGrid1.DataSource = _Dac.GetOrders(CusCode, ControlNum,
AppLast, AppFirst, AppSocial, CaseNum) 'assume ControlNum, AppLast, AppFirst,
AppSocial, CaseNum are null
DataGrid1.DataKeyField = "RECORD_NUMBER"
DataGrid1.DataBind()
Next
if http://www.codeproject.com/aspnet/DataGridMultipleResultset.asp helps,
then let me know how to modify the sample code according to my requirement.