DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 13 Jun 2007 07:48:02 -0700,    posted on: microsoft.public.dotnet.datatools        back       

Thread Index
  1    BrianDH


Need Help; DataGrid, change cell color (blink/flash)   
Hi
I am trying to find a way to change the background color of a cell (flash or 
blink) when its value has changed (by user or data update).  I need to be 
able to do this for more than one cell close to the same time.  The code 
example below works however, while it is running if another cell is changed, 
it overrides it.

DataGridViewRow row;
DataGridViewCell dataCell;
private void dataGridView1_CellValueChanged(object sender, 
DataGridViewCellEventArgs e)
        {
            row = dataGridView1.Rows[e.RowIndex];
            dataCell = row.Cells[e.ColumnIndex];
            ThreadPool.QueueUserWorkItem(new WaitCallback(CycleBGColor));
        }
        private void CycleBGColor(Object stateInfo)
        {
            dataCell.Style.BackColor = Color.Red;
            Thread.Sleep(1000);
            dataCell.Style.BackColor = Color.Pink;
            Thread.Sleep(1000);
            dataCell.Style.BackColor = Color.Red;
            Thread.Sleep(1000);
            dataCell.Style.BackColor = Color.Pink;
            Thread.Sleep(1000);
            dataCell.Style.BackColor = Color.Red;
            Thread.Sleep(1000);
            dataCell.Style.BackColor = Color.White;

        }
The end game is; when one user changes the values, the changes will update 
all other users data and the cells with new values will change (flash or 
blink).  

Thanks for any help.
Date:Wed, 13 Jun 2007 07:48:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us