Exemplo n.º 1
0
 private IndexColumn(IndexColumn source)
 {
     _parent  = source._parent;
     _column  = source._column;
     _mode    = source._mode;
     _collate = source._collate;
 }
Exemplo n.º 2
0
        internal IndexColumn(Index parent, DataRow row)
        {
            _parent = parent;
            if (row != null)
            {
                if (!row.IsNull("COLUMN_NAME"))
                {
                    _column = row["COLUMN_NAME"].ToString();
                }
                else
                {
                    _column = null;
                }

                if (row.IsNull("SORT_MODE") == false && (string)row["SORT_MODE"] != "ASC")
                {
                    _mode = ColumnSortMode.Descending;
                }

                if (row.IsNull("COLLATION_NAME") == false)
                {
                    _collate = row["COLLATION_NAME"].ToString().ToUpperInvariant();
                }
            }
        }
        public void SaveChanges()
        {
            view.BeginSort();
            view.ClearSorting();

            foreach (TreeListNode node in sortTree.Nodes)
            {
                GridColumn column = node["Column"] as GridColumn;
                if (column == null)
                {
                    continue;
                }
                ColumnSortMode  sortMode  = (ColumnSortMode)node["SortOn"];
                ColumnSortOrder sortOrder = (ColumnSortOrder)node["SortOrder"];
                column.SortMode  = sortMode;
                column.SortOrder = sortOrder;
            }
            view.EndSort();
        }
Exemplo n.º 4
0
 private IndexColumn(IndexColumn source)
 {
     _parent = source._parent;
       _column = source._column;
       _mode = source._mode;
       _collate = source._collate;
 }
Exemplo n.º 5
0
        internal IndexColumn(Index parent, DataRow row)
        {
            _parent = parent;
              if (row != null)
              {
            _column = row["COLUMN_NAME"].ToString();
            if (row.IsNull("SORT_MODE") == false && (string)row["SORT_MODE"] != "ASC")
              _mode = ColumnSortMode.Descending;

            if (row.IsNull("COLLATION_NAME") == false)
              _collate = row["COLLATION_NAME"].ToString().ToUpperInvariant();
              }
        }
Exemplo n.º 6
0
 void SetSortMode(string fieldName, ColumnSortMode sortMode)
 {
     grid.Columns[fieldName].SortMode = sortMode;
     grid.GroupBy(fieldName);
 }