예제 #1
0
 /// <summary>
 /// Check BeginInit is already called. If not need to call BeginInit
 /// </summary>
 /// <param name="view">View</param>
 internal static void BeginInit(ICollectionViewAdv view)
 {
     // If view is not in DeferRefresh, need to call BeginInit
     if (!view.IsInDeferRefresh)
     {
         view.BeginInit();
     }
 }
예제 #2
0
        /// <summary>
        /// While reusing DetailsViewDataRow, need to clear DetailsViewDataGrid properties
        /// </summary>
        /// <param name="view">DetailsViewDataGrid's view</param>
        internal static void ClearViewProperties(ICollectionViewAdv view)
        {
            // Check view is in Defer refresh
            var isIndeferRefresh = view.IsInDeferRefresh;

            if (view.SortDescriptions != null && view.SortDescriptions.Any())
            {
                DetailsViewHelper.BeginInit(view);
                view.SortDescriptions.Clear();
            }
            if (view.FilterPredicates != null && view.FilterPredicates.Any())
            {
                DetailsViewHelper.BeginInit(view);
                view.FilterPredicates.Clear();
            }
            if (view.GroupDescriptions != null && view.GroupDescriptions.Any())
            {
                DetailsViewHelper.BeginInit(view);
                view.GroupDescriptions.Clear();
            }

            if (view.SortComparers != null && view.SortComparers.Any())
            {
                DetailsViewHelper.BeginInit(view);
                view.SortComparers.Clear();
            }
            if (view.Filter != null)
            {
                DetailsViewHelper.BeginInit(view);
                view.Filter = null;
            }
            if (view.GroupComparer != null)
            {
                DetailsViewHelper.BeginInit(view);
                view.GroupComparer = null;
            }
            if (view.CaptionSummaryRow != null)
            {
                DetailsViewHelper.BeginInit(view);
                view.CaptionSummaryRow = null;
            }
            if (view.SummaryRows != null && view.SummaryRows.Any())
            {
                DetailsViewHelper.BeginInit(view);
                view.SummaryRows.Clear();
            }
            if (view.TableSummaryRows != null && view.TableSummaryRows.Any())
            {
                DetailsViewHelper.BeginInit(view);
                view.TableSummaryRows.Clear();
            }
            // If view is in DeferRefresh and already BeginInit is not called, need to call EndInit
            if (view.IsInDeferRefresh && !isIndeferRefresh)
            {
                view.EndInit();
            }
        }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="Syncfusion.UI.Xaml.Grid.GridXElementAttributesProvider"/> class.
 /// </summary>
 /// <param name="view">
 /// The corresponding view.
 /// </param>
 /// <param name="_dataGrid">
 /// The SfDataGrid.
 /// </param>
 public GridXElementAttributesProvider(ICollectionViewAdv view, SfDataGrid _dataGrid)
     : base(view)
 {
     dataGrid = _dataGrid;
 }
 /// <summary>
 /// Initializes a new instance of <see cref="Syncfusion.UI.Xaml.Grid.GridItemsSourceChangedEventArgs"/> class.
 /// </summary>
 /// <param name="originalSource">
 /// The source of the event.
 /// </param>
 /// <param name="oldItemsSource">
 /// The old ItemsSource of the SfDataGrid.
 /// </param>
 /// <param name="newItemsSource">
 /// The new ItemsSource of the SfDataGrid.
 /// </param>
 /// <param name="oldView">
 /// The old View of the SfDataGrid.
 /// </param>
 /// <param name="newView">
 /// The new View of the SfDataGrid.
 /// </param>
 public GridItemsSourceChangedEventArgs(object originalSource, object oldItemsSource, object newItemsSource, ICollectionViewAdv oldView, ICollectionViewAdv newView)
     : base(originalSource)
 {
     this.OldItemsSource = oldItemsSource;
     this.NewItemsSource = newItemsSource;
     this.OldView        = oldView;
     this.NewView        = newView;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of <see cref="Syncfusion.UI.Xaml.Grid.GridItemPropertiesProvider"/> class.
 /// </summary>
 /// <param name="view">
 /// The corresponding view.
 /// </param>
 /// <param name="_dataGrid">
 /// The SfDataGrid.
 /// </param>
 public GridItemPropertiesProvider(ICollectionViewAdv view, SfDataGrid _dataGrid)
     : base(view)
 {
     dataGrid = _dataGrid;
 }