Click here to Skip to main content
16,004,761 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem with Cookies Enabled detection Pin
chandu_shar12-Jul-07 0:21
chandu_shar12-Jul-07 0:21 
Questiondisable all DataGridViewRowHeaderCell glyphs Pin
agent32711-Jul-07 22:37
agent32711-Jul-07 22:37 
QuestionProblems with configuring .Net hosted control Pin
drweb8611-Jul-07 22:24
drweb8611-Jul-07 22:24 
Questionradiobutton BeforeStateChange ? Pin
fracalifa11-Jul-07 22:20
fracalifa11-Jul-07 22:20 
AnswerRe: radiobutton BeforeStateChange ? Pin
Martin#11-Jul-07 22:32
Martin#11-Jul-07 22:32 
AnswerRe: radiobutton BeforeStateChange ? Pin
Luc Pattyn11-Jul-07 23:48
sitebuilderLuc Pattyn11-Jul-07 23:48 
GeneralRe: radiobutton BeforeStateChange ? Pin
Martin#12-Jul-07 0:05
Martin#12-Jul-07 0:05 
GeneralRe: radiobutton BeforeStateChange ? [modified] Pin
fracalifa12-Jul-07 0:32
fracalifa12-Jul-07 0:32 
Hi Luc,

you are right, sorry, I override the onclick event and created an own event called checkBeforeChange like this

protected override void OnClick(EventArgs e)    <br />
{       <br />
        if(this.BeforeStateChange != null)<br />
        {<br />
            this.BeforeStateChange(this, ref cancelStateChg);<br />
        }<br />
        if(this.cancelStateChg)<br />
        {           <br />
            this.Checked = !this.Checked;<br />
        }       <br />
        base.OnClick (e);<br />
}<br />


this code is working on a checkbox, but not on a radiobutton.

I would use enable=true/false but the bad is the color change to gray. If I could prevent the colorchange, everything would be fine.

Frank


-- modified at 6:37 Thursday 12th July, 2007
GeneralRe: radiobutton BeforeStateChange ? Pin
Luc Pattyn12-Jul-07 0:36
sitebuilderLuc Pattyn12-Jul-07 0:36 
GeneralRe: radiobutton BeforeStateChange ? Pin
fracalifa12-Jul-07 0:40
fracalifa12-Jul-07 0:40 
JokeRe: radiobutton BeforeStateChange ? Pin
Luc Pattyn12-Jul-07 1:44
sitebuilderLuc Pattyn12-Jul-07 1:44 
AnswerRe: radiobutton BeforeStateChange ? Pin
ruanr12-Jul-07 0:23
ruanr12-Jul-07 0:23 
AnswerRe: radiobutton BeforeStateChange ? Pin
Martin#12-Jul-07 0:39
Martin#12-Jul-07 0:39 
GeneralRe: radiobutton BeforeStateChange ? Pin
fracalifa12-Jul-07 1:07
fracalifa12-Jul-07 1:07 
GeneralRe: radiobutton BeforeStateChange ? Pin
Martin#12-Jul-07 1:11
Martin#12-Jul-07 1:11 
GeneralRe: radiobutton BeforeStateChange ? Pin
fracalifa12-Jul-07 1:18
fracalifa12-Jul-07 1:18 
GeneralRe: radiobutton BeforeStateChange ? Pin
Martin#12-Jul-07 1:40
Martin#12-Jul-07 1:40 
Questioncreating a custom editor Pin
KaleoDev11-Jul-07 21:38
KaleoDev11-Jul-07 21:38 
AnswerRe: creating a custom editor Pin
Bekjong12-Jul-07 0:03
Bekjong12-Jul-07 0:03 
GeneralRe: creating a custom editor Pin
KaleoDev12-Jul-07 1:52
KaleoDev12-Jul-07 1:52 
GeneralRe: creating a custom editor Pin
Bekjong12-Jul-07 1:59
Bekjong12-Jul-07 1:59 
GeneralRe: creating a custom editor Pin
KaleoDev12-Jul-07 2:13
KaleoDev12-Jul-07 2:13 
QuestionProblem with Timer object Pin
alashara11-Jul-07 21:22
alashara11-Jul-07 21:22 
AnswerRe: Problem with Timer object Pin
Martin#11-Jul-07 21:32
Martin#11-Jul-07 21:32 
GeneralRe: Problem with Timer object Pin
alashara11-Jul-07 23:13
alashara11-Jul-07 23:13 

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.