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
1284
Disable sorting when Checkbox on ColumnHeader is changed
posted

Hi

  I am working on a .NET 1.1 application using Ultraweb grid. I have a checkbox on the columnHeader of a column. When i check the check box in the ColumnHeader, all the check boxes in that column should be checked.

I want to disable sorting when i check/uncheck the checkbox in the header. Sorting should only happen when i click the columnHeader.

 

How to do Disable sorting when i check/Uncheck the checkbox in the columnHeader?

Code:

<igtbl:UltraGridBand>
          <columns>
           

<igtbl:TemplatedColumn AllowUpdate="Yes"  SortIndicator="Disabled"  Key="chkDel" 

Type="CheckBox" width=100%>
            

<HeaderTemplate>
            
            

<Table vAlign="top" border="0" cellspacing="0" cellpadding="0" >
            

<tr>
            

<td vAlign="top" style="FONT-WEIGHT: bold;FONT-SIZE: 12px; FONT-FAMILY: Verdana"

width=100% >&nbsp;Delete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            

</tr>
            

<tr >
            

<td vAlign="top"  style="FONT-WEIGHT: bold;FONT-SIZE: 8px; FONT-FAMILY: Verdana"

width=100%>
            

 <input type="checkbox" runat="server"  id="chkDel1"

onclick="CheckBoxSelection(this);"
            

  NAME="chkDel1" />Select All &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            

</td>
            

     
            

</tr>
            

</Table>   
            

</HeaderTemplate>
            

<Header Caption="DeleteAll"  >
            

 <RowLayoutColumnInfo OriginX="8" />
            

</Header>
            

<Footer>
            

 <RowLayoutColumnInfo OriginX="8" />
            

</Footer>
           

</igtbl:TemplatedColumn>
          </columns>
         

</igtbl:UltraGridBand>
         

Thanks

Ashok

Parents
  • 7694
    posted

    Hello,

    I am trying to reproduce the issue, unfortunately to no avail. I use the NetAdvantage 8.3 with VS 2008. When I click on header  column is  sorting but when I select checkbox no have sorting.    You  can take a look my  UltraWebGrid  setup below:

      <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" DataSourceID="SqlDataSource1"
                Height="200px" Width="325px" OnSortColumn="UltraWebGrid1_SortColumn">
                <Bands>
                    <igtbl:UltraGridBand>
                        <Columns>
                            <igtbl:TemplatedColumn BaseColumnName="ProductID" DataType="System.Int32" IsBound="True"
                                Key="ProductID">
                                <HeaderTemplate>
                                    <input type="checkbox" runat="server" id="chkDel1"  />
                                </HeaderTemplate>
                            </igtbl:TemplatedColumn>
                            <igtbl:UltraGridColumn BaseColumnName="ProductID" DataType="System.Int32" IsBound="True"
                                Key="ProductID">
                                <Header Caption="ProductID">
                                </Header>
                            </igtbl:UltraGridColumn>
                            <igtbl:UltraGridColumn BaseColumnName="ReorderLevel" DataType="System.Int16" IsBound="True"
                                Key="ReorderLevel">
                                <Header Caption="ReorderLevel">
                                    <RowLayoutColumnInfo OriginX="1" />
                                </Header>
                                <Footer>
                                    <RowLayoutColumnInfo OriginX="1" />
                                </Footer>
                            </igtbl:UltraGridColumn>
                            <igtbl:UltraGridColumn BaseColumnName="UnitsOnOrder" DataType="System.Int16" IsBound="True"
                                Key="UnitsOnOrder">
                                <Header Caption="UnitsOnOrder">
                                    <RowLayoutColumnInfo OriginX="2" />
                                </Header>
                                <Footer>
                                    <RowLayoutColumnInfo OriginX="2" />
                                </Footer>
                            </igtbl:UltraGridColumn>
                            <igtbl:UltraGridColumn BaseColumnName="UnitsInStock" DataType="System.Int16" IsBound="True"
                                Key="UnitsInStock">
                                <Header Caption="UnitsInStock">
                                    <RowLayoutColumnInfo OriginX="3" />
                                </Header>
                                <Footer>
                                    <RowLayoutColumnInfo OriginX="3" />
                                </Footer>
                            </igtbl:UltraGridColumn>
                            <igtbl:UltraGridColumn BaseColumnName="UnitPrice" DataType="System.Decimal" IsBound="True"
                                Key="UnitPrice">
                                <Header Caption="UnitPrice">
                                    <RowLayoutColumnInfo OriginX="4" />
                                </Header>
                                <Footer>
                                    <RowLayoutColumnInfo OriginX="4" />
                                </Footer>
                            </igtbl:UltraGridColumn>
                            <igtbl:UltraGridColumn BaseColumnName="CategoryName" IsBound="True" Key="CategoryName">
                                <Header Caption="CategoryName">
                                    <RowLayoutColumnInfo OriginX="5" />
                                </Header>
                                <Footer>
                                    <RowLayoutColumnInfo OriginX="5" />
                                </Footer>
                            </igtbl:UltraGridColumn>
                            <igtbl:UltraGridColumn BaseColumnName="Discontinued" DataType="System.Boolean" IsBound="True"
                                Key="Discontinued" Type="CheckBox">
                                <Header Caption="Discontinued">
                                    <RowLayoutColumnInfo OriginX="6" />
                                </Header>
                                <Footer>
                                    <RowLayoutColumnInfo OriginX="6" />
                                </Footer>
                            </igtbl:UltraGridColumn>
                        </Columns>
                        <AddNewRow View="NotSet" Visible="NotSet">
                        </AddNewRow>
                    </igtbl:UltraGridBand>
                </Bands>
                <DisplayLayout AllowColSizingDefault="Free" AllowColumnMovingDefault="OnServer" AllowDeleteDefault="Yes"
                    AllowSortingDefault="OnClient" AllowUpdateDefault="Yes" BorderCollapseDefault="Separate"
                    HeaderClickActionDefault="SortMulti" Name="UltraWebGrid1" RowHeightDefault="20px"
                    RowSelectorsDefault="No" SelectTypeRowDefault="Extended" StationaryMargins="Header"
                    StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed" Version="4.00" ViewType="OutlookGroupBy">
                    <FrameStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid"
                        BorderWidth="1px" Font-Names="Microsoft Sans Serif" Font-Size="8.25pt" Height="200px"
                        Width="325px">
                    </FrameStyle>
                    <Pager MinimumPagesForDisplay="2">
                        <PagerStyle BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                            <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                        </PagerStyle>
                    </Pager>
                    <EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
                    </EditCellStyleDefault>
                    <FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                    </FooterStyleDefault>
                    <HeaderStyleDefault BackColor="LightGray" BorderStyle="Solid" HorizontalAlign="Left">
                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                    </HeaderStyleDefault>
                    <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                        Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
                        <Padding Left="3px" />
                        <BorderDetails ColorLeft="Window" ColorTop="Window" />
                    </RowStyleDefault>
                    <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                    </GroupByRowStyleDefault>
                    <GroupByBox>
                        <BoxStyle BackColor="ActiveBorder" BorderColor="Window">
                        </BoxStyle>
                    </GroupByBox>
                    <AddNewBox Hidden="False">
                        <BoxStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="1px">
                            <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                        </BoxStyle>
                    </AddNewBox>
                    <ActivationObject BorderColor="" BorderWidth="">
                    </ActivationObject>
                    <FilterOptionsDefault>
                        <FilterDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                            CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                            Font-Size="11px" Height="300px" Width="200px">
                            <Padding Left="2px" />
                        </FilterDropDownStyle>
                        <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White">
                        </FilterHighlightRowStyle>
                        <FilterOperandDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid"
                            BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                            Font-Size="11px">
                            <Padding Left="2px" />
                        </FilterOperandDropDownStyle>
                    </FilterOptionsDefault>
                </DisplayLayout>
            </igtbl:UltraWebGrid>

    Hoep this helps.

Reply Children
No Data