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 need to implement the following customized selection behavior:
1) single click on row header column selects/unselects row (as in ListBoxSelectionMode == SelectionMode.MultiSimple
2) clicking on a non-row header column does not affect selection
I attempted to achieve this by setting SelectionMode to MultiSimple, handling SelectionChanging and canceling selection if user clicked outside the row header column, but both CurrentCell and MouseDown location are apparently not yet set when SelectionChanging is fired.
What would be the alternatives to try?
Gene Gorokhovsky
DataBoundGrid v 1.6.1.6
ADAdministrator Syncfusion Team October 3, 2003 02:36 PM UTC
It looks like you completely want to override the default selection behavior. In that case I suggest
disabling the MouseController that handles mouse selections.
Do that with
Grid.Model.Options.ControllerOptions &= ~GridControllerOptions.SelectCells;
Now that you have turned off default selection mechanism you can add your own cell selection logic
by handling the CellClick event and setting/resetting with SelectRange calls.
If that is not good for you need to take a close at the SelectionChanging event. One of its args is
a reason. There you can try cancelling resetting selection, adding selections etc. But you have to take
a good look and add some Trace output when this event is called. Not sure if it will get you all the
way to what you want to implement but also worth a try.
Stefan
GGGene GorokhovskyOctober 9, 2003 03:13 PM UTC
I was able to implement required behavior by checking Cursor.Position in SelectionChanging, and canceling it when cursor is not over row headers. CurrentCell did not work because it is set after SelectionChanging fires.
Thanks,
Gene