Checkbox to datagrid...

  • Thread starter Thread starter wink martindale
  • Start date Start date
W

wink martindale

Hello All,

I am certain this has been asked before, but here goes:

How do I add a checkbox to a datagrid that is not related to a field
in the database? This checkbox will enable the user to create a custom
list by selecting the records they want to view.

Any help would be much apprectiated,


TIA,

WInk
 
Assuming this is a Windows Forms app.
Have you tried using the DataGridColumnStyle Collection Editor?
You can add a DataGridBoolColumn that should work as you've described.

-m
 
Wink,

You have to add a column in your datatable. The datagrid won't work without
that.
(Because it is not in your database is it not updated before you think
that).

\\\
dt.Columns.Add("WInk", GetType(System.Boolean))
///

I hope this helps,

Cor
 
Cor is correct (no surprise). You need to add a column for this to work.
If you try to add a column with the DataGridColumStyle Collection Editor
without populating "Mapping Name", the new column won't display.

-m
 
Worked like a champ! Thanks for the help!

Wink
Wink,

You have to add a column in your datatable. The datagrid won't work without
that.
(Because it is not in your database is it not updated before you think
that).

\\\
dt.Columns.Add("WInk", GetType(System.Boolean))
///

I hope this helps,

Cor
 
Back
Top