My gridview is inside an updatepanel, the gridview is not showing the updated data for some reason. Am i missing something? my code looks like the other examples i have found.
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateSelectButton="True" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" ColumnName="test" CssClass="auto-style14" EnableViewState="false" Font-Size="Medium" HorizontalAlign="Left" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" Width="1010px">
<Columns>
<asp:ButtonField Text="Details" />
</Columns>
<FooterStyle BackColor="White" ForeColor="#000066" />
<HeaderStyle BackColor="#006699" BorderStyle="Solid" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#007DBB" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#00547E" />
<RowStyle HorizontalAlign="Center" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
CS:
}
GridView1.DataSource = visualDataTable;
GridView1.DataBind();
UpdatePanel1.Update();
}
visualDataTableis empty. - dvo