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
131
Select All Checkbox Template Second Band
posted

Anyone can help on the following post?

Hello I have a Hierarchial UltraWebGrid with the second Band containing TemplatedColumn - with checkboxes. I'm trying to check all the checkboxes in the rows when the header checkbox is cheked.

can anyone help with the client side code.

i tried using the following :

 

function SelectAll(colIndex) { 

//Selects all checkboxes in the grid

 

//var checked = cbSelectAll.checked;

for (i = 0; i < oGrid.Rows.length; i++) { true);

 

alert(oGrid.Row.getRow(i));

oGrid.Rows.getRow(i).getCell(colIndex).setValue(

but I feel like i;m not geting the child rows.

Thanks,

Genti

<igtbl:UltraWebGrid ID="grdData" runat="server" Browser="Xml" CaptionAlign="Top" Height="610px" Width="918px">

<Bands>

<igtbl:UltraGridBand AllowSorting="No" Indentation="0" IndentationType="Indented" RowSelectors="No" RowSizing ="Free">

      <AddNewRow View="NotSet" Visible="NotSet"></AddNewRow>

</igtbl:UltraGridBand>

<igtbl:UltraGridBand>

 

<Columns>

 

<igtbl:TemplatedColumn Key="selItem" Type="CheckBox" AllowUpdate="Yes"> 

<HeaderTemplate>

     <input id="cbSelectAll" name="cbSelectAll" type="checkbox" onclick="SelectAll(1)" /> 

</HeaderTemplate>

 <

/igtbl:TemplatedColumn>

 

</Columns> 

</igtbl:UltraGridBand>

</Bands> 

Parents
  • 40
    posted

    Hi, gentis I get the same problem, do you get some solution for this? i try to select the checks on band(1) but I define the band(1) from code-behind

    If Me.grdProcIncr.Bands(1).Columns.Exists(cCol.Key) = False Then
       Me.grdProcIncr.Bands(1).Columns.Insert(0, cCol)
       Me.grdProcIncr.Bands(1).Columns.Item("0").Width = System.Web.UI.WebControls.Unit.Pixel("20") 
       Me.grdProcIncr.Bands(1).Columns.Item("0").AllowUpdate =
       Infragistics.WebUI.UltraWebGrid.AllowUpdate. Yes
    End If

    Do you know how to get the rows of band(1) with javascript???

    function SelectAll(colIndex) {
         var checked = cbSelectAll.checked;
        //var rows;
        alert(oGrid.Rows.length);
        for (i = 0; i < oGrid.Rows.length; i++) {
              oGrid.Rows.getRow(i).getCell(1).setValue(checked);
              //rows = oGrid.Rows.getRow(i).getChildRows();
             //rows.getCell(colIndex).setValue(checked);
         }
    } ///End of Header Select All functionality

    regards.

Reply Children
No Data