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

[Solved] Need to view the last column fully, AutoGenerateColumns="true"

3 Answers 160 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35) asked on 16 Jul 2013, 01:00 PM
Hi All,

Have a RadGrid with AutoGenerateColumns="true" and EditMode ="InPlace".

Not able to view the last column fully. have attached the screen shot.

The Last column is "Shopping Mall" but it displays as Shop only.

<telerik:RadGrid ID="RadGridSingleClick" runat="server" Skin="Vista" AutoGenerateColumns="true"
                            OnNeedDataSource="RadGridSingleClick_NeedDataSource" OnPreRender="RadGridSingleClick_PreRender"
                            OnUpdateCommand="RadGridSingleClick_UpdateCommand" OnColumnCreated="RadGridSingleClick_ColumnCreated"
                            Height="250px" Width="1100px">
                            <%--OnItemDataBound="RadGridText_ItemDataBound" --%>
                            <MasterTableView HeaderStyle-CssClass="disable-highlight" Width="95%" HeaderStyle-HorizontalAlign="Center"
                                HeaderStyle-Wrap="true" DataKeyNames="MKTID" HeaderStyle-Width="100px" ItemStyle-Width="100px"
                                EditMode="InPlace">
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" ItemStyle-Width="60px" HeaderStyle-Width="60px">
                                    </telerik:GridEditCommandColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings Scrolling-AllowScroll="true" Resizing-AllowColumnResize="true" Scrolling-SaveScrollPosition="true"
                                Scrolling-FrozenColumnsCount="2" Scrolling-UseStaticHeaders="true">
                                <Selecting AllowRowSelect="true" />
                                <ClientEvents OnRowClick="RadGridSingleRowClick" />
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                            </ClientSettings>
                        </telerik:RadGrid>

Have even given the MasterTableView Width="95%".

Is there any option to rectify this.

-Anto

3 Answers, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 19 Jul 2013, 12:57 PM
Hello Anto,

I am afraid that the issue is not replicating on my side with the latest version of the controls. Moreover the provided snippet seem to be generic enough and there is nothing irregular in it, except that you should not use ItemStyle-Width property especially in combination with HeaderStyle-Width. The only reason this property exists is that it is inherited from TableItemStyle.

Please find attached a sample project where the grid behaves as expected, try to examine it and see what is the difference with respect to your real project that might be causing the problem.  Also try to disable the resizing and see if the issue persists.

Regards,
Venelin
Telerik
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 the blog feed now.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 14 Aug 2013, 10:18 AM
Hi Venelin,

If I change UsestaticHeader = "false" it works fine.

But I need to froze 2 Columns, So I need to have UsestaticHeader = "true".

Is there any other alternate solution for this. It affects all my pages.

-Anto
0
Venelin
Telerik team
answered on 19 Aug 2013, 08:02 AM
Hi Anto,

In principle, when using frozen columns feature,  the sum of the widths of the last visible columns must be less than or equal to the free space between the right border of the last frozen column and the right border of the grid. Otherwise you will not see the last column completely.

Alternatively you can try to set programmaticaly a sufficiently big width for the last column so that the content will be fully visible.

Regards,
Venelin
Telerik
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 the blog feed now.
Tags
Grid
Asked by
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Answers by
Venelin
Telerik team
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Share this question
or