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
UltraWinGrid select all checkbox in column header
posted

Hi,

Can someone tell me how to provide a Select All checkbox column in UltraWinGrid.

Thanks in advance.

Cheers

Rajesh

  • 10
    posted

    add  <ClientSideEvents ColumnHeaderClickHandler="UltraWebGrid1_ColumnHeaderClickHandler" /> to </DisplayLayout>

    add an keyid for the column,

     <igtbl:UltraGridColumn HeaderText="Check" Width="50px" AllowUpdate="Yes" Type="CheckBox" Key="chk1" SortIndicator="Disabled"
                                >
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                                <Footer>
                                </Footer>
                                <Header  Caption="Check">
                                </Header>
                            </igtbl:UltraGridColumn>

    hook up the same with javascript

      function UltraWebGrid1_ColumnHeaderClickHandler(gridName, columnId, button) {

                //Add code to handle your event here.

                var myCol = igtbl_getColumnById(columnId);
              

                if (myCol.Key == "chk1") {

                    var myGrid = igtbl_getGridById(gridName);

                    for (i = 0; i < myGrid.Rows.length; i++) {
                       
                        if (myGrid.Rows.getRow(i).getCellFromKey("chk1").getValue() == "1") {
                            myGrid.Rows.getRow(i).getCellFromKey("chk1").setValue(0);
                        }
                        else {
                            myGrid.Rows.getRow(i).getCellFromKey("chk1").setValue(1);
                        }
                    }

                   
                }

        }

  • 6158
    Offline posted

    Hi Rajesh,

    While the previously provided article is still valid, it is a little out of date. Since that article was written, we have added this functionality directly to the UltraGrid as part of our NetAdvantage 2009 Volume 1 release.

    This help article should assist you in activating this functionality.

    Let me know if  you need further assistance.

    Chris.

  • 419
    posted

    The knowledge base article might be what you need. good luck

    http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4883