Hi,
I'm trying to get a grid to load its data from the client side after the parent control has been initialised.
I'm trying to use the set_datasource method to populate the grid with data from a JSON serialised DataTable from a webservice.
I want the grid to create its columns automatically from the datatable if possible.
However, when I call get_masterTableView(), null is returned.
Is what I'm trying to do possible, and if so where am I going wrong?
Thanks in advance.
Regards,
Little Jimi
Code follows:
I'm trying to get a grid to load its data from the client side after the parent control has been initialised.
I'm trying to use the set_datasource method to populate the grid with data from a JSON serialised DataTable from a webservice.
I want the grid to create its columns automatically from the datatable if possible.
However, when I call get_masterTableView(), null is returned.
Is what I'm trying to do possible, and if so where am I going wrong?
Thanks in advance.
Regards,
Little Jimi
Code follows:
function performSearch() | |
{ | |
SelectorService.GetData(0,10000000, | |
... [snip] ..., | |
UpdateGrid, SearchFailed); | |
} | |
function UpdateGrid(result) | |
{ | |
var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView(); | |
tableView.set_dataSource(result); | |
tableView.dataBind(); | |
} |
<asp:Panel ID="GridPanel" runat="server" Style="font-size: x-small; clear: both; | |
padding: 4px 2px 2px 2px;" ScrollBars="Auto" Height="200px" Width="444px"> | |
<Telerik:RadGrid ID="RadGrid1" runat="server" SkinID="Selector" EnableViewState="false" | |
AllowPaging="true" AllowSorting="True" AllowFilteringByColumn="true" GridLines="None" | |
AutoGenerateColumns="true" OnColumnCreated="RadGrid1_ColumnCreated"> | |
<ClientSettings> | |
<ClientEvents OnRowSelected="RowSelected" OnRowDblClick="RowDblClick" /> | |
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> | |
</ClientSettings> | |
</Telerik:RadGrid> | |
</asp:Panel> |