Example #1
0
        /// <summary>
        /// Handles selection when the selection property such as SelectedIndex,SelectedItem and SelectionMode value changes occurred.
        /// </summary>
        /// <param name="handle">
        /// The <see cref="Syncfusion.UI.Xaml.Grid.SelectionPropertyChangedHandlerArgs"/> that contains the corresponding property name and its value changes.
        /// </param>
        /// <remarks>
        /// This method is invoked when the selection property values such as SelectedIndex,SelectedItem and SelectionMode are changed in SfTreeGrid.
        /// </remarks>
        public virtual void HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs handle)
        {
            switch (handle.PropertyName)
            {
            case "SelectedItem":
                ProcessSelectedItemChanged(handle);
                break;

            case "SelectedIndex":
                ProcessSelectedIndexChanged(handle);
                break;

            case "SelectionMode":
                ProcessSelectionModeChanged(handle);
                break;

            case "NavigationMode":
                ProcessNavigationModeChanged(handle);
                break;

            case "CurrentItem":
                ProcessCurrentItemChanged(handle);
                break;
            }
        }
 public override void HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs handle)
 {
     if (IsSuspended || (handle.NewValue == null && handle.OldValue == null))
     {
         return;
     }
     if (TreeGrid.CheckBoxSelectionMode == CheckBoxSelectionMode.SelectOnCheck && (handle.PropertyName == "SelectedItem" || handle.PropertyName == "SelectedIndex" || handle.PropertyName == "CurrentItem"))
     {
         throw new InvalidOperationException("It is not possible to set selection using SelectedItem/SelectedIndex/CurrentItem programmatically when CheckBoxSelectionMode is SelectOnlyOnCheckBoxClick");
     }
     base.HandleSelectionPropertyChanges(handle);
 }
Example #3
0
 /// <summary>
 /// Processes the selection when the <see cref="Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.CurrentItem"/> property value changes.
 /// </summary>
 /// <param name="handle">
 /// The <see cref="Syncfusion.UI.Xaml.Grid.SelectionPropertyChangedHandlerArgs"/> contains the data for the <see cref="Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.CurrentItem"/> property value changes.
 /// </param>
 protected internal virtual void ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs handle)
 {
 }
Example #4
0
 /// <summary>
 /// Processes the selection when the <see cref="Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.NavigationMode"/> property value changes.
 /// </summary>
 /// <param name="handle">
 /// The <see cref="Syncfusion.UI.Xaml.Grid.SelectionPropertyChangedHandlerArgs"/> contains the data for the <see cref="Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.NavigationMode"/> property value changes.
 /// </param>
 protected virtual void ProcessNavigationModeChanged(SelectionPropertyChangedHandlerArgs handle)
 {
 }
Example #5
0
 /// <summary>
 /// Processes the selection when the <see cref="Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.SelectedIndex"/> property value changes.
 /// </summary>
 /// <param name="handle">
 /// The <see cref="Syncfusion.UI.Xaml.Grid.SelectionPropertyChangedHandlerArgs"/> contains the data for the <see cref="Syncfusion.UI.Xaml.TreeGrid.SfTreeGrid.SelectedIndex"/> property value changes.
 /// </param>
 protected internal virtual void ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs handle)
 {
 }