I have a checkbox field in the grid. I want to do a "checkall/uncheck all". I implemented it but it is slow. Can you please help me? Is there a batch setCellValue?
Hello Salim Fayad,
Thank you for the information and the jsFiddle!
Some of the time that is taken is in searching for the correct row element in the grid. This can be sped up by passing a 4th argument to the setCellValue method since you already know which element will be needed. In your fiddle, you can pass "rows[i]" as this argument.
You also do not need to call startEdit and endEdit if you are setting values programatically. These methods are meant to trigger edit mode in the UI.
I have modified your fiddle with my suggestions and you can see it here: http://jsfiddle.net/ig_mharrington/rto007qv/4/
There is still a slight delay but it's about twice as fast. If you have any further questions or concerns with this, please let me know.
Kind find my answers:
1. The slowness is on the latest version of Chrome
2. We have 500 rows in the grid without pagination
3. the autoCommit is set to false
4. we are using local javascript datasource
5. Please check this example:http://jsfiddle.net/rto007qv/3/
6. There is no response from the server, this is purely client side
Check this example where you could see a small delay when you click on the button. http://jsfiddle.net/rto007qv/3/
Thanks
Thank you for posting in our forums!
There is no batch setCellValue type of method. Batch updating configuration is defined by the igGrid's autoCommit option. I would like to know a little more about how slow this is performing for you. Please answer the following questions for me so I may have a better understanding of the scenario.
1. What browser and version are you experiencing this slowness on?2. How many rows do you have in the grid?3. What do you have the igGrid's autoCommit option set to?4. Are you using a remote datasource, or a local javascript datasource?5. What other options/features do you have enabled on the igGrid?6. Is the cause of the slowness coming from waiting on a response from the server for each time you call setCellValue or just from looping through each row on the client?
Looking forward to hearing from you.