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
20
UltraWebGrid Header click cause a postback when sorting is onClient
posted

I am new using UltraWebGrid control.

I am using UltraWebGrid control in ASPX page with master page in a Web application project. I set control AllowSortingDefault="OnClient" HeaderClickActionDefault="SortSingle". When click on the column header, the client side sorting is performed, but follow by a postback of the page, which will load the initial page. How do I stop this postback. I thought the sort should be purely client side. Basically I want the grid sorted at client side without postback. I tried set the property in code behind page, but has no luck. Any advise is appreciated. Thanks

Following is code snapshot,

ASPX:

<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.2, Version=7.2.20072.61, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"

Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>

.... 

<igtbl:UltraWebGrid ID="grdStdReport" runat="server" Browser="Xml" Width="100%" >

<Bands>

<igtbl:UltraGridBand>

 

</igtbl:UltraGridBand>

</Bands>

<DisplayLayout ViewType="OutlookGroupBy" Version="4.00"

AllowSortingDefault="OnClient" StationaryMargins="Header" AllowColSizingDefault="Free"

AllowUpdateDefault="Yes" StationaryMarginsOutlookGroupBy="true" HeaderClickActionDefault="SortSingle"

Name="grdStdReport" BorderCollapseDefault="Separate" AllowColumnMovingDefault="OnClient"

AllowDeleteDefault="Yes" RowSelectorsDefault="No" tableLayout="Fixed" RowHeightdefault="20px"

SelectTypeRowDefault="Extended" >

<GroupByBox >

<BoxStyle BackColor="LightGray" >

</BoxStyle>

</GroupByBox>

 

<GroupByRowStyleDefault BorderColor="Window" BackColor="Control" HorizontalAlign="Left"></GroupByRowStyleDefault>

<ActivationObject BorderColor="" BorderWidth="">

</ActivationObject>

<HeaderStyleDefault Wrap="true" HorizontalAlign="center" BackColor="#EDE3C7" CssClass="ms-InfraGridHeader" ></HeaderStyleDefault>

<FooterStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">

<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="LightGray"></BorderDetails>

</FooterStyleDefault>

<RowStyleDefault BorderWidth="1px" BorderColor="Silver" BorderStyle="Solid" CssClass="ms-InfraGrid" >

<BorderDetails ColorTop="Window" ColorLeft="LightGray"></BorderDetails>

<Padding Left="5px" Bottom="5px" Right="5px" Top="3px"></Padding>

</RowStyleDefault>

</DisplayLayout>

</igtbl:UltraWebGrid>

 

The columns are auto generated based on the datatable. Datatable is queried from database and bonded to grid in page load event.  Code as following is added to control InitializeLayout and preRender event too

grdStdReport.DisplayLayout.AllowSortingDefault = Infragistics.WebUI.UltraWebGrid.AllowSorting.OnClient

grdStdReport.DisplayLayout.HeaderClickActionDefault = Infragistics.WebUI.UltraWebGrid.HeaderClickAction.SortSingle

 

  • 435
    posted

    Try removing the server-side sort event handler. It looks like this overrides the client sorting option. I was having the same problem on one page but not another and the difference was a lack of server-side event handler.