我有这个似乎正在获取数据但没有显示的 radgrid。绑定后 grid.Items.Count 设置为预期的行数。我将包括 ajax 管理器设置和网格。有兴趣的请备注。在 onRequestStart javascript 中,我只是在做一些客户端验证。谢谢!
这是适当的片段:
<telerik:radajaxmanager id="RadAjaxManager1" runat="server">
<clientevents onrequeststart="onRequestStart" />
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1">
</telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadBtnRetrieve">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadPanelBar1" loadingpanelid="RadAjaxLoadingPanel1">
</telerik:AjaxUpdatedControl>
<telerik:ajaxupdatedcontrol controlid="RadAjaxPanel1" loadingpanelid="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadGridPartsWashers">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridPartsWashers" loadingpanelid="RadAjaxLoadingPanel1">
</telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:radajaxmanager>
<telerik:radajaxpanel ID="RadAjaxPanel1" runat="server" loadingpanelid="RadAjaxLoadingPanel1" enableajax="true">
<table>
<tr>
<td>
<telerik:RadGrid ID="RadGridPartsWashers" runat="server" Width="100%" AllowPaging="True"
CellSpacing="0" GridLines="None" AllowSorting="True" AutoGenerateColumns="False"
CssClass="RadGrid.rgMasterTable" onneeddatasource="RadGridPartsWashers_NeedDataSource">
<ClientSettings>
<Selecting AllowRowSelect="True"></Selecting>
<Scrolling AllowScroll="True" ScrollHeight="" UseStaticHeaders="True"></Scrolling>
<Resizing AllowColumnResize="true" />
</ClientSettings>
<MasterTableView EnableHeaderContextMenu="true" EnableNoRecordsTemplate="true" DataKeyNames="AssetNumber"
EnableSplitHeaderText="true" TableLayout="Auto" Width="100%">
<PagerStyle AlwaysVisible="true" />
<NoRecordsTemplate>
<div>
There are no records to display
</div>
</NoRecordsTemplate>
<Columns>
.....
</Columns>