/// <summary>/// Creates a RadSplitter and places the two panes it will hold onto it./// In addition, sets those panes dimensions such that they are appropriate for/// the orientation of the RadSplitter./// /// I divide height and width in half because there are two panes./// </summary>/// <returns> The rad splitter. </returns>public static CormantRadSplitter CreateNewContent(Orientation orientation, RadPane parent){ Logger.InfoFormat("Creating new content to be placed upon: {0}", parent.ID); CormantRadSplitter splitter = new CormantRadSplitter(orientation); CormantRadPane firstPane = new CormantRadPane(); CormantRadDockZone firstDockZone = new CormantRadDockZone(); firstPane.Controls.Add(firstDockZone); splitter.Controls.Add(firstPane); CormantRadPane secondPane = new CormantRadPane(); splitter.Controls.Add(new CormantRadSplitBar(orientation, firstPane.ID, secondPane.ID)); CormantRadDockZone secondDockZone = new CormantRadDockZone(); secondPane.Controls.Add(secondDockZone); splitter.Controls.Add(secondPane); switch (orientation) { case Orientation.Horizontal: firstPane.PanePosition = PanePositions.Top; secondPane.PanePosition = PanePositions.Bottom; //firstPane.Height = secondPane.Height = new Unit(parent.Height.Value / 2, UnitType.Pixel); //firstPane.Width = secondPane.Width = parent.Width; break; case Orientation.Vertical: firstPane.PanePosition = PanePositions.Left; secondPane.PanePosition = PanePositions.Right; //firstPane.Height = secondPane.Height = parent.Height; //firstPane.Width = secondPane.Width = new Unit(parent.Width.Value / 2, UnitType.Pixel); break; } return splitter;}<telerik:RadGrid runat="server" ID="rgBase" OnNeedDataSource="rgBase_OnNeedDataSource" AutoGenerateColumns="false">
<MasterTableView EditMode="InPlace" AllowFilteringByColumn="true" ExpandCollapseColumn-Display="true" EnableViewState="false" AllowNaturalSort="false" AllowMultiColumnSorting="false" HierarchyLoadMode="ServerOnDemand" TableLayout="Fixed" Width="100%">
<NestedViewTemplate>
<asp:Label ID="lName" Text='<%# Eval("new_materialid") %>' runat="server" Visible="true"></asp:Label>
</NestedViewTemplate>
<Columns>
<telerik:GridTemplateColumn HeaderText="Column1" AllowFiltering="false" SortExpression="qty" UniqueName="qty" >
<ItemTemplate>
<asp:Label ID="lQTY" Text='<%# Eval("qty") %>' runat="server"></asp:Label>
</ItemTemplate>
<ItemStyle CssClass="gridItem" HorizontalAlign="Left" />
<HeaderStyle CssClass="gridHeader" Width="110" HorizontalAlign="Left"/>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Column2" AllowFiltering="false" UniqueName="remain" SortExpression="remain">
<ItemTemplate>
<asp:Label ID="lRemain" Text='<%# Eval("remain") %>' runat="server"></asp:Label>
</ItemTemplate>
<ItemStyle CssClass="gridItem" Width="100" HorizontalAlign="Left" />
<HeaderStyle CssClass="gridHeader" Width="110" HorizontalAlign="Left"/>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<SortingSettings EnableSkinSortStyles="false" />
<ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" >
<Scrolling AllowScroll="true" SaveScrollPosition="True" UseStaticHeaders="false"></Scrolling>
<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="false" EnableRealTimeResize="false" />
<Selecting AllowRowSelect="true" />
<ClientEvents/>
</ClientSettings>
<SelectedItemStyle
CssClass="gridSelectedItemStyle"/>
</telerik:RadGrid>
protected void rgBase_OnNeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
string _id = Request["id"].ToString();
Guid entityID = new Guid(_id);
ReloadData(3, entityID);
}
Public Overrides Sub RenderControl(ByVal writer As System.Web.UI.HtmlTextWriter)
Dim panel As New Panel
Dim outerTable As New Table
outerTable = generateDynamicControls()
panel.Controls.Add(outerTable)
panel.RenderControl(writer)
MyBase.RenderControl(writer)
End Sub
<EditFormSettings EditFormType="Template"><EditColumn FilterControlAltText="Filter EditCommandColumn column" /><FormTemplate><table cellspacing="2" cellpadding="1" border="0"><tr><td> <telerik:RadNumericTextBox ID="Amount" runat="server" DbValue='<%# Bind("Amount") %>' Width="80px" /> <!-- This one is invoked --> <asp:RequiredFieldValidator ControlToValidate="Amount" ErrorMessage="*" runat="server" Text="*" /> <!-- This one is NOT invoked but works well when not embedded in RadGrid--> <asp:CustomValidator ID="Amount_Required" ClientValidationFunction="CheckNumberRequired" ControlToValidate="Amount" runat="server" ValidateEmptyText="true" /></td></tr>