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

change color of a cell at runtime

Last post 11/25/2008 7:39 AM by Rafael Mateo. 6 replies.
Page 1 of 1 (7 items)
Sort Posts:
Previous Next
  • 11/13/2008 10:56 AM

    change color of a cell at runtime


     
    hi.
    I need help, i need to change background color of a cell when I choose the option of a popupMenu, how can I do this?
    thank you.
  • 11/13/2008 12:04 PM In reply to

    Re: change color of a cell at runtime

    Handle the CustomDrawCell or the RowCellStyle event.

    http://www.logisticdynamics.com
  • 11/17/2008 6:10 AM In reply to

    Re: change color of a cell at runtime

    ok thanks you, but how i can call event rowcellstyle from the event itemclick??

  • 11/18/2008 12:25 PM In reply to

    Re: change color of a cell at runtime

    You'd need to set some sort of flag when the data changes in that column. In your RowCellStyle event, check the value of this flag and change the color accordingly.

    http://www.logisticdynamics.com
  • 11/18/2008 8:58 PM In reply to

    Re: change color of a cell at runtime

    Hi Brendon,

    Could you have me to provide a simple source code for VB, I need to change the back color of cell based on specific condition..

    Thanks in advance... :)

  • 11/18/2008 10:15 PM In reply to

    Re: change color of a cell at runtime

    You should be able to create a Style Condition in the XtraGrid Designer.


    Brien King
    President, ClassicSoft, LLC
    http://www.classicsoft.com
    brien@classicsoft.com
    Developers Helping Developers!

    qs> Hi Brendon,
    qs>
    qs> Could you have me to provide a simple source code for VB, I need to
    qs> change the back color of cell based on specific condition..
    qs>
    qs> Thanks in advance... :)
    qs>
  • 11/25/2008 7:39 AM In reply to

    Re: change color of a cell at runtime


    hi, I have this code to change the backcolor of the cell, but what happens is that when changing cell, the backcolor of the previous cell disappears putting it there by default.


            private void bandedGridViewDedicaciones_CustomDrawCell(object sender, RowCellCustomDrawEventArgs e)
            {
                    if (e.RowHandle == bandedGridViewDedicaciones.FocusedRowHandle)
                    {
                        if (e.Column == bandedGridViewDedicaciones.FocusedColumn)
                        {
                            e.Appearance.BackColor2 = Color.Red;
                        }
                    }
            }

     

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