RadGrid + PageLayout

4 posts, 0 answers
  1. Lienys
    Lienys avatar
    16 posts
    Member since:
    Feb 2014

    Posted 04 Jul 2014 Link to this post

    I'm using the pagelayout feature to make my rad grid responsive... but when I resize the browser, I'm able to see the pageLayout columns resizing but the radgrid remains with its default size.
    this is the code I have... and I attached screen shots to describe what is happening 

    ascx
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CraigList.ascx.cs" Inherits="CraigListResponsive.CraigList" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <telerik:RadPageLayout runat="server" ID="layoutCraigList" ShowGrid="true" GridType="Fluid">
        <Rows>
            <telerik:LayoutRow>
                <Content>
                    <telerik:RadDropDownList runat="server" ID="craigListCategory"
                        DataTextField="CategoryName" DataValueField="CategoryId"
                        OnSelectedIndexChanged="CraigListCategorySelectedIndexChanged">
                    </telerik:RadDropDownList>
                </Content>
            </telerik:LayoutRow>
            <telerik:LayoutRow>
                <Content>
                    <telerik:RadCodeBlock ID="RadCodeBlockPopWindow" runat="server">
                        <script type="text/javascript">
                            var popUp;                       
                            function PopUpShowing(sender, eventArgs)
                            {
                                popUp = eventArgs.get_popUp();
                                var gridWidth = sender.get_element().offsetWidth;
                                var gridHeight = sender.get_element().offsetHeight;
                                var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
                                var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
                                popUp.style.left = ((gridWidth - popUpWidth) / 2 + sender.get_element().offsetLeft).toString() + "px";
                                popUp.style.top = ((gridHeight - popUpHeight) / 2 + sender.get_element().offsetTop).toString() + "px";
                            }
                        </script>
                    </telerik:RadCodeBlock>
                    <telerik:RadAjaxManager runat="server" ID="listAjaxManager">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="craigListGrid">
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                    </telerik:RadAjaxManager>
                    <telerik:RadGrid runat="server" ID="craigListGrid"
                        AllowPaging="true" ShowFooter="true"
                        AutoGenerateColumns="false"
                        OnPreRender="CraigListGridPreRender"
                        OnNeedDataSource="CraigListGridNeedDataSource"
                        OnUpdateCommand="CraigListGridSaveCommand"
                        OnInsertCommand="CraigListGridSaveCommand"
                        OnDeleteCommand="CraigListGridDeleteCommand"
                        OnItemCommand="CraigListGridItemCommand">
                        <MasterTableView CommandItemDisplay="Top"
                            DataKeyNames="ItemId" EditMode="PopUp">
                            <ColumnGroups>
                                <telerik:GridColumnGroup Name="Actions"
                                    HeaderText="Actions"
                                    HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridColumnGroup>
                            </ColumnGroups>
                            <Columns>
                                <telerik:GridBoundColumn UniqueName="Title" DataField="Title"
                                    HeaderText="Items Title">
                                </telerik:GridBoundColumn>
                                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ColumnGroupName="Actions">
                                </telerik:GridEditCommandColumn>
                                <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete"
                                    ColumnGroupName="Actions" CommandName="Delete">
                                </telerik:GridButtonColumn>                            
                            </Columns>                        
                            <EditFormSettings UserControlName="~/DesktopModules/CraigListResponsive/CraigListEdit.ascx" EditFormType="WebUserControl">
                                <PopUpSettings ScrollBars="Auto" Width="400" />
                                <EditColumn UniqueName="EditCommandColumn"></EditColumn>
                            </EditFormSettings>                       
                        </MasterTableView>
                        <ClientSettings>
                            <ClientEvents OnPopUpShowing="PopUpShowing" />
                            <Selecting AllowRowSelect="True"></Selecting>
                        </ClientSettings>
                    </telerik:RadGrid>
                </Content>
            </telerik:LayoutRow>
        </Rows>
    </telerik:RadPageLayout>

    What i'm doing wrong? 

    thanks 
  2. Venelin
    Admin
    Venelin avatar
    352 posts

    Posted 08 Jul 2014 Link to this post

    Hello Lienys,

    Your question was answered in ticket with ID 836504. Please avoid duplicating threads so we can better track the issues.

    Thank you very much.

    Regards,
    Venelin
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Clifford
    Clifford avatar
    2 posts
    Member since:
    Dec 2011

    Posted 21 Jul 2015 in reply to Venelin Link to this post

    It never ceases to amaze me how much your support analysts take for granted. If the answer to this particular question can be found in ticket 836504, might I inquire how I get to that information, because I just just submitted a similar ticket.
  5. Venelin
    Admin
    Venelin avatar
    352 posts

    Posted 22 Jul 2015 Link to this post

    Hi Clifford,

    You can't access other people personal threads, that was just an information for thread's owner. It's not a problem that you have submitted similar question in a support ticket, it will be handled accordingly. It's just a bad practice one person to duplicate the same question several times, so we suggest to avoided this.

    Regards,
    Venelin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top