Re: DataGrid & DataBind()
are you doing web app's?
if it's in windows app's no need to put databind.
VB Code:
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet);
dgTest.DataSource = dataset;
Re: DataGrid & DataBind()
Ok, thanks. No need to put DataBind...
It works without, but it shows a +, not the DataGrid. If I push the + it show me the word "Table". Finally if I click the "Table" it shows me the DataGrid. Why? How can I display directly the DataGrid?
Re: DataGrid & DataBind()
you must create a datatable to show it directly to the datagrid w/ out clicking the "+" sign.
like this one.
VB Code:
DataSet dataSet = new DataSet();
dataSet.Tables.Add(new Datatable("dt"));
dataAdapter.Fill(dataSet.Tables[0]);
dgTest.DataSource = dataset;