Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to force CheckedChanged method to fire?

Reply
Thread Tools

How to force CheckedChanged method to fire?

 
 
K Viltersten
Guest
Posts: n/a
 
      10-11-2009
I have a set of checkboxes and i'd like to make
some of them to get automatically checked, upon
checking of others.

Example:

If the user checks A1, then A should be checked
in as well.

A
A1
A2

I've solved it using the event CheckedChanged.
However, the problem is that the programmatical
checking of A, doesn't fire the method.

This causes a problem if i have a deeper
hierarchy of checkboxes, as shown below. Hints?

A
A1
A1a
A2

--
Regards
K Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.

 
Reply With Quote
 
 
 
 
harborsparrow
Guest
Posts: n/a
 
      10-12-2009


this.chkboxA.Checked = true;

this.chkboxA_CheckedChanged(
this,
new EventArgs()); // force the change event to
fire


And, make sure you have registered the "CheckedChanged" event


On Oct 11, 3:27*pm, "K Viltersten" <t...@viltersten.com> wrote:
> I have a set of checkboxes and i'd like to make
> some of them to get automatically checked, upon
> checking of others.
>
> Example:
>
> If the user checks A1, then A should be checked
> in as well.
>
> * *A
> * * *A1
> * * *A2
>
> I've solved it using the event CheckedChanged.
> However, the problem is that the programmatical
> checking of A, doesn't fire the method.
>
> This causes a problem if i have a deeper
> hierarchy of checkboxes, as shown below. Hints?
>
> * *A
> * * * A1
> * * * * *A1a
> * * * A2
>
> --
> Regards
> K Viltersten
> ----------------------------------------
> May all spammers die an agonizing death;
> have no burial places; their souls be
> chased by demons in Gehenna from one room
> to another for all eternity and beyond.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Nike air force one, air force 1, air force one low cut, air force one salewholeta@163.com Digital Photography 3 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57