The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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.
ANAlexandre NicholasMay 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 ?
ADAdministrator 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).