display checkbox in datagrid for database cols with Y/N values

Hi All,
   I am populating a datagrid from database. Some of the columns in table have Y/N values (varchar(1) ). Instead of displaying Y/N values in datagrid..I want to display checkboxes for these. I am using typed dataset to populate the datagrid. Any suggestions are welcomed.
thx


Answer this question

display checkbox in datagrid for database cols with Y/N values

  • xudeutsch

    The DataGridView (new control in Visual Studio 2005) supports this, but the DataGrid doesn't have anything like this (you would have to create a custom column completly from scratch).

    For the DataGridView you can use a DataGridViewCheckBoxColumn and set the TrueValue and FalseValue to "Y" and "N".

    -mark
    DataGridView Program Manager
    Microsoft
    This post is provided "as-is"

  • display checkbox in datagrid for database cols with Y/N values