The custom checkbox of the column header of the webgrid can select all columns ?

8 replies. Last post: August 26, 2011 12:14 AM by xu guochun
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
xu guochunMember

Hi,

    In the Webgrid , there is a column of checkbox , and the header of this column is combine the column name  with a checkbox . Through executing the following javascript code:

 function SelectAllColumn(obj) {
   var grid = ISGetObject("<%=WG1.ClientID %>");
            var index = obj.name.split('_');
            var arr = $("#tb_ctl00_ContentPlaceHolder1_WG1_").find("tr").find("input:eq(" + index[0] + ")");
            for (i = 0; i < arr.length; i++) {
                arr[i].checked = obj.checked;
            }
        }

when I click the checkbox of the column header , all checkboxs of this column will  be selected . But when I execute some operations , for example  delete or save , there will be a alert " You donot make any changes!" , and these operations will not be executed .

    there is a example in the attach file . when I select the checkbox of the column header , all checkboxs of this column will be selected ,but the icon colors of accepting all changes or canceling all changes in the footer of the webgrid  is gray . It indicate there is not any changes!

  Anyone can help me ? Thanks !

All times are GMT -5. The time now is 7:18 PM.
Previous Next