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

RadGrid + PageLayout

3 Answers 159 Views
Documentation and Tutorials
This is a migrated thread and some comments may be shown as answers.
Lienys
Top achievements
Rank 2
Lienys asked on 04 Jul 2014, 11:06 PM
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 

3 Answers, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 08 Jul 2014, 06:27 AM
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.

 
0
Clifford
Top achievements
Rank 2
answered on 22 Jul 2015, 03:33 AM
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.
0
Venelin
Telerik team
answered on 22 Jul 2015, 07:20 AM
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
Tags
Documentation and Tutorials
Asked by
Lienys
Top achievements
Rank 2
Answers by
Venelin
Telerik team
Clifford
Top achievements
Rank 2
Share this question
or