This is a migrated thread and some comments may be shown as answers.

Telerik RadPageLayout Issue Dynamically in with Repeated Rows in New Dll(2017.2.503.40)

1 Answer 51 Views
General Information
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Akshay
Top achievements
Rank 1
Akshay asked on 01 Jun 2017, 02:10 PM

Hello,

I having a Problem with Rad Page Layout When created dynamically. The Rows are Getting repeated based on the Count in DataTable. This Issue was not occuring in DLL version 2015.1.401.40... but when the DLL was Upgraded to 2017.2.503.40. The Rows are Getting Repeated. In HTML I can see "t-row" getting repeated based on DataTable count. Below is My Code...Please Guide Us....Thank You!!!!! 

 

ASPX CODE

 <telerik:RadPageLayout ID="RadPageLayoutMaster" runat="server" GridType="Fluid" BackColor="#ffffff"
        CssClass="ContentRadlayout" Height="400px">
        <Rows>
            <telerik:LayoutRow>
                <Columns>
                    <telerik:LayoutColumn Span="3" HiddenSm="true" HiddenXs="true" CssClass="noprint">
                        <div id="accordian">
                            <div class="productVerticalTitle">
                                <asp:Label ID="lblProducts" runat="server" Text="Products" CssClass="TreeLabel"></asp:Label>
                            </div>
                            <asp:PlaceHolder ID="PlaceHolderProducts" runat="server"></asp:PlaceHolder>
                            <script src="/Scripts/Products.js" type="text/javascript"></script>
                        </div>
                    </telerik:LayoutColumn>
                    <telerik:LayoutColumn Span="9" SpanXs="12" SpanSm="12" CssClass="allprod">
                        <asp:PlaceHolder ID="placeholderproductdetails"  runat="server"></asp:PlaceHolder>
                    </telerik:LayoutColumn>
                </Columns>
            </telerik:LayoutRow>
        </Rows>
    </telerik:RadPageLayout>

.

 

===================================================================================================================

CS CODE

foreach (DataRow drproduct in dtProducts.Rows)
            {
                LayoutColumn mainlayoutcoloumn = new LayoutColumn();

                mainlayoutcoloumn.Span = 6;
                mainlayoutcoloumn.SpanXs = 12;
                mainlayoutcoloumn.SpanSm = 12;
                mainlayoutcoloumn.SpanMd = 12;


                mainlayout.Rows.Add(mainlayoutrow);
                mainlayoutrow.Columns.Add(mainlayoutcoloumn);

                System.Web.UI.HtmlControls.HtmlGenericControl parentdiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                parentdiv.Attributes["class"] = "thumbnail";
                parentdiv.Attributes.Add("onclick", "location.href='" + string.Format("/products/{0}", drproduct["HandlerName"].ToString()) + "'");


                /*Div Added for Photo Image*/
                System.Web.UI.HtmlControls.HtmlGenericControl productimgdiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                productimgdiv.Attributes["class"] = "productsHeaderBgImg";


                System.Web.UI.HtmlControls.HtmlGenericControl productheader = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                productheader.Attributes["class"] = "productsHeaderBg";


                System.Web.UI.HtmlControls.HtmlGenericControl productheadertitle = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                productheadertitle.Attributes["class"] = "productsHeader";

                Image productimg1 = new Image();
                productimg1.Attributes["class"] = "alldevices";
                productimg1.ImageUrl = drproduct["ImagePath"].ToString();

                productimgdiv.Controls.Add(productimg1);


                System.Web.UI.HtmlControls.HtmlGenericControl lnkProduct = new System.Web.UI.HtmlControls.HtmlGenericControl("a");
                lnkProduct.InnerText = drproduct["ProductTypeName"].ToString();

                lnkProduct.Attributes.Add("href", string.Format("/products/{0}", drproduct["HandlerName"].ToString()));
                productheadertitle.Controls.Add(lnkProduct);


                productheader.Controls.Add(productheadertitle);
                productimgdiv.Controls.Add(productheader);


                System.Web.UI.HtmlControls.HtmlGenericControl contentdiv = new System.Web.UI.HtmlControls.HtmlGenericControl("div");
                contentdiv.Attributes["class"] = "divSubProductModelContainer";

                contentdiv.InnerHtml = Server.HtmlDecode(drproduct["UIProductDescription"].ToString());


                parentdiv.Controls.Add(productimgdiv);
                parentdiv.Controls.Add(contentdiv);

                mainlayoutcoloumn.Controls.Add(parentdiv);

            }
            placeholderproductdetails.Controls.Add(mainlayout);

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Jun 2017, 03:30 PM

Hello Akshay,

I am afraid that the provided sample is not runnable and we cannot verify this regression. Can you modify the code so that it becomes runnable and can be tested and send it back for examination?

Please, also attach screenshots of the rendering of the old and new versions of the control.

Thank you for your cooperation.

Regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Information
Asked by
Akshay
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or