473,425 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

Update DataGridView Control

I have a realtime stock quote system developed where I am updating a typed
dataset with realtime quotes. I want my DataGridView control to show green
forecolor when a price moves up and red forecolor when a price moves down. I
am using the cellvaluechanged event of the DataGridView control and thought
it would be fired when the Dataset(the DataGridView's datasource) is updated.
CellValueChanged is not fired when the dataset is updated. Is there another
DataGridView event handler I need to use for this?
Thanks,
David
Jun 5 '06 #1
1 3723
"David" <Da***@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
I have a realtime stock quote system developed where I am updating a typed
dataset with realtime quotes. I want my DataGridView control to show
green
forecolor when a price moves up and red forecolor when a price moves down.
I
am using the cellvaluechanged event of the DataGridView control and
thought
it would be fired when the Dataset(the DataGridView's datasource) is
updated.
CellValueChanged is not fired when the dataset is updated. Is there
another
DataGridView event handler I need to use for this?


From trhe help on DataGridView "The DataGridView.CellValueChanged event
occurs when the user-specified value is committed, which typically occurs
when focus leaves the cell.", i.e. this event is used for changes the user
makes. You could probably use the CellFormatting event for your colour
changes, but be aware that this event will be called whenever the cell needs
to be painted (e.g. if the user scrolls the grid, or minimises then restores
the application) and not just when the bound value has changed.

Chris Jobson
Jun 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: milk-jam | last post by:
I'm trying to set my datagridview so that the first row will be left blank and to use it as a filtering filed for the datagridview. Until now I was using 2 datagridview the upper one with a header...
2
by: Ye Li | last post by:
I have two windows with datagridview control type in one form. I want to move multiple rows from one datagridview to another datagridview. My code is as follows: private void...
1
by: manjub | last post by:
Hi, I was working on an MDI application using Visual C++ 2005 .NET. In a child window, I have an instance of DataGridView control. If I open several child windows, they all work fine. ...
1
by: Rich | last post by:
Hello, I am reading data from a sql server table that is under replication. This table has the replicatin GUID column that is generated with replicatin. I am reading the data from a...
1
by: Jeet Disuja | last post by:
Dear Sir, I m develop a application in vb.net which update a live prices of stocks by a website named (www.nseindia.com) i m using datagridview control for this. Please give ur suggestion...
0
by: =?Utf-8?B?SmltIFdhbHNo?= | last post by:
I am a .NET newbie, specifically WinForms. I have a simple Winform for which I have a "How To" question: My WinForm app will display data from a FoxPro database, two tables in particular:...
0
by: RickH | last post by:
Has anyone tried wrapping the DataGridView control itself as a custom Cell/Column control. So that I can have a child DataGridView appear in a column of a parent DataGridView so that the...
1
by: shajeela | last post by:
1.I create a datagridview control 2.connected using a oledb adapter 3.problem is if i run the program the old value is displayed 4.for viewing the old value i have to close the current window,and...
1
by: Singh Harminder | last post by:
I created few datagridview columns and then tried to add them to the datagridview columns collection, but got error : At least one of the DataGridView control's columns has no cell template. Code:...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.