[RESOLVED] Datagridview and TableStyles
I'm using VB 2005 express and am trying to customize the columns in my datagrid. I could not find the datagrid object in the toolbox so I used a datgridview. Now that I'm trying to customize the grid, I'm getting a message that tablestyles is not a member of datagridview.
Is there another way to customize the gridview? Am I missing the datgrid object?
Re: Datagridview and TableStyles
Look at DataGridViewCellStyle Class in help.
Each cell within the DataGridView control can have its own style, such as text format, background color, foreground color, and font. Typically, however, multiple cells will share particular style characteristics.
Groups of cells that share styles may include all cells within particular rows or columns, all cells that contain particular values, or all cells in the control. Because these groups overlap, each cell may get its styling information from more than one place. For example, you may want every cell in a DataGridView control to use the same font, but only cells in currency columns to use currency format, and only currency cells with negative numbers to use a red foreground color.
Re: Datagridview and TableStyles
Thanks. Here's why I couldn't find the datagrid object:
Quote:
The DataGridView Windows Forms control is a quite new .NET control introduced in MS Visual Studio .NET 2005 that is a good alternative to the VS .NET 1.x DataGrid control. The DataGridView control is a new control presented in .NET framework 2.0 that replaces the DataGrid control.
Re: Datagridview and TableStyles
The DataGridView is much more functional and much easier to work with than the dataGrid is/was. Here is something you may find useful. There's also a link to a DGV tutorial in my signature.
Re: Datagridview and TableStyles
jmcilhinney
Thanks. That shoud get me going.