<telerik:RadDockLayout runat="server" ID="RadDockLayout1" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" EnableViewState="false"> <div id="mainContainer" style="width: 100%; float:left; height:100%"> <div style="width:100%;"> <asp:Table ID="Table1" runat="server" Width="100%"> <asp:TableRow> <asp:TableCell Width="50%" Height="95%"> <telerik:RadDockZone ID="RadDockZone1" runat="server" CssClass="zone" Height="540px" BorderColor="#d7d7d7"> </telerik:RadDockZone> </asp:TableCell> <asp:TableCell Width="50%" Height="95%"> <telerik:RadDockZone ID="RadDockZone2" runat="server" CssClass="zone" Height="540px" BorderColor="#d7d7d7"> </telerik:RadDockZone> </asp:TableCell> </asp:TableRow> </asp:Table> </div> </div> </telerik:RadDockLayout>
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%
@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!
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">
<asp:ScriptManager ID="aspScript" runat="server">
</asp:ScriptManager>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [UnitsInStock], [UnitPrice] FROM [Products]">
</asp:SqlDataSource>
<telerik:RadGrid ID="grdTemplate" runat="server" DataSourceID="SqlDataSource1"
AutoGenerateColumns="true" ShowGroupPanel="True" Skin="Office2007" Height="500" Width="100%"
OnColumnCreated="grdTemplate_ColumnCreated">
<ClientSettings AllowColumnsReorder="False" AllowDragToGroup="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="true" TableLayout="Fixed" ShowFooter="true" ShowGroupFooter="true" />
</telerik:RadGrid>
</form>
</
body>
</
html>
Code Behind
using
System;
using
System.Collections.Generic;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.Web.UI;
public
partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Add the expression
grdTemplate.MasterTableView.GroupByExpressions.Add(
GridGroupByExpression.Parse("SupplierID Group By SupplierID"));
}
protected void grdTemplate_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
// Determine the column type
if (e.Column is GridBoundColumn && e.Column.UniqueName == "UnitPrice")
{
// Set the column aggreagate
(e.Column
as GridBoundColumn).Aggregate = GridAggregateFunction.Sum;
}
}
}
<SortExpressions> <telerik:GridSortExpression FieldName="EventID" SortOrder="Descending" /> </SortExpressions>RadAjaxManager manager = RadAjaxManager.GetCurrent(this.Page);manager.ResponseScripts.Add("CloseWindowReload('" + gridReloadCommand + "','" + ((itemID == null) ? "-1" : itemID.ToString()) + "');");protected void SetEditorFilters(){ // DISABLE DEFAULT FILTERS txtContentHTML.ContentFilters = Telerik.Web.UI.EditorFilters.None; // SET DESIRED FILTERS txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.ConvertInlineStylesToAttributes); txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.FixEnclosingP); txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.FixUlBoldItalic); txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.IndentHTMLContent); txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.MakeUrlsAbsolute); txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.OptimizeSpans); txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.RemoveScripts); }