Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Ordering Grid View Web Part

$
0
0

We are working on a Web Part project that consists of a grid view that has brought information of a DataTable. After the user sets the parameters the Grid is displayed
To enable sorting grid, it calls a method that organizes information according to the selected column.
The problem is that randomly, when the column header is clicked sometimes it calls directly PostBack and all information on the page is lost.
This problem occurs in Firefox and Chrome. On IE work very well.


Below is the aspx GridView

 

<asp:Timer ID="timerGrid" runat="server" ontick="timerGrid_Tick"></asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="timerGrid" EventName="Tick" />
    </Triggers>
    <ContentTemplate>
        <asp:GridView ID="grdNotificacao" runat="server" EnableViewState="true" CellPadding="3" OnRowDataBound="grdRowDataBound"
      AllowSorting="True" OnSorting="grdSorting" BorderStyle="Solid">
    <HeaderStyle BackColor="#CCCCCC" />
    <SortedAscendingCellStyle BackColor="Yellow" />
    <SortedDescendingCellStyle BackColor="Yellow" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>