Post by solushunz12 on Sept 20, 2011 0:08:45 GMT -5
every second the grid view data is updating from xml file in my application. and all the
xml file data changing continuously.
<div>
<asp:UpdatePanel ID="uptpnlGridView" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<div style="overflow: auto">
<asp:GridView ID="gridview" runat="server" Font-Size="Medium"
Font-Names="Calibri"
Height="20px" ToolTip="Real-Time Data" CellSpacing="1"
Width="200px" HorizontalAlign="Center"
ForeColor="#333333" CellPadding="4"
OnPageIndexChanging="gridview_PageIndexChanging"
AllowPaging="True"
PageSize="5">
<PagerSettings PageButtonCount="20"></PagerSettings>
<RowStyle BackColor="#C0C0FF" Font-Bold="True"
Font-Size="Small" ForeColor="#333333"
Width="200px"></RowStyle>
<EmptyDataRowStyle Font-Bold="True"
Font-Size="Small"></EmptyDataRowStyle>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White"></FooterStyle>
<PagerStyle HorizontalAlign="Center" Wrap="True"
BackColor="#284775" ForeColor="White">
</PagerStyle>
<SelectedRowStyle BackColor="#C0C0FF" Font-Bold="True"
Font-Names="Calibri" Font-Size="Small"
ForeColor="#333333"></SelectedRowStyle>
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
Font-Size="Small" ForeColor="White">
</HeaderStyle>
<EditRowStyle BackColor="Silver" Font-Size="Small"
Font-Underline="False"></EditRowStyle>
<AlternatingRowStyle BackColor="White" Font-Bold="True"
Font-Names="Calibri" Font-Size="Small"
ForeColor="#284775"></AlternatingRowStyle>
</asp:GridView>
</div>
<asp:Timer ID="timer"
runat="server" Interval="1000"
OnTick="timer_Tick">
</asp:Timer>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="timer" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>