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.
Unfortunately, activation email could not send to your email. Please try again.

Get Row.Record of Checkbox Template by Javascript

Thread ID:

Created:

Updated:

Platform:

Replies:

113803 Oct 10,2013 01:03 AM Oct 17,2013 08:58 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
ngatq
Asked On October 10, 2013 01:03 AM

Hi Syncfusion team!
I'm using RowBtnTemplate with Checkbox template in GridGroupingControl. Pls show me how can I get Record["mycolumnName"] of Checkbox.Cell.Row in javascript?
  <script type="text/javascript">
        function CheckAll(oData) {
            if ((oData.id.indexOf("header") != -1)) {
                var CheckBoxId = oData.id;
                var getElement = document.getElementsByTagName("input");
                for (var i = 0; i < getElement.length; i++) {
                    //Checks if the currentelement is a row
                    if ((getElement[i].id.indexOf("GridGroupingControl1~TR~0~_TOPGROUP_") != -1)) {
                        var currentCheckBoxId = getElement[i].id;

                        //get the id of the current checkbox              
                        if (document.getElementById(CheckBoxId).checked == true) {
                            document.getElementById(currentCheckBoxId).checked = true;
                        }
                        else {
                            document.getElementById(currentCheckBoxId).checked = false;
                        }
                    }
                }
            }
            else {
                var CheckBoxId = oData.id;
                var getElement = document.getElementsByTagName("input");
                for (var i = 0; i < getElement.length; i++) {
                    //Checks if the currentelement is a row
                    if ((getElement[i].id.indexOf("GridGroupingControl1~TR~0~_TOPGROUP_") != -1)) {
                        var currentCheckBoxId = getElement[i].id;                     
                        //if oData.Cell.Row.Record.GetValue("ID") == getElement[i].Cell.Row.Record.GetValue("ParentID")??????????????
                        if (document.getElementById(CheckBoxId).checked == true) {
                            document.getElementById(currentCheckBoxId).checked = true;
                        }
                        else {
                            document.getElementById(currentCheckBoxId).checked = false;
                        }

                    }
                }
            }
        }
    </script>

Thank you very much.

Shanmugaraja K [Syncfusion]
Replied On October 17, 2013 08:58 AM

Hi Ngatq,

Thanks for using syncfusion products.

We regret for the inconvenience caused.your requirement of get row record of checkbox template by javascript it is not possible on client side it takes only gridtable rows  didnot take table cells.so, we can't retrive row record in javascript.
Please let us know your concerns.

Regards,
Shanmugaraja K



checkboxaspgrid_3d0896d6.zip

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.

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.

;