or
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <telerik:RadGrid ID="gridCCU" AllowPaging="true" AllowSorting="true" OnNeedDataSource="gridCCU_NeedDataSource" AutoGenerateColumns="false" AllowAutomaticInserts="true" GridLines="Horizontal" ClientSettings-EnableRowHoverStyle="true" EnableAjaxSkinRendering="false" MasterTableView-RowIndicatorColumn-ItemStyle-BorderColor="ActiveBorder" Height="220px" runat="server" OnItemCommand="getCCU"> <ClientSettings Scrolling-AllowScroll="true" EnablePostBackOnRowClick="true" Selecting-AllowRowSelect="true" Scrolling-UseStaticHeaders="true"> </ClientSettings> <MasterTableView AllowPaging="true" DataKeyNames="OBJID" Width="100%" TableLayout="Fixed" EnableViewState="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center"> <Columns> <telerik:GridBoundColumn DataField="MODEL" HeaderText="MODEL" HeaderStyle-Font-Bold="true"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Connections.connectionType" HeaderStyle-Font-Bold="true" HeaderText="COMMUNICATION TYPE" > </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Connections.IPAddress" HeaderStyle-Font-Bold="true" HeaderText="ADDRESS" > </telerik:GridBoundColumn> <%--<telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS" HeaderStyle-Font-Bold="true" > </telerik:GridBoundColumn>--%> <telerik:GridTemplateColumn UniqueName="statusCCU" HeaderStyle-Font-Bold="true" HeaderText="STATUS"> <ItemTemplate> <asp:Label ID="lblStatus" runat="server" Text="OFFLINE"></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> <HeaderStyle CssClass="GridHeader" /> </MasterTableView> <PagerStyle Mode="NextPrevAndNumeric" EnableSEOPaging="true" VerticalAlign="Bottom" Position="Bottom" AlwaysVisible="true" /> </telerik:RadGrid> </ContentTemplate> </asp:UpdatePanel>
private void SaveWorkspacePanels(RadDockZone dockzone,int workspaceid,int panellocation) { try { BusinessLayer BL=new BusinessLayer(); DemandSolutions_WorkspacePanel WorkspacePanel; string source; string [] parsed; string panelid; string paneltype; foreach(RadDock dock in dockzone.Docks) { WorkspacePanel=new DemandSolutions_WorkspacePanel(); source=dock.Tag; parsed=source.Split(' '); panelid=parsed[0]; paneltype=parsed[1]; WorkspacePanel.PanelID=Convert.ToInt32(panelid); WorkspacePanel.PanelLocation=panellocation; WorkspacePanel.WorkspaceID=workspaceid; BL.InsertWorkspacePanel(WorkspacePanel); }//End For-Each } catch(Exception ex) { DisplayMessage.InnerText="Problem with "+dockzone.ID+" "+ex.ToString(); } }//End FunctionRadDock dock=new RadDock();dock.DockMode = DockMode.Docked;dock.ID= string.Format("RadDock{0}", Guid.NewGuid().ToString().Replace('-', 'a'));dock.Tag=panelID+" "+controlType;dock.Title=panelTitle;dock.Text=panelDescription;dock.Width=Unit.Percentage(100);dock.AutoPostBack=true;dock.Commands.Add(new DockExpandCollapseCommand());protected void Page_Init(object sender, EventArgs e) { if (IsPostBack) { pogrid.DataSource = null; pogrid.Rebind(); } else { //... set filteredPOList pogrid.DataSource = null; pogrid.Rebind();public void Selection_Changed(object sender, EventArgs e) { //... } protected void Grid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { pogrid.DataSource = filteredPOList; }<telerik:RadGrid ID="pogrid" runat="server" EnableViewState="true" AutoGenerateColumns="False" OnNeedDataSource="Grid_NeedDataSource" AllowFilteringByColumn="True" AllowSorting="True"ViewStateMode="Enabled" CellSpacing="0" OnSelectedIndexChanged="Selection_Changed" GridLines="None" > <GroupingSettings CaseSensitive="false" /> <ClientSettings EnableRowHoverStyle="True"> <Selecting AllowRowSelect="True" ></Selecting> <Scrolling UseStaticHeaders="True" AllowScroll="True" SaveScrollPosition="True" ScrollHeight="300px"> </Scrolling> <Resizing AllowColumnResize="True"></Resizing> </ClientSettings> <MasterTableView DataKeyNames="poId"> <Columns> <telerik:GridBoundColumn HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true" HeaderText="Promotion Number" UniqueName="PromotionNumber" DataField="PromotionNumber" SortExpression="PromotionNumber" FilterDelay="2000" CurrentFilterFunction="StartsWith" FilterControlWidth="80%" ></telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="40%" HeaderStyle-Font-Bold="true" HeaderText="Promotion Name" UniqueName="PromotionName" DataField="PromotionName" SortExpression="PromotionName" FilterDelay="2000" CurrentFilterFunction="Contains" FilterControlWidth="80%" ></telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true" HeaderText="Pep Contact" UniqueName="PepContact" DataField="PepContact" SortExpression="PepContact" FilterDelay="2000" CurrentFilterFunction="Contains" FilterControlWidth="80%" ></telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderStyle-Width="20%" HeaderStyle-Font-Bold="true" HeaderText="PO Name" UniqueName="POName" DataField="POName" SortExpression="POName" FilterDelay="2000" CurrentFilterFunction="Contains" FilterControlWidth="80%" ></telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<ajaxsettings>
<telerik:AjaxSetting AjaxControlID="pogrid">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pogrid" LoadingPanelID="RadAjaxLoadingPanel1">
</telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</ajaxsettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>