cancel
Showing results for 
Search instead for 
Did you mean: 

Checkbox - implementing client side check all...

Former Member
0 Kudos

Hi Everyone !

I need to implement a screen with checkboxes, and a "check all" checkbox.

Expected behavior: when you click the "check all", all the other checkboxes are selected - this should happen in client-side ( like in web mails - yahoo, gmail..) - I do not want to post a request to server.

If you know how to do this, please let me know.

Many Thanks,

Silvio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Why is it important that it happens client-side? Has this any meaning for you application?

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hai,

You can add a method to checkbox toggleAction, in that action method just true the all values of checkboxes you need to check.

regards,

chintan_virani
Active Contributor
0 Kudos

Code snippet for above solution:-



int intSize = wdContext.node<context where you have data>.size();
    
if(wdContext.currentContextElement().get<Context for Check All option>()) 
{
  for (int i = 0; i < intSize; i++)
   {
      wdContext.node<context where you have data>().get<context where you have data>ElementAt(i).set<context of individual check box>(true);
   }
}


former_member182372
Active Contributor
0 Kudos

Hi Silvio,

Unfortunately you can not create clinet-side event handlers. So, the only option is to use server roundtrip and set appropriate context value in action handler.

Best regards, Maksim Rashchynski.