Exemplo n.º 1
0
        void fg_AfterDragColumn(object sender, C1.Win.C1FlexGrid.DragRowColEventArgs e)
        {
            // sort the recordset when the user drags columns
            // this will cause a data refresh, removing all subtotals and
            // firing the AfterDataRefresh event, which rebuilds the subtotals.
            string    sort = fg.Cols[1].Name + ", " + fg.Cols[2].Name + ", " + fg.Cols[3].Name;
            DataTable dt   = (DataTable)fg.DataSource;

            dt.DefaultView.Sort = sort;
        }
Exemplo n.º 2
0
        private void fg_BeforeDragColumn(object sender, C1.Win.C1FlexGrid.DragRowColEventArgs e)
        {
            // get range with merged columns
            CellRange rg = fg.GetMergedRange(_rowDown, e.Col);

            // calculate parameters to move column range
            int indexOld = rg.LeftCol;
            int indexNew = e.Position;
            int count    = rg.RightCol - rg.LeftCol + 1;

            if (indexOld < indexNew)
            {
                indexNew = indexNew - count + 1;
            }

            // move column range
            fg.Cols.MoveRange(indexOld, count, indexNew);

            // cancel default processing, we're done
            e.Cancel = true;
        }
Exemplo n.º 3
0
 void _flex_AfterDragColumn(object sender, C1.Win.C1FlexGrid.DragRowColEventArgs e)
 {
     updateDataTree();
 }