﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Fri, 26 Aug 2011 00:14:25 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;Hello Riendy , &lt;/p&gt;
&lt;p&gt;   Thank you very much ! The method you provided is right !&lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Thu, 25 Aug 2011 03:44:04 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hello Xu,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;First of all, sorry for the wrong sample that I attached. Yesterday, I have not tried until accepting all changes. So, I also get that issue here. &lt;br /&gt;I have provided a solution using this snippet code:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&lt;span style="color: rgb(63, 63, 63); line-height: 18px; white-space: pre-wrap; "&gt;function SelectAll(obj)&lt;/span&gt;      
      var grid = ISGetObject("WebGrid2");
      for (i = 0; i &amp;lt; grid.TotalLoadedRows; i&amp;#43;&amp;#43;) {
          var row = grid.RootTable.GetRow(i);
          var cell = row.GetCells()[3];
          cell.SetValue(true, true);
          cell.ActivateEdit();
          grid.MarkEdit();
          grid.ExitEdit(1, 0, 0);
       }
}&lt;/pre&gt;
&lt;p&gt;Attached in my simple runable sample. In this sample I also show you how to un-check all checkBox.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Please let me know whether the issue still exist, or if there is another issue.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Wed, 24 Aug 2011 10:09:21 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 11pt"&gt;Hello Riendy , &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt"&gt;&amp;nbsp;&amp;nbsp; Thank you for your reply ! Are you sure the sample file you provided is correct ? I find the sample only have WebComb and ISDataSource , and it is&amp;nbsp;not the same as the sample I have provided . &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt"&gt;&amp;nbsp;&amp;nbsp; Besides , I have tried the method you put forward . When I click the checkbox of the header column and select all checkboxs of this column , I click the icon of accepting all changes&amp;nbsp; in the footer of the webgrid&amp;nbsp;, then an unhandled exception occur . It said "To analyse in this string ,&amp;nbsp; it must specify effective information" . &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;   &lt;span style="font-size: 11pt"&gt;Can you give me an integrity sample ?&amp;nbsp; When I click the checkbox of the header column and select all checkboxs of this column , then I can click the buttons of WebToorbar and execute some operations , such as add or delete or save&amp;nbsp;. Then I can do my work referring to&amp;nbsp;your sample .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;span style="font-size: 11pt"&gt; Thank you very much !&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Wed, 24 Aug 2011 00:19:08 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hello Xu,&lt;br /&gt;&lt;br /&gt;Actually there is no bug with your issue. At the beginning I've told you that you have to add &lt;span style="color: rgb(63, 63, 63); font-family: 'courier new', tahoma; font-size: 12px; line-height: 18px; white-space: pre-wrap; background-color: rgb(255, 252, 225); "&gt;UpdatePendingChangesStatus().&lt;/span&gt; I'm sorry because I missed a method to add the pending changes. It is   AddPendingChanges() method. I have created the snippet code based on your scenario. Here is the snippet code: &lt;/p&gt;&lt;p /&gt;&lt;pre&gt;  function SelectAll(obj) {
            var grid = ISGetObject("WebGrid1");
            for (i = 0; i &amp;lt; grid.TotalLoadedRows; i&amp;#43;&amp;#43;) {
                grid.RootTable.GetRow(i).GetCells()[0].SetValue(1, true);
                grid.RootTable.GetRow(i).AddPendingChanges();
                grid.UpdatePendingChangesStatus();
            }
        }&lt;/pre&gt;
&lt;p&gt;I also have modified your simple runable sample to reproduce in WebGrid's sample easilly. Attached is a sample file.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Best Regards.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'courier new', tahoma; font-size: 12px; line-height: 18px; white-space: pre-wrap; background-color: rgb(255, 252, 225); " /&gt;&lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Tue, 23 Aug 2011 03:11:20 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 11pt"&gt;Hello&amp;nbsp;Riendy ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;   &lt;span style="font-size: 11pt"&gt;Thank you for your help . I want to know whether there is the newest development about the&amp;nbsp;issue I put forward . Because I have to use the&amp;nbsp;function that I have raised in my project , I am looking forward to your respond eagerly . &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;  &lt;span style="font-size: 11pt"&gt;Thanks a lot !&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Fri, 19 Aug 2011 15:10:45 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hi Xu,&lt;br /&gt;&lt;br /&gt;I'm still investigate your issue. I will let you know as soon as possible about this issue. This issue might be a bug.&lt;/p&gt;&lt;p&gt;Anyway, to initialize WebGrid, I suggest you to use ISGetObject. So, you are able to use our method, such as UpdatePendingChangeStatus. For example : &lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;var grid = ISGetObject("WebGrid1");&lt;/pre&gt;
&lt;p&gt;Regards.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Fri, 19 Aug 2011 02:49:20 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 11pt"&gt;Hello Riendy,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Firstly , thanks for your reply and help . I have tried to use the two methods you recommended ,but there is not any changes at all . when I&amp;nbsp;select the&amp;nbsp;checkbox of the column header , all checkboxs of this column will be selected , but the icon colors of accepting all changes or&amp;nbsp;undoing all changes in the footer of the webgrid&amp;nbsp; is gray . I think this indicate I did not make any changes in this webgrid .&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 11pt"&gt;&amp;nbsp;&amp;nbsp; In the attachment file , there is a simple example based on the live example of Intersoft Solutions . So can you help me to solve&amp;nbsp;this problem ? I will be very grateful !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Thu, 18 Aug 2011 14:45:53 GMT</pubDate><dc:creator>Riendy</dc:creator><description>&lt;p&gt;Hello Xu,&lt;br /&gt;&lt;br /&gt;I am able to replicate your issue on my end. I think you should to add 1 line of code to syncdhronize pending changes with grid's user interface elements. Please add this snippet code to your SelectAllColumn method.&lt;/p&gt;&lt;p /&gt;&lt;pre&gt;grid.UpdatePendingChangesStatus();&lt;/pre&gt;
&lt;p&gt;You can also add the snippet code above to OnCheckBoxClick WebGrid's clientSide Event to do same response when some checkBox clicked.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;br /&gt;Riendy&lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>The custom checkbox of the column header of the webgrid can select all columns ?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/The-custom-checkbox-of-the-column-header-of-the-webgrid-can-select-all-columns-/</link><pubDate>Wed, 17 Aug 2011 05:23:42 GMT</pubDate><dc:creator>gavin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;    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:&lt;/p&gt;&lt;pre&gt; function SelectAllColumn(obj) {
   var grid = ISGetObject("&amp;lt;%=WG1.ClientID %&amp;gt;");
            var index = obj.name.split('_');
            var arr = $("#tb_ctl00_ContentPlaceHolder1_WG1_").find("tr").find("input:eq(" &amp;#43; index[0] &amp;#43; ")");
            for (i = 0; i &amp;lt; arr.length; i&amp;#43;&amp;#43;) {
                arr[i].checked = obj.checked;
            }
        }&lt;/pre&gt;
&lt;p&gt;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 .&lt;/p&gt;
&lt;p&gt;    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!&lt;/p&gt;
&lt;p&gt;  Anyone can help me ? Thanks !&lt;/p&gt;</description></item></channel></rss>