Re: DataGrid Hierarchical Data view display in Windows Form
- From: "Keith Patrick" <richard_keith_patrick@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 18 Jan 2007 13:42:29 -0600
The quickest (although I loathe these things) way to do this is to define
your dataset in an XSD and generate a Typed Dataset for it. A TDS attempts
to represent a dataset as a single object, as if the TDS was deserialized
into a true data entity. One problem (at least pre-Nullable): because they
just encapsulate what the database returns, you have to make a lot of calls
like:
System.Diagnostics.Debug.WriteLine("Here's my value: " +
myDataEntity.IsMyValueNull() ? "null" : myDataEntity.MyValue);
or else get_MyValue will attempt to cast a DBNull as the property type of
MyValue, leading to an InvalidCastException.
.
- Prev by Date: Winforms binding -> non-IListSource to a ListBox
- Next by Date: Can I share menu items between menus?
- Previous by thread: Re: DataGrid Hierarchical Data view display in Windows Form
- Next by thread: Re: ListBox in Windows App
- Index(es):
Relevant Pages
|
Loading