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

How resize last column when before exist column with width="*"

1 Answer 280 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 23 Aug 2017, 04:55 AM

Code to reproduce

<telerik:RadGridView>
<telerik:RadGridView.Columns>
<telerik:GridViewColumn Width="100"
Header="1" />
<telerik:GridViewColumn Width="*"
Header="2" />
<telerik:GridViewColumn Width="100"
Header="3" />
<telerik:GridViewColumn Width="100"
Header="4" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>

 

I can't resize last column. It is bug?

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 25 Aug 2017, 04:06 PM
Hello John,

This behavior was introduced to resolve a resizing issue in the control. So, currently resizing the last row in a scenario with 'star' Width of the columns is forbidden.

In order to alter this you can include a dummy column with Width of 0 pixels at the end of the Columns collection of the gridview. Here is an example:
<telerik:RadGridView>
    <telerik:RadGridView.Columns>
        <telerik:GridViewColumn Width="100" Header="1" />
        <telerik:GridViewColumn Width="*" Header="2" />
        <telerik:GridViewColumn Width="100" Header="3" />
        <telerik:GridViewColumn Width="100" Header="4"  />
        <telerik:GridViewColumn Width="0" MinWidth="0"/>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Regards,
Martin Ivanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
John
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or