Welcome to the Xceed Community | Help
Community Search  

How do I access the ColumnManagerRow?

Sort Posts: Previous Next
  •  11-17-2008, 5:52 AM Post no. 16925

    How do I access the ColumnManagerRow?

    Hi

    I am trying to set the 'Background' property on the ColumnManagerRow. How do I get hold of an instance of this class in order to set the property?

    Thanks

    Nick

  •  11-17-2008, 6:07 AM Post no. 16928 in reply to 16925

    Re: How do I access the ColumnManagerRow?

    Prove this :

    ColumnManagerRow managerRow = new ColumnManagerRow();
    managerRow.BackColor =
    Color.White;

    this.gridControl1.FixedHeaderRows.Remove(this.gridControl1.FixedHeaderRows[0]);
    gridControl1.FixedHeaderRows.Add(managerRow);

    But , this works only when the UIStyle is set to System or WindowsClassic. I know that this is not a manner get hold the instance of this class, but at least it work. I hope this is useful for you
    Edi

  •  11-17-2008, 6:16 AM Post no. 16929 in reply to 16928

    Re: How do I access the ColumnManagerRow?

    There is a better solution :

    this.gridControl1.FixedHeaderRows[0].BackColor = Color.White;

  •  11-17-2008, 4:33 PM Post no. 16950 in reply to 16929

    Re: How do I access the ColumnManagerRow?

    If you drop the GridControl in the designer, this will be the second row in the FixedHeaderRows collection, the first being the GroupByRow.  You can access it through the variable created by the designer or as shown above, by the FixedHeaderRows collection.

    e.g.:

    columnManagerRow1.BackColor = Color.Blue;

    or

    ColumnManagerRow colManager = gridControl1.FixedHeaderRows[ 1 ] as ColumnManagerRow;

    colManager.BackColor = Color.Blue;

     

    If you want this to work, whatever theme is selected for the grid (through the UIStyle property), set the OverrideUIStyle property to true.

    e.g.;

    columnManagerRow1.OverrideUIStyle = true;

    columnManagerRow1.BackColor = Color.Blue;

     


    André
    Software Developer and Tech Support
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.