我正在处理一个包含多个 RadGrid 和 RadHtmlCharts 的项目,并且页面布局有两个 RadSplitter。顶部拆分器包含两个 RadGrid,底部拆分器包含三个 RadHtmlCharts。
下面的代码(与删除的问题无关的代码以便更清晰地阅读):
<telerik:RadAjaxManagerProxy ID="AjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="Tasks">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="InterviewProgressPieChartErrorMessage" />
<telerik:AjaxUpdatedControl ControlID="InterviewProgressPanePieChart" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadSplitter ID="GridStorageSplitter" runat="server" Orientation="Vertical" Width="920" LiveResize="false" CssClass="radSplitter" BorderStyle="None" BorderSize="0">
<telerik:RadPane ID="NotificationsPane" runat="server" CssClass="gridpaneleft" MinWidth="250">
<telerik:RadGrid ID="Notifications" runat="server" AllowSorting="True" CellSpacing="0" DataSourceID="EventLog" AutoGenerateColumns="False" GridLines="None" CssClass="gridgrid">
</telerik:RadGrid>
</telerik:RadPane>
<telerik:RadSplitBar ID="GridSplitter" runat="server">
<AdjacentPanesNames LeftPaneName="NotificationsPane" RightPaneName="TasksPane" />
</telerik:RadSplitBar>
<telerik:RadPane ID="TasksPane" runat="server" CssClass="gridpaneright" MinWidth="400">
<telerik:RadGrid ID="Tasks" DataSourceID="JobsInfo" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" CssClass="gridgrid">
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="true" EnableDragToSelectRows ="false"/>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView DataSourceID="JobsInfo" AllowMultiColumnSorting="True" HierarchyLoadMode="Client" ShowHeader="false">
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPane>
</telerik:RadSplitter>
<telerik:RadSplitter ID="GraphStorageSplitter" runat="server" Orientation="Vertical" Width="920" Height="400" LiveResize="false" CssClass="radSplitter" BorderStyle="None" BorderSize="0">
<telerik:RadPane ID="JobNumbersPane" runat="server" Width="70" MinWidth="60">
<asp:Table ID="JobNumbersTable" runat="server" CssClass="topmargin7"></asp:Table>
</telerik:RadPane>
<telerik:RadSplitBar ID="GraphSplitter1" runat="server">
<AdjacentPanesNames LeftPaneName="JobNumbersPane" RightPaneName="InterviewStartTimesGraphPane" />
</telerik:RadSplitBar>
<telerik:RadPane ID="InterviewStartTimesGraphPane" runat="server" Width="30%" MinWidth="280">
<telerik:RadHtmlChart ID="interviewStartTimes" runat="server" Legend-Appearance-Visible="false"></telerik:RadHtmlChart>
</telerik:RadPane>
<telerik:RadSplitBar ID="GraphSplitter2" runat="server">
<AdjacentPanesNames LeftPaneName="InterviewStartTimesGraphPane" RightPaneName="ReferralsChartPane" />
</telerik:RadSplitBar>
<telerik:RadPane ID="ReferralsChartPane" runat="server" Width="30%" MinWidth="200">
<telerik:RadHtmlChart ID="referralsChart" runat="server" OnLoad="referralsChart_Load"></telerik:RadHtmlChart>
</telerik:RadPane>
<telerik:RadSplitBar ID="GraphSplitter3" runat="server">
<AdjacentPanesNames LeftPaneName="ReferralsChartPane" RightPaneName="InterviewProgressPane" />
</telerik:RadSplitBar>
<telerik:RadPane ID="InterviewProgressPane" runat="server" Width="30%" MinWidth="200">
<asp:Label ID="InterviewProgressPieChartErrorMessage" runat="server" Text="No Interviews have been sent out for the selected job." Visible="false"></asp:Label>
<telerik:RadHtmlChart runat="server" ID="InterviewProgressPieChart" Visible="true" OnLoad="loadInterviewProgressPieChart">
</telerik:RadHtmlChart>
</telerik:RadPane>
</telerik:RadSplitter>
我正在尝试向页面添加功能,以在用户单击 Tasks RadGrid 中的一行时加载带有相关数据的 InterviewProgressPieChart。它可以工作,但回发会重新加载整个页面(包括母版页),我想避免这种情况。
我也尝试过使用 RadAjaxManager,但它仍然会在回发时重新加载整个页面(似乎是设计使然)。
将 RadSplitter 包装在 RadAjaxPanel 中允许我仅在回发时加载该面板的内容,但您不能将 RadAjaxPanel 放在 RadSplitter 中,而且我不知道如何仅将相关的 Grid/Chart 放入 AjaxPanel .