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


This event (QueryColWidth) is raised even when mouse is moving on the grid. I don't understand why it does that. Is there another event that can replace this one as the Resizingcolumns ? i have to fill the last column to the end of the edge thanks

3 Replies

AD Administrator Syncfusion Team May 12, 2003 12:35 PM UTC

I think QueryColWidth is probably the only event you need to size the last column to fill the grid. Here is a little sample.

AN Alexandre Nicholas May 12, 2003 01:39 PM UTC

But, whit does this event is raised with an mouse mouve move ? i think it's a lot of call for nothing. do i am wrong ?

AD Administrator Syncfusion Team May 12, 2003 02:44 PM UTC

Yes, QueryColWidth is called as you move the mouse to get the size of the columns so the grid can determine what cell the mouse is over. Normally, this computing is neglible in the process of moving the mouse. It also makes the column widths completely dynamic, so they can be changed on the fly in a completely arbitrary way, and you will see the changes reflected immediately. If you want to do this deterministically, then it is a little more cumbersome to handle things like your user sizing a column. With the QueryColWidth implementation, all this happens completely dynamically. But if you are going to try to explicitly set column widths, then it takes some effort. You should handle both the grid SizeChanged event, and the GridRsizingColumns event. In both places you would have to execute code to compute and set the width of the last column, based on the size of the other columns. In ResizingColumns, you would only want to do this if the e.Reason is GridResizeCellsReason.MouseUp (ignoring the other calls to this event).

Live Chat Icon For mobile
Up arrow icon