I have a page with a drop-down. Based on the selection in the drop-down, data gets loaded and populates a RadGrid. I am using a custom user control for the EditTemplate, so I can't use radGrid.DataBind(). Instead, I have to use radGrid.MasterTableView.Rebind() in association with a NeedDataSource event handler.
My problem is that when I load the page initially, I populate the drop-down and automatically select a value (first item in the list) which triggers the databinding on the RadGrid. I can step through the code in debug mode and see that the grid is being populated with data (both when the DataSource is being set and when a derived property is visited when it's displayed as a column in the grid), but when the page displays, the grid doesn't get rendered. I can then manually choose an item from the drop-down, which triggers the same grid databinding code, it displays properly the second time.
How do I get it to display the grid the first time the page loads?
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function RowSelected(sender, eventArgs) { var grid = sender; var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; var id = eventArgs.getDataKeyValue("C_n_Id"); alert(id); var oXmlPanel = $find("<%= RadXmlHttpPanel1.ClientID %>"); oXmlPanel.set_value(id); } </script></telerik:RadScriptBlock><div class="ordersContainer"> <asp:Label runat="server" ID="ordersTitle" CssClass="ordersTitle">Orders for</asp:Label> <telerik:RadXmlHttpPanel ID="RadXmlHttpPanel1" runat="server" OnServiceRequest="RadXmlHttpPanel1_ServiceRequest" RenderMode="Block" EnableClientScriptEvaluation="true"> <asp:TextBox ID="TextBox1" runat="server" /><br /> </telerik:RadXmlHttpPanel><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm47.aspx.cs" Inherits="fTest.WebForm47" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%" BorderSize="0" PanesBorderSize="0" Skin="Office2010Silver"> <telerik:RadPane runat="server" ID="RadPane1" Width="350px" MaxWidth="350"> abc </telerik:RadPane> <telerik:RadSplitBar runat="server" ID="RadSplitbar1" CollapseMode="Forward" ResizeStep="50" /> <telerik:RadPane runat="server" ID="RadPane2" Width="350px" MaxWidth="350"> cde </telerik:RadPane> </telerik:RadSplitter> </div> </form></body></html>public void ConfigureExport() { radgrdResultDetail.ExportSettings.ExportOnlyData = true; radgrdResultDetail.ExportSettings.IgnorePaging = false; radgrdResultDetail.ExportSettings.OpenInNewWindow = false; } protected void xlsExport_Click(object sender, EventArgs e) { ConfigureExport(); radgrdResultDetail.MasterTableView.ExportToCSV(); } protected void csvExport_Click(object sender, EventArgs e) { ConfigureExport(); radgrdResultDetail.MasterTableView.ExportToExcel(); }RepeatColumns
="4" RepeatDirection="Vertical" AlignRows="false"
The problem is level 1 has uneven items, ideally I want each rows filled as close as possible to the maximum height before moving to the next column, whats is happening is its trying to create and even number of rows resulting in lots of empty spaces at the bottom. Is there a way to turn this off.