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

Column Width Not Respected in Detail Table with CommandItemDisplay="Top"

8 Answers 166 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Baz
Top achievements
Rank 1
Baz asked on 08 Apr 2011, 11:42 AM
I have a Grid with a hierarchy with a single nested GridTableView. I have specified column widths using the recommended approach of setting the HeaderStyle-Width for each column.

The column widths are respected when there is no CommandItem bar displayed (CommandItemDisplay="None") or the CommandItem bar is on the bottom (CommandItemDisplay="Bottom").  However, as soon as the CommandItem bar is displayed on the top (CommandItemDisplay="Top"), column widths are no longer respected and can no longer be resized as well.

Bug?

Thank you,

Barry

EDIT:
This appears to be happening in Google Chrome (10.0.648.204).  The column widths are rendered correctly in IE8 and FireFox 4. I have not tested in Safari.

8 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 13 Apr 2011, 05:34 PM
Hello Baz,

I have tried to reproduce the issue using Chrome 10.0.648.204 and RadControls for ASP .NET AJAX version 2011.1.315, but without success. Attached is the sample project that I used for local testing. Please review it and let me know whether I am missing something from your scenario.

Kind regards,
Martin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Baz
Top achievements
Rank 1
answered on 13 Apr 2011, 06:07 PM
Martin,

Thanks for looking into the issue.  I decided to recreate my RadGrid from scratch after I noticed the problem and have been unable to duplicate the column resizing issue myself.  If I see it happen again, I'll save the project and open a support ticket.

Thanks again,

Baz
0
Daniel
Top achievements
Rank 1
answered on 29 Aug 2011, 09:53 PM
I have the same issue. I have a grid with just one template column that I have a formatted table in.
Everything is fine until I put UseStaticHeaders="true" in the Scrolling tab.
<telerik:RadGrid ID="rgCurrent" DataSourceID="SqlDataSource1" GridLines="None" ShowHeader="false" ShowFooter="true"
                    runat="server" AutoGenerateColumns="False" Skin="Windows7" Height="765px">
                    <ClientSettings>
                        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" />
                    </ClientSettings>
                    <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="PatientId" CommandItemDisplay="Top" Width="1060px">
                        <Columns>
                            <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/save.gif" CommandName="Update"
                                CommandArgument="PatientId" HeaderStyle-Width="5px"></telerik:GridButtonColumn>
                            <telerik:GridTemplateColumn>
                                <ItemTemplate>
                                    <table border="0" cellpadding="0" cellspacing="0">

0
Pavlina
Telerik team
answered on 01 Sep 2011, 12:53 PM
Hello Latisha,

Can you please verify that the problem does not persist when you remove CommandItemDisplay="Top" from your declaration?

Kind regards,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Daniel
Top achievements
Rank 1
answered on 01 Sep 2011, 01:34 PM
When I have CommandItemDisplay="Top" AND UseStaticHeaders="true" together, the width is extended.
If I only put in one or the other, it's fine.
I need to have the CommandItems displayed and I also need to use static headers. Is there a solution for this?

Thank you for your prompt respons,
Tisha
0
Pavlina
Telerik team
answered on 02 Sep 2011, 03:14 PM
Hi Latisha,

Please find attached a test project based on the provided code which is working properly. Give it a try and let me know if any questions arise.

Additionally, I recommend that you examine the forum thread below which elaborates on best practice for grid and column widths:
http://www.telerik.com/community/forums/aspnet/grid/best-practice-for-grid-and-column-widths.aspx#1214355

Best wishes,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Daniel
Top achievements
Rank 1
answered on 02 Sep 2011, 04:33 PM
Pavlina,

I put your RadGrid exactly as you had it on my page using my datasource and it is still stretched out.
I have attached an image for example.
It looks fine in Chrome, but in IE8 and Firefox version 3.6.15 it is stretched.

Thank you,
Latisha
0
Pavlina
Telerik team
answered on 03 Sep 2011, 11:37 AM
Hello Latisha,

To overcome this behaviour you can try preventing wrap of cell content in RadGrid, so the width of the columns is consistent across all supported browsers:
http://www.telerik.com/help/aspnet-ajax/grid-no-wrap-for-grid-cell-content.html

Give this suggestion a try and let me know how it goes.

All the best,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Baz
Top achievements
Rank 1
Answers by
Martin
Telerik team
Baz
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or