Hi,
Anyone see a problem with this code? On initial page load, the datagrid
displays properly. The datagrid doesn't display any recs via the code below.
(Note - I've hardcoded the sort property just to see if I could get it to
work. Yes, I do have a column intSBL. Yet, it doesn't work...)
sqlConnection2.Open();
sqlDataAdapter1.Fill(dataSet11, "tblParcels");
sqlConnection2.Close();
DataView dv = dataSet11.Tables["tblParcels"].DefaultView;
dv.Sort = "intSBL ASC";
DataGrid1.DataSource = dv;
DataGrid1.DataBind();
TIA,
Davewhat happens if you use the dataset and comment out the sorting?
DataGrid1.DataSource = dataSet11;
DataGrid1.DataBind();
the code looks correct to me. one more thing, you do have data in your
dataset right? that is ds.tables[0].rows.count > 0??
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"David Prowak" <dprowak@.twcny.rr.com> wrote in message
news:%23jArtSs5DHA.2344@.TK2MSFTNGP09.phx.gbl...
> Hi,
> Anyone see a problem with this code? On initial page load, the datagrid
> displays properly. The datagrid doesn't display any recs via the code
below.
> (Note - I've hardcoded the sort property just to see if I could get it to
> work. Yes, I do have a column intSBL. Yet, it doesn't work...)
> sqlConnection2.Open();
> sqlDataAdapter1.Fill(dataSet11, "tblParcels");
> sqlConnection2.Close();
> DataView dv = dataSet11.Tables["tblParcels"].DefaultView;
> dv.Sort = "intSBL ASC";
> DataGrid1.DataSource = dv;
> DataGrid1.DataBind();
> TIA,
> Dave
>
0 comments:
Post a Comment