PDA

View Full Version : Every action over the grid resizes the width columns.



csanchezr85
31 Aug 2012, 3:05 AM
Hello,

I have a problem when sort by a column, refresh the grid data, resize the grid...every action is resizing the columns, making them smaller (the property modified is the width).

3837538376

As you can see, the second image is the same grid after being sorted a lot of times.

I have solved the problem when refresh the grid with new data re-drawing the columns, but this solution is not able to apply when user sorts. I've seen too that adding the 'flex' property with value 1 the columns don't resize, but this is another trouble because I want to set the 'width' property and using 'flex' the 'witdth' isn't applied.

Is there any solution to solve this without re-render columns and that let me set the columns width?

Thanks in advance.

vietits
31 Aug 2012, 5:58 AM
It's difficult to say without looking at your code. One thing that you should check is that values for column width must be numeric not string.

csanchezr85
2 Sep 2012, 10:30 PM
Thanks vietits for your answer. Your solution has worked for me. The problem was that I give a width in string format, something similar to '150px' but I've changed the value to 150, and it works fine.