Click here to Skip to main content
15,890,882 members
Home / Discussions / C#
   

C#

 
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Heath Stewart28-Feb-04 5:25
protectorHeath Stewart28-Feb-04 5:25 
GeneralRe: FileIOPermission also takes away UIPermission? Pin
Nathan Blomquist28-Feb-04 6:34
Nathan Blomquist28-Feb-04 6:34 
GeneralUsercontrol as a container Pin
meago27-Feb-04 8:28
meago27-Feb-04 8:28 
GeneralRe: Usercontrol as a container Pin
Roger Alsing27-Feb-04 9:19
Roger Alsing27-Feb-04 9:19 
GeneralRe: Usercontrol as a container Pin
meago1-Mar-04 12:44
meago1-Mar-04 12:44 
GeneralGet wmv file information Pin
Matt Newman27-Feb-04 8:22
Matt Newman27-Feb-04 8:22 
GeneralRe: Get wmv file information Pin
Heath Stewart27-Feb-04 9:30
protectorHeath Stewart27-Feb-04 9:30 
GeneralCheckbox in Datagrid - check in one click Pin
Ruchi Gupta27-Feb-04 6:35
Ruchi Gupta27-Feb-04 6:35 
Hi All,

I am stuck at some point in implementing checkbox column in datagrid.

This is how I am adding checkbox column to the DataGridTableStyle.

DataGridColumnStyle boolCol = new DataGridBoolColumn();
boolCol.MappingName = "PrimaryFlag";
boolCol.HeaderText = "Primary";
((DataGridBoolColumn)boolCol).TrueValue = "true";
((DataGridBoolColumn)boolCol).FalseValue = "false";
((DataGridBoolColumn)boolCol).ReadOnly = false;
boolCol.Width = 40;
ts.GridColumnStyles.Add(boolCol);

And from database I am receiving "true" or "false" values in the PrimaryFlag column. When I set the datasource of datagrid with the dataset that I receive from database, it correctly sets the checkboxes as checked or unchecked based on "true" or "false" values in the PrimaryFlag column.

Now my question is how can I handle the event such that with one click on the checkbox column it should toggle the check value of column. Right now it requires 2-3 clicks to toggle.

Any comments are very appreciated.
Thanks
Ruchi
GeneralRe: Checkbox in Datagrid - check in one click Pin
Heath Stewart27-Feb-04 8:31
protectorHeath Stewart27-Feb-04 8:31 
Questioncolored lines in console?? Pin
oOomen27-Feb-04 6:32
oOomen27-Feb-04 6:32 
AnswerRe: colored lines in console?? Pin
Heath Stewart27-Feb-04 6:36
protectorHeath Stewart27-Feb-04 6:36 
GeneralRe: colored lines in console?? Pin
Uwe Keim27-Feb-04 7:40
sitebuilderUwe Keim27-Feb-04 7:40 
GeneralVisual Studio Setup and Framework version Pin
Shahin7727-Feb-04 6:17
Shahin7727-Feb-04 6:17 
GeneralRe: Visual Studio Setup and Framework version Pin
Heath Stewart27-Feb-04 6:34
protectorHeath Stewart27-Feb-04 6:34 
GeneralDisplay text in User Control of Child Form Pin
robeneal27-Feb-04 5:28
robeneal27-Feb-04 5:28 
GeneralRe: Display text in User Control of Child Form Pin
Heath Stewart27-Feb-04 5:48
protectorHeath Stewart27-Feb-04 5:48 
GeneralRe: Display text in User Control of Child Form Pin
robeneal27-Feb-04 6:01
robeneal27-Feb-04 6:01 
Questionhow to resize and reposition a window??? Pin
SherKar27-Feb-04 5:14
SherKar27-Feb-04 5:14 
AnswerRe: how to resize and reposition a window??? Pin
Werdna27-Feb-04 5:22
Werdna27-Feb-04 5:22 
AnswerRe: how to resize and reposition a window??? Pin
Dave Kreskowiak27-Feb-04 7:35
mveDave Kreskowiak27-Feb-04 7:35 
GeneralTaskbar activity Pin
kaloyan27-Feb-04 4:31
kaloyan27-Feb-04 4:31 
GeneralRe: Taskbar activity Pin
Heath Stewart27-Feb-04 5:45
protectorHeath Stewart27-Feb-04 5:45 
GeneralRe: Taskbar activity Pin
kaloyan29-Feb-04 22:13
kaloyan29-Feb-04 22:13 
GeneralGetting the framework installation path Pin
MrEyes27-Feb-04 4:29
MrEyes27-Feb-04 4:29 
GeneralRe: Getting the framework installation path Pin
Charlie Williams27-Feb-04 5:21
Charlie Williams27-Feb-04 5:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.