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

Columns loose their width

3 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
marina
Top achievements
Rank 1
marina asked on 21 Jun 2011, 04:45 PM
I have a radgrid and because I wanted the expand button to be shown on the right most column part of the grid, i set in mastertableview the attribute ExpandCollapseColumn-Visible="false" and added a new GridTemplateColumn with a button that performs the expand command.

<telerik:GridTemplateColumn  ItemStyle-Width="27px" ItemStyle-Height="46px"  Resizable="false"                 >
            <ItemTemplate>              
                <asp:Button CommandName="ExpandCollapse" runat="server" ID="EC"   CssClass="expandbutton" />              
            </ItemTemplate>
        </telerik:GridTemplateColumn>
Obviously in code behind, I intercept my command and the nestedviewtemplate  in my case is shown correctly on expand. So far so good, expand and collpase work fine, the problem is that on expand,  the columns of my grid (outer grid) loose their size(some become smaller, same become larger than in the all collapsed state).  I tried setting Resizable=false on all GridTemplateColumn, but no result....
Any ideas? Can you please help?

Thank you,
 Marina

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 23 Jun 2011, 09:06 AM
Hi Marina,

Please remove all ItemStyle-Width declarations and use only HeaderStyle-Width - note that it is not recommended to use ItemStyle-Width to set column widths.

Let us know whether it makes any difference. If you still have problems, please send us the whole code for the grid you are using? We will check it and turn back to you with our findings.

Regards,
Pavlina
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
marina
Top achievements
Rank 1
answered on 24 Jun 2011, 03:30 PM
Thank you very much for your answer. Eventually I solved the problem by deleting from the first column of the grid both the attribute "HeaderStyle-Width" and "ItemStyle-Width".
0
Pavlina
Telerik team
answered on 24 Jun 2011, 04:26 PM
Hi Marina,

I am glad I was able to help. Please do not hesitate to contact us if other questions or problems arise.

Best wishes,
Pavlina
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.

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