Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Checkbox column and checkbox in column header in ultrawebgrid
posted

Hi,

I have created a templated column and a templated column header. Here is the code snippet:

   <igtbl:ultrawebgrid>
   <Bands>
    <igtbl:UltraGridBand key="ugb1">
     <Columns>
      <igtbl:TemplatedColumn Key="check" Type="CheckBox" AllowUpdate="Yes">
             <HeaderTemplate>
                  <input id="chkSelectAll" name="SelectAll" type="checkbox" onclick="chkSelectAll_CheckedChanged" AutoPostBack="true"  />
             </HeaderTemplate>
       </igtbl:TemplatedColumn>
     </Columns>
   </igtbl:UltraGridBand>
  </Bands>
 </igtbl:ultrawebgrid>

The ultrawebgrid shows a column containing checkboxes, and the header of the same column contains a checkbox. 
I want a c# function chkSelectAll_CheckedChanged, which is called when the checkbox in header column is clicked.
It should select all the checkboxes in all the rows, if they are not already selected(i.e. if only some or none of them are selected). And if all of them are selected, it should deselect them.

I am using .net 4.0 framework.

Please help with the c# code which that function should contain.

Parents
No Data
Reply
  • 5
    posted

    HELLO ,

    Can anyone please provide me with a code that takes the value of checked rows as I require to do a delete operation on selected/checked rows in UltraGrid.

    Thanks In advance.

Children
No Data