Results 1 to 5 of 5

Thread: [RESOLVED] Datagridview and TableStyles

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    Resolved [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?

  2. #2
    Addicted Member
    Join Date
    Mar 2006
    Posts
    235

    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.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    Re: Datagridview and TableStyles

    Thanks. Here's why I couldn't find the datagrid object:

    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.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    394

    Re: Datagridview and TableStyles

    jmcilhinney
    Thanks. That shoud get me going.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width