RE: Why no see Property Builder on grid
- From: "robrich" <robrich@xxxxxxxxxxxxxxxx>
- Date: Tue, 9 Aug 2005 10:40:02 -0700
Woody,
The Property Builder is part of the ASP.NET data grid, but not part of the
Windows Forms data grid. (I expect confusion like this is why the VS 2005
grid is called "DataGridView" and the ASP.NET grid has another different
name.)
In Windows Forms world, a column is controlled by a ColumnStyle associated
with a TableStyle. A TableStyle is bound to a particular table. If you're
using the grid in "just do everything for me" mode, the TableStyle and
ColumnStyles are built for you. If that's not the way you want it, ...
In the properties for the DataGrid, click on TableStyles and create a new
one. Make the MemberName the name of the table you're displaying. Then add
a ColumnStyle for each column you want to display. Want to hide it? don't
add it here. You'll then have ultimate control of the grid.
The poor man's way to do it is to set the column width to 0 after the
InitializeComponent() method is called, but this leads to some odd problems.
For example, if the user tab's through the grid, they'll land on these
"invisible" columns from time to time.
robrich
.
- References:
- Why no see Property Builder on grid
- From: Woody Splawn
- Why no see Property Builder on grid
- Prev by Date: RE: Designer serialization of protected properties in derived clas
- Next by Date: Design Time support for custom columns in DataGridView (VS 2005)
- Previous by thread: Why no see Property Builder on grid
- Next by thread: Design Time support for custom columns in DataGridView (VS 2005)
- Index(es):
Relevant Pages
|