I already add a DataGrid on my WebForm, and already also connected it.. But when the WebForm is loaded, I can't see the DataGrid?? what the problem with this?
Printable View
I already add a DataGrid on my WebForm, and already also connected it.. But when the WebForm is loaded, I can't see the DataGrid?? what the problem with this?
Show.
Some.
Code.
DataGrid1.DataSource = DataSet11.Table1
Touché.
what that mean?? I have a OleDbDataAdapter and I already connected the database.. DataGrid1.DataSource=Dataset11.Table1 doesn't work
Touché as in... I said "show some code" and you showed just "some" code. :lol:
What I meant was, show all the relevant code.
VB Code:
DataGrid1.DataSource = DataSet11.Table1
Might have to be
VB Code:
DataGrid1.DataSource = DataSet11.Tables(0)
ok if you have the dataadapter and sqlstring you still need to do the followwing.
VB Code:
Dim dsOne As New System.data.DataSet da.Fill(dsOne, "dtOne") dgOne.DataSource = DsOne.Tables("dtOne") dgOne.DataBind()
Fill databse into SqlDataAdapter
Then Bind database into DatagridCode:SqlDataAdapter1.Fill (DataSet11,"tblTest")
Datagrid1.DataSource=DataSet11
Datagrid1.Bind()
Have fun :lol:
I think the datagrid receives no records from the database table (or) from the stored procedure you used to return the dataset.
you can try with Response.Write(DataGrid.Items.Count);