public void ClearAll(HelpSortItem actualItem, bool refreshDocument)
 {
     ClearSorting();
     ResetItemsCaption(actualItem);
     if (refreshDocument)
     {
         RecreateDocument();
     }
 }
 private void InitHeaderCells(List <XRLabel> sortCells)
 {
     PopulateHeaderCells(sortCells);
     foreach (XRLabel lbl in sortCells)
     {
         string       fieldName = lbl.Tag.ToString().Substring(lbl.Tag.ToString().IndexOf('_') + 1);
         string       caption   = lbl.Text;
         HelpSortItem item      = new HelpSortItem(this, lbl, Menu, fieldName, caption);
         sortItems.Add(item);
         lbl.PreviewMouseDown += lbl_PreviewMouseDown;
     }
 }
        private void DoSort(XRColumnSortOrder realOrder)
        {
            HelpSortItem cellSortInfo       = this;
            string       fieldName          = cellSortInfo.FieldName;
            GroupField   item               = new GroupField(fieldName, realOrder);
            GroupField   groupFieldToRemove = DataBand.SortFields.OfType <GroupField>().FirstOrDefault(x => x.FieldName == fieldName);

            if (groupFieldToRemove != null)
            {
                DataBand.SortFields.Remove(groupFieldToRemove);
            }
            DataBand.SortFields.Add(item);
        }
        internal void ResetItemsCaption(HelpSortItem actualItem)
        {
            SortOrder order = SortOrder.None;

            foreach (HelpSortItem item in sortItems)
            {
                if (actualItem != null && item == actualItem)
                {
                    continue;
                }
                else
                {
                    item.ColumnSortOrder = order;
                }
            }
        }
        private void manager_ItemClick(object sender, ItemClickEventArgs e)
        {
            BarItem      clickedMenuItem = e.Item;
            HelpSortItem item            = null;

            if (clickedMenuItem != null && clickedMenuItem.Tag != null && clickedMenuItem.Tag is SortOrder)
            {
                item = ClickedItem;
                SortOrder newSortOrder = (SortOrder)clickedMenuItem.Tag;
                item.ColumnSortOrder = newSortOrder;
            }
            if (item != null && item.Modified)
            {
                RecreateDocument();
            }
        }
 public void ClearAll(HelpSortItem actualItem)
 {
     ClearAll(actualItem, true);
 }
        private void lbl_PreviewMouseDown(object sender, PreviewMouseEventArgs e)
        {
            XRLabel clickedCell = sender as XRLabel;

            ClickedItem = (HelpSortItem)sortItems.FirstOrDefault(x => x.HeaderCell == clickedCell);
        }