CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    651

    [RESOLVED] DataGridView: Checked Cell, Setting TrueValue at Runtime

    Can the TrueValue and FalseValue for a checkbox column in a DataGridView be set in code rather than in the control properties? And without using code to add the column to the DGV? And then how to I read the TrueValue back out in code?

    I have added 10 columns to the DGV using the AddColumns option in the control's properties. I do not want to use code to add these columns. Each of the columns needs to have the TrueValue set to a number as defined in an Enum.


    [SOLUTION]

    Found the solution. And it's so simple!

    [ColumnName].TrueValue (where [ColumnName] is the name given to the column when adding it in the DGV properties)
    Last edited by malleyo; June 4th, 2008 at 01:02 PM.
    I'd rather be wakeboarding...

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

Featured