Convention on SelectedCellsChanged with RadGridView

Topics: Conventions
Feb 3, 2014 at 2:05 PM
Hello,
I was using the following convention for the SelectionChanged on RadGridView
            ConventionManager.AddElementConvention<DataControl>(DataControl.ItemsSourceProperty, "SelectedDataItem",
             "SelectionChanged")
                    .ApplyBinding = (viewModelType, path, property, element, convention) =>
                    {
                        if (!ConventionManager.SetBindingWithoutBindingOrValueOverwrite(viewModelType,
                         path,
                         property,
                         element,
                         convention,
                         DataControl.ItemsSourceProperty))
                            return false;

                        if (ConventionManager.HasBinding(element, DataControl.SelectedItemProperty)) return true;
                        var index = path.LastIndexOf('.');
                        index = index == -1 ? 0 : index + 1;
                        var baseName = path.Substring(index);
                        foreach (var selectionPath in
                                from potentialName in ConventionManager.DerivePotentialSelectionNames(baseName)
                                where
                                        viewModelType.GetProperty(potentialName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance) !=
                                        null
                                select path.Replace(baseName, potentialName))
                        {
                            var binding = new Binding(selectionPath) { Mode = BindingMode.TwoWay };
                            BindingOperations.SetBinding(element, DataControl.SelectedItemProperty, binding);
                        }
                        return true;
                    };
and it was working till I had to change the Selection mode from FullRow to "Cell", in that wat the selecteditem is not fired but the event fired is SelectedCellsChanged.

I'm not able to write a convention for updating the selecteditem...anyone can help me?
Thanks