FreeSelection but only one range

Apr 29, 2009 at 7:22 AM
Edited Apr 29, 2009 at 9:50 AM
I need allow to user to select one range in the grid, but only one range, if the user use Ctrl+(select another range) que exist select range may be deleted.

How I can do it?

I try do it in the SelectionChanged event, but not run properly ...

Thanks

(EDIT)

In additon, i create a grid 100x100 to allow users to select a range and span it. Then i created an areas to describe a graphical schema. The problem is MaxSpan, if i set MaxSpan to 100, when i selected an area up to 15x15 the grid turn very slow :( How i can solve this? Any sugestion?

Now I get the start cell and set the RowSpan and ColumnSpan properties to range lenght. The other cells contais in this range may be deleted, i do:
grid[r,c] = null;

If i not delete the other cells, the grid not turn slow.

How i can remove the other cells whitout decrease the performacne? 

Thanks