Hey all.
I'm trying to convert a page to do data binding all on the client-side.
I'm starting with a simple method call from javascript in the aspx file.
<script language="javascript" type="text/javascript">
function pageLoad() {
load();
}
</script>
In my javascript file I'm using
Sys.Application.add_load(function() {
_tableView = $find('MyGridId').get_masterTableView();
}
In which case the grid is null or not an object. Sys.Application.load is raised after all scripts have been loaded and the objects in the application have been created and initialized so I would expect the grid to be there.
What am I missing?
Here's my grid. Thanks.
I'm trying to convert a page to do data binding all on the client-side.
I'm starting with a simple method call from javascript in the aspx file.
<script language="javascript" type="text/javascript">
function pageLoad() {
load();
}
</script>
In my javascript file I'm using
Sys.Application.add_load(function() {
_tableView = $find('MyGridId').get_masterTableView();
}
In which case the grid is null or not an object. Sys.Application.load is raised after all scripts have been loaded and the objects in the application have been created and initialized so I would expect the grid to be there.
What am I missing?
Here's my grid. Thanks.
<telerik:RadGrid runat="server" ID="MyGridId" Skin="Office2007" AutoGenerateColumns="false" AllowMultiRowSelection="true" |
Width="600" > |
<MasterTableView runat="server" ClientDataKeyNames="Id, PointId" HeaderStyle-HorizontalAlign="Center" TableLayout="Fixed" > |
<NoRecordsTemplate> |
<asp:Localize ID="Localize2" runat="server" Text="<%$ Resources:Resource, NO_ALARMS_CONFIGURED %>" /></NoRecordsTemplate> |
<Columns> |
<telerik:GridBoundColumn UniqueName="Display" DataField="Display" HeaderText="<%$ Resources:Resource, DISPLAY%>" /> |
<telerik:GridTemplateColumn UniqueName="DisplayOnBoard" HeaderText="<%$ Resources:Resource, DISPLAY_ON_BOARD %>"> |
<ItemTemplate> |
<asp:Label ID="Label1" runat="server"><%# (bool)Eval("DisplayOnBoard") ? "Yes" : "No"%></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn UniqueName="NotifyWhenOn" DataField="NotifyWhenOn" HeaderText="<%$ Resources:Resource, NOTIFY_ON_ACTIVE %>"> |
<ItemTemplate> |
<asp:Label ID="Label2" runat="server"><%# (bool)Eval("NotifyWhenOn") ? "Yes" : "No"%></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn UniqueName="NotifyWhenOff" DataField="NotifyWhenOff" HeaderText="<%$ Resources:Resource, NOTIFY_ON_RETURN %>"> |
<ItemTemplate> |
<asp:Label ID="Label3" runat="server"><%# (bool)Eval("NotifyWhenOff") ? "Yes" : "No"%></asp:Label> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings> |
<Scrolling UseStaticHeaders="true" AllowScroll="true" ScrollHeight="175" FrozenColumnsCount="4" /> |
<Selecting AllowRowSelect="true" /> |
<ClientEvents OnRowSelected="RowSelected" /? |
</ClientSettings> |
</telerik:RadGrid> |