Hi Friends,
I am using Data grid view for displaying the data from data table.Displaying is working correctly.Now i want to make rows as blinking while the color is red and white.for Example: the first row is Purple and white , second row is Red and White,third row is also red and White. we need to blink the row having "Red and White".In that both color changes continuosly as interval of one second. Please help me to achieve it.
Thanks and Regards,
DJ
Loading
VulpesPosted Jul 9, 2012, 10:21 AM
If so, then that could be due to shortcomings in the System.Windows.Forms.Timer which executes on the UI thread and can therefore be pre-empted by other events occurring within that thread.
To avoid that, you could try the multi-threaded timer, System.Timers.Timer, instead. Notice though that the Elapsed event is processed on a worker thread and so you may need to marshal accesses to the datagridview control back to the UI thread:
http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx
Devaraj SubramaniamPosted Jul 9, 2012, 7:27 AM
Thanks for your response.
I tried this thing also.. blinking happens but at sometime the blinking interval varies accordingly.. red color blinked for very few milliseconds and also same for white color also..
we tried for using two timers also but same problem there also.
Thanks in Advance,
Dj
VulpesPosted Jul 9, 2012, 6:02 AM
However, it's working fine on my machine - both colors are blinking simultaneously - and, unless you're using two timers, I can't think of any obvious reason why it would not work properly:
Devaraj SubramaniamPosted Jul 9, 2012, 5:39 AM
Thanks for your response..
Actually we done like this already.its blinking but wat's the problem we are facing is not blinking properly . ie., red color should be 1 sec and white color should be 1 sec simultaneously. but its not blink like that..
Thanks,
Dj
VulpesPosted Jul 9, 2012, 4:55 AM
Jignesh TrivediPosted Jul 9, 2012, 3:36 AM
You can achieve this using Jquery or java script.
Please refer
http://www.aspmemo.net/2012/03/gridview-rows-blink-using-jquery-in.html
http://www.dotnetspider.com/resources/37638-Blinking-Text-within-Gridview.aspx
hope this will help you.