RE: Why no see Property Builder on grid

Tech-Archive recommends: Speed Up your PC by fixing your registry



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
.



Relevant Pages

  • Re: DataGrid and Tablestyles
    ... > If I add a tablestyle and one column which I then add the TableStyle to ... This grid is visible and i can see the ... > the column which has a mapping name to the one of the columns in the table ... > was also added through the designer. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: how do i use the sql mobile resultsetview to set column names for a bound data grid?
    ... This is done by adding a TableStyle to the ... Click on the grid and find the TableStyles collection in the properties. ... For each column in the ResultSet to be displayed: ... type in the header in the HeaderText property and the ...
    (microsoft.public.dotnet.framework.compactframework)
  • Custom DataGridTableStyle with new property defaults
    ... I'm trying to add some custimisation to the standard WinForms DataGrid. ... TableStyleCollecitonEditor, TableStyle and ColumnStyleCollectionEditor ... and when I drop the grid onto a form, the ForeColor property says Green ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Custom DataGridTableStyle with new property defaults
    ... While the designer was correctly creating the InitializeComponent() ... TableStyle, ... > and when I drop the grid onto a form, the ForeColor property says Green ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: datagrid tablestyle columns-Auflistung abrufen
    ... >> ich habe meinem Grid ein TableStyle verpasst. ... > über den TableStyle kannst du keine Columns aufrufen. ... > Ein TableStyle hat eine GridColumnStyles-Auflistung, ... wie der Inhalt der DataSource im Grid ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)