Hello,
I am using a XamGrid 14.1 with RowSelection set to multiple and CellClickAction set to SelectRow. Selection is working fine but I have some Template Columns containing controls that can be worked with, without using edit mode. Clicking those controls messes up the selection made which makes it unusable for my scenario.
Is it possible to disable selection for these columns so that the made Row Selection does not change when a user works with the control? If it is not possible to do this for certain columns, is it possible to avoid changing the selection on all columns aside from the RowSelector? I tried to change the CellClickAction but the only other possible choice is SelectCell which also changes my selection even though CellSelection is set to None.
I also tried to change the slection settings on the CellClicked event but this is triggered after the selection has already changed and the regular MouseLeftButtonDown event isn't triggered at all. So I am currently out of ideas - please give me some hints how I could change this behavior.
Thanks
Hello ruud7,
I see that this is a duplicate question as to this other forum post you made on the WPF thread. http://es.infragistics.com/community/forums/t/89418.aspx
I have provided some feedback on the other thread. I also asked which platform you are working with so I know which thread to focus on.
Hello Rob,
Thank you for your reply. I am actually using the Silverlight version. I duplicated the post once I noticed that I used the wrong forum and didn't find any delete option for the old post. Sorry about that.
So as you said in Silverlight this seems to be quite complicated. I already tried reseting the selection on the CellClicked event because there I know which column the cell was in but this caused a noticable flicker of the selection because the event occured later. I also thought if it might be possible to avoid bubbling the event from the template control to the grid but this also didn't seem to work, even though I set the Handled flag to true. How would you go about finding out which column was pressed in the SelectedRowsCollectionChanged event? I think I did not quite get that.
Do you see any other option of maybe avoiding the click event being passed on to the XamGrid if it is on a template column or any event triggered before the selection changes so I can maybe disable the selection of the XamGrid?
Thanks.
That's the thing though, its not really possible to tell if the cell has been clicked unless you use CellClick. But this event doesn't happen until after the selection has already changed so that doesn't help us much. The workaround I proposed only checked to see if the mouse was over the cell when the selection changed, at which point it would revert the selection. It makes an assumption that if the mouse was over the cell when the selection changed, it was because the mouse was pressed. It's not the most ideal way but I don't see any other option. Silverlight doesn't have many of the mouse features that WPF has which would have made this much easier.
Let me know if you have any further questions on this.