Hi,
Im having some trouble with a simple Grid bound declaratively to an ObjectDataSource, on first PageLoad it works fine but after PostBack (sorting for example) the Grid goes empty as if it loses the DataSource. For testing purposes i also tried an asp:GridView and that works perfectly fine. Any Ideas on what could be the Problem?
The SelectMethod on the ObjectDataSource returns an DataSet.
Regards,
Alex
Im having some trouble with a simple Grid bound declaratively to an ObjectDataSource, on first PageLoad it works fine but after PostBack (sorting for example) the Grid goes empty as if it loses the DataSource. For testing purposes i also tried an asp:GridView and that works perfectly fine. Any Ideas on what could be the Problem?
The SelectMethod on the ObjectDataSource returns an DataSet.
<telerik:RadGrid ID="rgData" runat="server" AllowSorting="true" Skin="<%$Appsettings:TelerikSkin %>" ClientSettings-AllowColumnsReorder="true" ClientSettings-Resizing-AllowColumnResize="true" DataSourceID="odsGrid"
Width="400px"
AutoGenerateColumns="false"> <MasterTableView> <Columns> <telerik:GridBoundColumn HeaderText="AttributeName" SortExpression="AttributeName" DataField="AttributeName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="DataValue" SortExpression="DataValue" DataField="DataValue"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid><asp:GridView ID="gData" runat="server" AllowSorting="true" DataSourceID="odsGrid" Width="400px" AutoGenerateColumns="false"> <Columns> <asp:BoundField HeaderText="AttributeName" SortExpression="AttributeName" DataField="AttributeName"> </asp:BoundField> <asp:BoundField HeaderText="DataValue" SortExpression="DataValue" DataField="DataValue"> </asp:BoundField> </Columns> </asp:GridView><asp:ObjectDataSource ID="odsGrid" SelectMethod="GetGridData" TypeName="dataViewGridInterface" runat="server"></asp:ObjectDataSource>Regards,
Alex