Hi. I have a typed dataset in a windows forms app with a PropertyGrid control
in which I am displaying the currently selected item from one of the tables
in the dataset. By default, this means that all properties of the currently
selected item are displayed, including RowState, HasErrors, etc.

Ordinarily you can show/hide properties such as these in the property grid
using BrowsableAttribute. Is there any way to decorate the dataset schema to
do this, or will I have to wrap the currently selected item in a class that
exposes column values as properties (with BrowsableAttribute appropriately
applied)?

Thanks

kh

Re: Typed Dataset and BrowsableAttribute by Miha

Miha
Fri Aug 20 05:54:08 CDT 2004

Hi,

I don't think that there is a way to decorate it using any attribute.
However, you might generate strong typed dataset code by yourself using
CodeSmith (free tool) and a propery template like mine:
http://www.rthand.com/DesktopModules/Articles/ArticlesView.aspx?tabID=0&alias=RightHand&lang=en-US&ItemID=6&mid=10244
Or, you might try using a 3rd party similar control like XtraVerticalGrid
from Developer Express:
http://www.devexpress.com/?section=/products/NET/XtraVerticalGrid

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"kh" <kh@discussions.microsoft.com> wrote in message
news:A23132BE-6B98-4DCB-8B41-13D41CA965B6@microsoft.com...
> Hi. I have a typed dataset in a windows forms app with a PropertyGrid
> control
> in which I am displaying the currently selected item from one of the
> tables
> in the dataset. By default, this means that all properties of the
> currently
> selected item are displayed, including RowState, HasErrors, etc.
>
> Ordinarily you can show/hide properties such as these in the property grid
> using BrowsableAttribute. Is there any way to decorate the dataset schema
> to
> do this, or will I have to wrap the currently selected item in a class
> that
> exposes column values as properties (with BrowsableAttribute appropriately
> applied)?
>
> Thanks
>
> kh
>