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.
I have a grid derived from GridControl. Under certain circumstance, I want selection of a cell to actually select the entire row and sometimes multiple rows.
How would I handle this? If I handle the SelectionChanging event can I then modify the range that''s passed in? What is the proper way to set the selection to one or more entire rows?
ADAdministrator Syncfusion Team October 4, 2004 12:51 PM UTC
>> If I handle the SelectionChanging event can I then modify the range that''''s passed in?
Yes, you can modify e.Range. But make sure you test it for not being empty. This event is raised when selections are cleared with e.Range = empty.
ADAdministrator Syncfusion Team October 4, 2004 03:03 PM UTC
I''m getting some unusual behavior.
When I select a cell, the SelectionChanging event gets called with the Empty but not with the cell selection. Row selection (which is also enabled) works fine. The SelectionChanging gets called with empty to remove the previous selection and then it gets called again with the new selection.
AllowSelection is set to Row | Cell
Pete
ADAdministrator Syncfusion Team October 4, 2004 03:56 PM UTC
By selecting a cell, do you mean making it the current cell? If so, the default behavior is to not include the currentcell as part of the selections. (Being the currentcell and being selected are not treated as the same thing.)
If you set ExcelLikeCurrentCell, then the current cell will be treated as part of the selections. You may also want to turn on ExcelLikeSelectionFrame in this case also.
If you do not want this look, then you could try handling CurrentCellMoved, and if the current cell is not part of the selections, then explicilty add it to the selections.