Dynamic Docks and Parameters

2 posts, 0 answers
  1. Abdullah Önden
    Abdullah Önden avatar
    20 posts
    Member since:
    Aug 2009

    Posted 08 Oct 2009 Link to this post

    Hello

    I have a project built on docks. These docs are in a master page, here yo ucan see the structure:

            <asp:UpdatePanel runat="server" ID="updatePanel"
                <ContentTemplate> 
                    <cc1:DockLayout ID="dockLayout" runat="server" EnableViewState="false" StoreLayoutInViewState="false"
                        <uc1:Header ID="ctrlHeader" runat="server" /> 
                        <uc1:SubHeader ID="SubHeader1" runat="server" /> 
                        <div class="leftpart"
                            <div style="margin-top: 5px;"
                                <uc1:Menu ID="Menu" runat="server" /> 
                            </div> 
                            <div style="margin-top: 5px;"
                             
                                <cc1:DockZone ID="LeftDocZone" runat="server" Orientation="Vertical" Visible="true"
                                </cc1:DockZone> 
                            </div> 
                        </div> 
                        <div class="midpart"
                            <cc1:DockZone ID="CenterDockZone" runat="server" Orientation="Vertical"
                            </cc1:DockZone> 
                        </div> 
                        <div class="rightpart"
                            <cc1:DockZone ID="RightDockZone" runat="server" Orientation="Vertical"
                            </cc1:DockZone> 
                        </div> 
                    </cc1:DockLayout> 
                </ContentTemplate> 
            </asp:UpdatePanel> 
            <div> 
            <uc1:Footer ID="Footer1" runat="server" /> 
            </div> 

    As you can see I've split my page up into three columns. And all of my pages are using this theme. I get my page details from sql server than generate them from a BasePage control. Everything is working really great. But I've really got a big problem with paging parameters. I tried telerik's grid component it works fine. But when I try to use SEO Url mode it's not working. I mean when I click the page links the page just loads itself. Than I thought maybe something wrong with this, and I built another page with  .net's ListView and DataPager control. But nothing has changed. I'm curious how this can happen? Here's my URL: Category.aspx?CatID=18&pageNumber=2 and here's my code behind.

        protected void Page_Load(object sender, EventArgs e) 
        { 
            PopulateSearchPanel(); 
        } 
     
        private void PopulateSearchPanel() 
        { 
            int catID = Convert.ToInt32(StringUtil.GetQueryString("CatID")); 
            List<ProductItem> products = ProductFactory.GetCategoryProducts(catID, 1); 
            itemCount = products.Count; 
     
            foreach (ProductItem p in products) 
            { 
                var productItem = new RadPanelItem(); 
                pproductItem.Text = p.ProductName; 
                productItem.NavigateUrl = "#"
            } 
     
            ProductsListView.DataSource = products
            ProductsListView.DataBind(); 
        } 

    Where am I missing? Is that because Dock or what? I really need help with this..
  2. Jim
    Jim avatar
    31 posts
    Member since:
    Jun 2009

    Posted 09 Oct 2009 Link to this post

    Test the following code and you will notice that the RadGrid's ClientID is RadDock1_C_RadGrid1 (it is not RadGrid1). I think that in your project you are using RadGrid1:

    <%@ 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 id="Head1" runat="server"
        <title></title
    </head> 
    <body> 
        <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
        <div> 
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server"
                <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"
                    <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Title="RadDock-Title"
                        <ContentTemplate> 
                            <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="3"
                                <PagerStyle Mode="NextPrevAndNumeric" EnableSEOPaging="True"></PagerStyle> 
                            </telerik:RadGrid> 
                            <br /> 
                        </ContentTemplate> 
                    </telerik:RadDock> 
                </telerik:RadDockZone> 
            </telerik:RadDockLayout> 
        </div> 
        </form> 
    </body> 
    </html> 
     

    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Web; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
     
    public partial class _Default : System.Web.UI.Page 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            RadGrid1.DataSource = new string[] { "1""1""1""1""1""1""1""1""1""1""1""1""1""1""1" }; 
        } 
     
     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top