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

Resize column no longer possible (2008Q2 -> 2008.3.1204/2008.3.1321)

2 Answers 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 29 Jan 2009, 03:13 PM

Hello Telerik team,

I used to have set of columns that have a MinWidth and MaxWidth set by designs. Resizing is allowed.

The MinSize is being used to set a default minimal width when shown initially 

Once the control has been painted it should set the minimum width of the rows to Zero, so that the user can adjust the width to their own desire.

This is shown in the following code...


 

 

 

 

private bool _isFirstPaint = true;

 

 

 

 

private void MyGridViewContainer_Paint(object sender, PaintEventArgs e)

 

{

 

 

 

if (_isFirstPaint == true)

 

{

 

 

 

//after 1st draw, we reset the minimum column width so that the collumns can be resized by the user below the initial minimum width set by design.

 

 

 

 

 

 

 

 

 

 

foreach (GridViewColumn column in this.radGridView1.Columns)

 

{

column.MinWidth = 0 ;

}

 

 

 

this.Paint -= new PaintEventHandler(MyGridViewContainer_Paint

_isFirstPaint = false;

 

}

 

 

 

 

else

 

 

 

 

 

 

 

{

_isFirstPaint =

 

 

false;

 

}

}



The problem is that this used to work with the 2008Q2 version, but not with the above versions.
Since we now switched to 2008.3.1204 and just a little later to 2008.3.1321, this problem has arrisen.

Please let us know what to do to overcome this change in behaviour.

Kind regards,

Jack

 

 

2 Answers, 1 is accepted

Sort by
0
Jack
Top achievements
Rank 1
answered on 29 Jan 2009, 03:36 PM
After some trials it seems that setting the MinWidth to '1' instead of  '0' does the trick.

This tells me that Telerik has  decided to interpret the value of the MinWidth differently. Which in my opinion should be noted in the changelog of the breaking release.


Kind regards,

Jack
0
Jack
Telerik team
answered on 30 Jan 2009, 06:37 PM
Hello Jack,

Thank you for reporting this issue.

I am glad that you have found a work around. We didn't changed intentionally the MinWidth behavior in our latest release. This is an issue and we will address it in our upcoming release - Q1 2009. I have added points to your account for the suggestions.

Should you have any further questions, do not hesitate to write us back.

Best wishes,
Jack
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Jack
Top achievements
Rank 1
Answers by
Jack
Top achievements
Rank 1
Jack
Telerik team
Share this question
or