in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

How to find a Cell Backcolor

Last post 11/8/2008 1:17 PM by PANKAJ SINGH. 0 replies.
Page 1 of 1 (1 items)
Sort Posts:
Previous Next
  • 11/8/2008 1:17 PM

    How to find a Cell Backcolor

     Hi,

    I wish to have cells with same text to be painted similar.

    So i am handling the CustomDrawCell Event and looping through all the cells collection by

    pivotGridControl.Cells.ColumnCount  and pivotGridControl.Cells.RowCount

     

    I check the displaytext property. If I find a match I wish to paint it similar.

    But I cannot find the backcolor property somehow. I may be missing something.

    I am sending my code.. Have a look and let me know how can I find the backcolor of a cell.

     

     

     

     

     

     

     

     

     

     

    void pivotGridControlTimeLog_CustomDrawCell(object sender, DevExpress.XtraPivotGrid.PivotCustomDrawCellEventArgs e)

    {

     

    DevExpress.XtraPivotGrid.

    PivotCellEventArgs cellInfo;

     

     

    for (int i = 0; i <= pivotGridControlTimeLog.Cells.ColumnCount - 1; i++)

    {

     

     

                 for (int  j = 0; j <= pivotGridControlTimeLog.Cells.RowCount - 1; j++)

                 {

                          cellInfo = pivotGridControlTimeLog.Cells.GetCellInfo(i, j);

     

     

                           if (cellInfo.DisplayText == e.DisplayText)

                           {

                                      e.Appearance.BackColor = 

    //What should I have here ???????

                            }

                   }

    }

    }

Page 1 of 1 (1 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED