SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Friday, May 21, 2004

I use strongly-typed datasets. I like the intellisense and it IsXXXNull methods. And I bind them to data grids. Everything is good.

When acting on a datagrid in ItemCreated or ItemCommand, it is common to access the underlying data. This is acheived via e.Item.DataItem. When a grid is bound to a DataSet or DataTable, this property returns a DataRowView. My lovely, strongly-typed object is gone. :(

I needed to build a page that displayed hierarchical data. So, instead of binding my grid to a DataTable, I was binding to a GetChildRows method, which is a DataRow(). My strongly-typed DataRow is back!!!

To get the strongly-type datarow without a relation, bind to dataSet.dataTable.Rows.

Friday, May 21, 2004 8:58:52 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
Comments are closed.
Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009, Paul Schaeflein

Send mail to the author(s) E-mail