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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Checkbox loses attributes in grid when other actions take place

Thread ID:

Created:

Updated:

Platform:

Replies:

117420 Oct 16,2014 10:20 PM UTC Oct 17,2014 11:27 AM UTC JavaScript 1
loading
Tags: ejGrid
Mark Wells
Asked On October 16, 2014 10:20 PM UTC

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

Mohammed Farook J [Syncfusion]
Replied On 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

 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;