Search code examples
c#asp.netgridviewobout

How to display new record database table in the Grd View without postback


My current project is CRM based project, all the customer queries are stored in table.

All those records we are displaying in obout grid. To see the new query(new record) every time we are refreshing the entire page . Is their any way to show the new records with out postback

As the same functionality for mail inbox , when we receive the new mail it just show in out inbox without any post back . how to achieve this..

Thank You.


Solution

  • Have you tried use an Update Panel?

    <asp:ScriptManager runat="server" />
    
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
           <obout:Grid id="grid1" runat="server"  CallbackMode="false" ... />
           <asp:Timer runat="server" id="Timer1" Interval="10000" OnTick="Timer1_Tick"></asp:Timer>
        </ContentTemplate>
    </asp:UpdatePanel>
    

    If the grid already exists, will be the easier solution to you. More information http://www.asp.net/web-forms/tutorials/aspnet-ajax

    To automatically refresh your update panel, put a Timer control inside the update panel and set the Interval property with the time in milliseconds you want the Grid refreshed.