We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How can I count checked checkbox in grid view?

Hello.


Can I get some example for grid view with checkbox?

I want to count the number of checked checkboxes... :) 


3 Replies 1 reply marked as answer

SI Sim January 28, 2023 03:30 PM UTC

Hi there! Sure, I can help you with that. You can use the "count" function in Livecode to count the number of checked checkboxes in a grid view. Here is an example of how to do it:


1. Create a grid view with checkboxes.

2. Add a button to the grid view that will run the count function.

3. In the button action, use the count function to count the number of checked checkboxes in the grid view.

4. The result of the count function will be the number of checked checkboxes in the grid view.


I hope this helps. Let me know if you have any other questions. :)


Marked as answer

SO soob replied to Sim January 30, 2023 10:56 AM UTC

Hi, Sim.

Thanks for your reply! :^D


First of all, sorry for my poor understanding... :(

I have an additional question. Is that okay?


I followed your advice and made it like this. (left out stuff not necessary for this question...)


columns: [

{ type: 'checkbox' },

{ field: 'Id', isPrimaryKey:true },

{ field: 'Name' },

...

],


This produced a nice table, but I have a problem here...

I want the number of checkboxes to count automatically... like this.

(I didn't think I could explain it well, so I drew a picture.)




What should I do next in this situation?

some additional explanation is needed... &-|




SO soob replied to Sim January 31, 2023 05:58 AM UTC

Ooops.... 


My understanding was completely wrong. :( !!!!!

I tried re-reading what you sent me and solved the problem.


Thx :^D !!!!!!!! 



Loader.
Live Chat Icon For mobile
Up arrow icon