Пример #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Removes groups from the specified grid.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 public static void UnGroup(PaWordListGrid grid)
 {
     if (grid != null)
     {
         Utils.SetWindowRedraw(grid, false, false);
         WordListGroupingBuilder builder = new WordListGroupingBuilder(grid);
         builder.InternalUnGroup();
         Utils.SetWindowRedraw(grid, true, true);
         App.MsgMediator.SendMessage("AfterWordListUnGroupedByField", grid);
     }
 }
Пример #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Creates (or refreshes) groups in the specified grid. (This method will also
        /// ungroup if the grid's GroupByField property is not null).
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public static void Group(PaWordListGrid grid)
        {
            if (grid != null)
            {
                Utils.SetWindowRedraw(grid, false, false);
                var builder = new WordListGroupingBuilder(grid);
                builder.InternalGroup();
                Utils.SetWindowRedraw(grid, true, true);
                grid.Invalidate();

                if (grid.GroupByField != null)
                {
                    App.MsgMediator.SendMessage("AfterWordListGroupedByField", grid);
                }
            }
        }