View previous topic :: View next topic |
Author |
Message |
egl
Joined: 27 Jun 2006 Posts: 15 Location: Switzerland
|
Posted: Tue Jul 04, 2006 9:37 am Post subject: Deselect Row with single click |
|
|
Hello,
i've got a simple problem.
if you want to deselect an selected row you have to press ctrl while you click. this is to less intuitiv in our case. i want it make it possible to deselect with a simple click on a row allready selected. the tree is always single-selected.
how can i do that?
thanks
egl |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jul 05, 2006 12:41 am Post subject: |
|
|
You would need to derive a new class from Virtual Tree and override the SelectRow method as follows:
Code: | protected override void SelectRow(Row row)
{
if (row.Selected)
{
if (AllowSelectionChange(row, row, SelectionChange.Clear))
{
SelectedRows.Clear();
}
}
else
{
base.SelectRow(row);
}
} |
_________________ Infralution Support |
|
Back to top |
|
|
|