Posted 6 December 2017, 10:02 am EST
I am handling row selection of a FlexGrid like so:
<grid:FlexGrid
x:Name="Grid1"
SelectionMode="Row"
SelectionChanged="Grid1_OnSelectionChanged"
AutoGenerateColumns="True" />
What I need is the ability to deselect the row should a certain condition exist.
private void Grid1_OnSelectionChanged(object sender, GridCellRangeEventArgs e)
{
if(MyCondition)
{
//((FlexGrid) sender).Selection = null;
((FlexGrid)sender).Select(new GridCellRange(-1, -1), false);
}
}
What I would expect to happen is for this event to fire once when I click the row, and then fire again if my condition is true and I programatically deselect any row. In v2.4.20173.195 this worked as expected. As of v2.4.20173.222 and continuing on into v2.4.2017.234, this event fires four times. First for the range of the clicked row, then for the new row I programatically selected, then again for the clicked row, then again for the new row I programatically selected.