or

1.<ClientSettings>2. <DataBinding Location="GridAdoNetDataService.svc" SelectCountMethod="GetCount">3. <DataService TableName="ReadOnlyProducts" />4. </DataBinding>5.</ClientSettings>01.public class GridAdoNetDataService : DataService<NorthwindEntities>02.{ 03. public static void InitializeService(IDataServiceConfiguration config)04. { 05. config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);06. config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);07. }08. 09. [WebGet]10. public int GetCount(string where)11. {12. return String.IsNullOrEmpty(where) ? CurrentDataSource.ReadOnlyProducts.Count() :13. CurrentDataSource.ReadOnlyProducts.Where(where).Count();14. }15. 16.}<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadDockTest.aspx.cs" Inherits="RadDockTest" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns='http://www.w3.org/1999/xhtml'> <head id="Head1" runat="server"> <title>ASP.NET Dock Demo - AutoPostBack</title> <!--[if lte IE 6]> <style type="text/css"> .raddockzone{height:250px} </style> <![endif]--> <style type="text/css"> .qsfConsole { margin-top: 19px; } </style> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" /> <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" /> <telerik:RadDockLayout runat="server" ID="RadDockLayout1"> <table> <tr> <td style="vertical-align: top"> Docking Zone 1<br /> <br /> <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="270px" MinHeight="360px"> <telerik:RadDock runat="server" ID="RadDock1" Title="AutoPostBack enabled" EnableRoundedCorners="true"> <ContentTemplate> This RadDock control will initiate postback when it is moved around the page. You could create AsyncPostbackTrigger to replace the postback with an AJAX call. </ContentTemplate> </telerik:RadDock> <telerik:RadDock runat="server" ID="RadDock2" Title="AutoPostBack disabled" EnableRoundedCorners="true"> <ContentTemplate> This RadDock control will NOT initiate postback when it is moved around the page. However, if you post back the page using another control, the DockPositionChanged event will be fired. </ContentTemplate> </telerik:RadDock> </telerik:RadDockZone> </td> <td style="vertical-align: top"> Docking Zone 2<br /> <br /> <telerik:RadDockZone runat="server" ID="RadDockZone2" Width="270px" MinHeight="360px"> </telerik:RadDockZone> </td> </tr> </table> </telerik:RadDockLayout> <asp:Button ID="bt_SaveCustomInterfaces" runat="server" Text ="Save Interface" OnClick="bt_SaveCustomInterfaces_Click" /> </form> </body> </html>using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Telerik.Web.UI; public partial class RadDockTest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { RadDock dock = CreateRadDock(); RadDockZone1.Controls.Add(dock); } protected void bt_SaveCustomInterfaces_Click(object sender, EventArgs e) { if (RadDockZone2.Docks.Count == 1) { foreach (RadDock _radDock in RadDockZone2.Docks) { } } } private RadDock CreateRadDock() { RadDock dock = new RadDock(); dock.DockMode = DockMode.Docked; dock.UniqueName = Guid.NewGuid().ToString().Replace("-", "a"); dock.ID = string.Format("RadDock{0}", dock.UniqueName); dock.Title = "Dock"; dock.Text = string.Format("Added at {0}", DateTime.Now); dock.Width = Unit.Pixel(300); dock.Commands.Add(new DockCloseCommand()); dock.Commands.Add(new DockExpandCollapseCommand()); return dock; } }<asp:PlaceHolder ID="phRadGrids" runat="server" />RadGrid newGrid = new RadGrid();newGrid.ID = "grdTesting";newGrid.MasterTableView.AutoGenerateColumns = false;GridCheckBoxColumn col_Assign = new GridCheckBoxColumn();col_Assign.HeaderText = "Assign";col_Assign.UniqueName = "Assign";newGrid.MasterTableView.Columns.Add(col_Assign);phRadGrids.Controls.Add(newGrid);<asp:CheckBox ID="chkbxReadOnly" runat="server" Checked='<%# DataBinder.Eval(Container, "DataItem.ReadOnly") %>' AutoPostBack="True" />