We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Column resizing

I am extending a cell to fit the client area. If the user is resizing a column a strange behaviour occurs: The grid isn't probably redrawn (the right border of the extended cell isn't redrawn). So I added a Refresh to the ColumnResizing event of the grid. That works with delay - only if the user moves the mouse cursor at least 1 pixel. What am I doing wrong?

8 Replies

AD Administrator Syncfusion Team March 30, 2003 02:31 PM UTC

Try setting the grid's SmoothControlResize property to false. When you expose more grid as you resize the control, unless this property is false, the grid will try to only redraw the newly exposed portions. But if you are doing something like dynamically sizing the last column, just redrawing the newly exposed pieces of the grid is not sufficient. So, setting the property to false will make the grid redaw itself during the resizing as required in this case.


PE Peter March 31, 2003 05:23 AM UTC

Changing SmoothControlResize to false does not change anything at this behaviour. If I resize the column that is left to the "extended column" all works fine but if I try to resize the column taht is right to the extended column the control isn't correctly resized.


AD Administrator Syncfusion Team March 31, 2003 07:23 AM UTC

I am not sure I fully understand what you are describing. Attached is a sample the makes the an inside column resize itself so the columns occupy the full client width of the grid. It does not show a redraw problem. How does this differ from what you are strying to do?


PE Peter March 31, 2003 09:16 AM UTC

????? You don't have redrawing problems? I do. First, what you do in your sample is exactly what I do. And if I start your application and resize column D, E or F the left border of the resized column isn't redrawn correctly.


AD Administrator Syncfusion Team March 31, 2003 09:28 AM UTC

I was using the 1.6 code base and do not see the problem. When I tried it with the latest public release, 1.5.2.0, I do see the problem. The 1.6 code base will be released in a week or so. Until then, refreshing the special column in ColWidths changed avoided the problem for me.
Private Sub gridControl1_ColWidthsChanged(ByVal sender As Object, ByVal e As GridRowColSizeChangedEventArgs) Handles gridControl1.ColWidthsChanged
        Me.gridControl1.RefreshRange(GridRangeInfo.Col(specialColumn))
    End Sub


PE Peter March 31, 2003 09:45 AM UTC

Very nice, it works fine. Thanx


PE Peter March 31, 2003 09:49 AM UTC

There isn't a ComboBoxCellType with displaying image capabilities or a TexBoxCellType with charactercasing capabilities in the soon released version 1.6, is it?


AD Administrator Syncfusion Team March 31, 2003 12:13 PM UTC

Charactercasing will be readily available in 1.6, but there are no plans for a an image combobox (other than the current support in a GridListControl celltype now).

Loader.
Live Chat Icon For mobile
Up arrow icon