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.
|