PC Review


Reply
Thread Tools Rate Thread

disabling threestate of checkbox in datagrid (datacolumn)

 
 
Steven
Guest
Posts: n/a
 
      24th Feb 2004
How can I disable the ThreeState of a checkbox in a datagrid datacolumn
(dataset)?

Because of the ThreeState the checkboxes in my datagrid can be in the states
'Checked', 'Unchecked', and 'Indeterminate' (checked + shaded).
I want to prevent the checkbox (datacolumn) from getting this last state.

How can this be done??

Thanks! Steven


 
Reply With Quote
 
 
 
 
Dominique Vandensteen
Guest
Posts: n/a
 
      24th Feb 2004
set the AllowDBNull property of the DataColumn to false


Dominique


"Steven" <(E-Mail Removed)> wrote in message
news:%23FLMaRt%(E-Mail Removed)...
> How can I disable the ThreeState of a checkbox in a datagrid datacolumn
> (dataset)?
>
> Because of the ThreeState the checkboxes in my datagrid can be in the

states
> 'Checked', 'Unchecked', and 'Indeterminate' (checked + shaded).
> I want to prevent the checkbox (datacolumn) from getting this last state.
>
> How can this be done??
>
> Thanks! Steven
>
>



 
Reply With Quote
 
Steven
Guest
Posts: n/a
 
      25th Feb 2004
Dominique,

Thanks for your answer!
That does solve the problem, but partially...
The indeterminate-state can still be selected/checked,
but when focus moves away from the checkbox,
a message appears that announces that the value is
incorrect and will be corrected.

So the AllowDBNull restricts the field from getting
a Null-value, but doesn't prevent the user from setting
the checkbox to the indeterminate-state...

How can this (checkbox ThreeState) be disabled?

Thanks! Steven

"Dominique Vandensteen" <domi.vds_insert@tralala_tenforce.com> schreef in
bericht news:euchfGu%(E-Mail Removed)...
> set the AllowDBNull property of the DataColumn to false
>
>
> Dominique
>
>
> "Steven" <(E-Mail Removed)> wrote in message
> news:%23FLMaRt%(E-Mail Removed)...
> > How can I disable the ThreeState of a checkbox in a datagrid datacolumn
> > (dataset)?
> >
> > Because of the ThreeState the checkboxes in my datagrid can be in the

> states
> > 'Checked', 'Unchecked', and 'Indeterminate' (checked + shaded).
> > I want to prevent the checkbox (datacolumn) from getting this last

state.
> >
> > How can this be done??
> >
> > Thanks! Steven



 
Reply With Quote
 
Dominique Vandensteen
Guest
Posts: n/a
 
      25th Feb 2004
maybe try to set allownull property of the columnstyle
(datagridboolcolumn)




"Steven" <(E-Mail Removed)> wrote in message
news:OHlbQW7%(E-Mail Removed)...
> Dominique,
>
> Thanks for your answer!
> That does solve the problem, but partially...
> The indeterminate-state can still be selected/checked,
> but when focus moves away from the checkbox,
> a message appears that announces that the value is
> incorrect and will be corrected.
>
> So the AllowDBNull restricts the field from getting
> a Null-value, but doesn't prevent the user from setting
> the checkbox to the indeterminate-state...
>
> How can this (checkbox ThreeState) be disabled?
>
> Thanks! Steven
>
> "Dominique Vandensteen" <domi.vds_insert@tralala_tenforce.com> schreef in
> bericht news:euchfGu%(E-Mail Removed)...
> > set the AllowDBNull property of the DataColumn to false
> >
> >
> > Dominique
> >
> >
> > "Steven" <(E-Mail Removed)> wrote in message
> > news:%23FLMaRt%(E-Mail Removed)...
> > > How can I disable the ThreeState of a checkbox in a datagrid

datacolumn
> > > (dataset)?
> > >
> > > Because of the ThreeState the checkboxes in my datagrid can be in the

> > states
> > > 'Checked', 'Unchecked', and 'Indeterminate' (checked + shaded).
> > > I want to prevent the checkbox (datacolumn) from getting this last

> state.
> > >
> > > How can this be done??
> > >
> > > Thanks! Steven

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
treeview with checkbox with ThreeState Ohad Young Microsoft Dot NET Framework Forms 0 1st Dec 2005 03:52 PM
binding datacolumn to another datacolumn in a datagrid bpdace Microsoft C# .NET 0 23rd Nov 2005 03:59 PM
Master-Detail Datagrid -checkbox (once tick the checkbox, all the child checkbox is ticked) Agnes Microsoft VB .NET 0 16th Aug 2004 11:23 AM
CheckBox - KeepText enabled when disabling input of CheckBox? =?Utf-8?B?RXZlbHluZQ==?= Microsoft C# .NET 1 7th Apr 2004 06:36 PM
Why don't DataGrid Use DataColumn.Caption madhu Microsoft ADO .NET 0 8th Nov 2003 07:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:37 PM.