how to bind database to datagrig 2003
bind database to datagrid
Collapse
X
-
-
Hi,
First u should declare an instance for SqlDataAdapter, Dataset.
Eg: Its C#.net code
Sqldataadapter sda;
Dataset ds=new DataSet();
...
...//establish ur connection.
sda=new sqldataadapter( "Query",connect ion);
sda.fill(ds);
Datagrid.dataso urce=ds;
Datagrid.datame mber=Convert.to String(ds.Table s[0]);
Datagrid.Databi nd();
The above is coding section.
U can also specify the datamember and datasource in property itself.
I think this may help u. Try out.
Cheers
JeenComment
Comment