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

Need to display Radgrid columns according to screen resolution

2 Answers 186 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Balaji
Top achievements
Rank 1
Balaji asked on 30 Apr 2012, 09:33 AM
Hi,
i have a radgrid which is exceeding the page size when i gave the width in "%". if i gave width in pixels it is not displaying according to page resolution.

plz suggest me how to override the style properties of radgrid.
 <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SampleGrid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SampleGrid" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="clrFilters">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="SampleGrid" />
                        <telerik:AjaxUpdatedControl ControlID="clrFilters" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div id="divDefCols" style="height: 1600px; width: 100%; min-width: 730px; overflow-x: auto;
            overflow-y: auto; border: 1px solid;">
            <asp:LinkButton runat="server" ID="btnSaveSettings" Text="Set as Default setting"
                Font-Bold="false" Font-Size="Small" Width="150px" OnClick="btnSaveSettings_Click" />
            <asp:Image runat="server" ID="InfoImage" Visible="false" EnableViewState="false"
                Style="float: left;" ImageUrl="Images/UpdateActivity.gif" /><asp:Label runat="server"
                    ID="StatusLabel" Font-Bold="false" Font-Size="Small" ForeColor="Red" EnableViewState="false"></asp:Label>
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1"
                Width="190px">
             
                        <telerik:RadGrid ID="SampleGrid" EnableAJAX="True" EnableAJAXLoadingTemplate="True"
                            LoadingTemplateTransparency="50" Skin="Office2007" runat="server" AllowSorting="True"
                            AllowFilteringByColumn="True" AllowPaging="True" ShowFooter="True" ShowHeader="true"
                            CellSpacing="0" OnNeedDataSource="SampleGrid_NeedDataSource" OnColumnCreating="SampleGrid_ColumnCreating"
                            OnItemDataBound="Sample_ItemDataBound" OnItemCommand="SampleGrid_ItemCommand"
                            PageSize="50" GridLines="Vertical" AutoGenerateColumns="false" ShowSortIcon="true"
                            Height="900px" ShowGroupPanel="True">
                            <ClientSettings AllowDragToGroup="True">
                            </ClientSettings>
                            <FilterMenu EnableImageSprites="False">
                            </FilterMenu>
                            <MasterTableView EnableHeaderContextMenu="true">
                                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                    <HeaderStyle Width="20px"></HeaderStyle>
                                </ExpandCollapseColumn>
                                <EditFormSettings>
                                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                    </EditColumn>
                                </EditFormSettings>
                                <HeaderStyle Height="40px" Width="100px" />
                                <ItemStyle Height="30px" Width="100px" Wrap="False" />
                                <AlternatingItemStyle Height="30px" Width="100px" Wrap="False" />
                                <PagerStyle NextPageText="&amp;gt;" PrevPageText="&amp;lt;" AlwaysVisible="true"
                                    Mode="NextPrevAndNumeric"></PagerStyle>
                            </MasterTableView>
                            <ClientSettings AllowColumnHide="true" AllowColumnsReorder="True" ColumnsReorderMethod="Swap">
                               
                            </ClientSettings>
                        </telerik:RadGrid>
                   
            </telerik:RadAjaxPanel>
            <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            </telerik:RadScriptBlock>
        </div>

Adv thxs,
Balaji

2 Answers, 1 is accepted

Sort by
0
Vivek
Top achievements
Rank 1
answered on 05 Sep 2012, 08:59 AM
I have same issue any resolution for this
0
Maria Ilieva
Telerik team
answered on 10 Sep 2012, 08:28 AM
Hi Vivek,

Note that the described behaviour is expected and it ia valid for all components. The same behaviour will appear incase simple table in div is used. I would suggest you to keep your width in percents in order to have the RadGrid properly resized based on the screen resolution.

Kind regards,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
Balaji
Top achievements
Rank 1
Answers by
Vivek
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or