Esempio n. 1
0
    public string[] VisibleColumnNamesArray()
    {
        GridColsCollection columns = VisibleColumns();

        if ((columns == null) || columns.Count == 0)
        {
            return(new string[] { "" });
        }
        string[]       colArray = new string[columns.Count + 1];
        GridColsColumn gcc      = null;

        for (int i = 0; i <= columns.Count; i++)
        {
            gcc = columns.ItemByColumnOrder(i);
            if ((gcc != null) && gcc.Visible)
            {
                colArray[i] = gcc.ColumnName;
            }
        }

        return(colArray);
    }
Esempio n. 2
0
    public GridColsCollection CurrentOrderedColumns()
    {
        GridColsCollection oColumns = new GridColsCollection();

        for (int i = 0; i < _Columns.Count; i++)
        {
            GridColsColumn testColumn = _Columns.ItemByColumnOrder(i);
            if ((testColumn == null) == false)
            {
                if (testColumn.CanReorder == true & testColumn.Viewable == true)
                {
                    oColumns.Add(testColumn.ColumnName, testColumn.DisplayName, testColumn.Visible, testColumn.CanSort);
                    oColumns.Item(oColumns.Count - 1).ColumnIndex = testColumn.ColumnIndex;
                    oColumns.Item(oColumns.Count - 1).Viewable    = testColumn.Viewable;
                }
            }
        }
        return(oColumns);
    }