TTMSFMXGrid OnSelectRange

Hi Pieter


I need an event that fires when a range of cells is selected - OnSelectCell just returns the last cell in the range. I'm looking at the source code to see if I can add it myself, but thought I'd ask first - any chance of this in the near future?

Thanks, Bob

In the OnSelectCell you can simply get the Selection range with


TMSFMXGrid1.Selection which is a TCellRange record.

Kind Regards, 
Pieter

Ok thanks that works. I've got another problem though. I have a single grid and a tab control and I switch the parent for my grid as the user selects different tabs. I have a separate object that tracks the current selection for each tab and restores the selected range on the grid as the tabs are changed (using SelectCells).


In my code I use FActiveGrid.SetFocus in the change handler and everything looks fine when I change tabs. However, if I then click on a different cell and drag a new selection the selected range starts at the original cell rather than the new cell I've clicked. I need to click on the new cell first, then start to drag the new range using a separate click.

Any ideas? I can put a demo project together if that helps.

Kind regards, Bob

Hi, 


We have tried it here, but couldn't reproduce it. Can you send us your sample so we can investigate this here?

Kind Regards, 
Pieter