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
close icon

Checkbox loses attributes in grid when other actions take place

We have a grid where we want to be able to select rows and run reports, so I used templateId to add a checkbox in the first column, and" $(".engineSelect").ejCheckBox();" to add the syncfusion checkbox attributes. Well, the checkbox works great and we can run reports, UNLESS I group, sort, or edit anything in the grid. When I do that, the checkbox loses it's syncfusion attributes and styles and won't work to run the reports anymore. 

Can you help me understand what's going on here and why it loses these attributes after running other functions in the grid? 



Attachment: screenshots_of_gridbefore_and_after_f45a9590.zip

1 Reply

MF Mohammed Farook J Syncfusion Team October 17, 2014 11:27 AM UTC

Hi Mark,

 

Thanks for using Syncfusion products.

 

We have analyzed your requirement, We glad to achieve your requirement by using ”actionComplete” event. Please find the code snippet.

 

 

 

<script type="text/x-jsrender" id="columnTemplate">

        <input type="checkbox" class="nodetext" id={{:EmployeeID}} />

    </script>

 

    <div id="Grid"></div>

    <script type="text/javascript">

 

        $(function () {

            $("#Grid").ejGrid({

                dataSource: window.gridData,

                actionComplete:"actionComplete",

                columns: [

                        { headerText: "Checkbox", template: true, templateID: "#columnTemplate", textAlign: "center", width: 75 },

                       

                ]

            });

 

          

        });

        function actionComplete() {

            $(".nodetext").ejCheckBox({ size: "medium", enableTriState: true });

 

         

        }

 

    </script>

 

For your convenience we have created a sample and the same can be downloaded from the link.

 

Sample Location:

 

http://www.syncfusion.com/downloads/support/directtrac/130867/WebSite121150853528.zip

 

Please let us know if you have any queries.

 

Regards,

J.Mohammed Farook

 


Loader.
Live Chat Icon For mobile
Up arrow icon