473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Change Colour of Cell in datagrid More options More options

I have a table with two columns field1 int,Field2 and added a column
to datagrid on runtime sum (field1+field2) ,upon changing the data in
either of the fileds the sum field or column too changes .
Intially there will be data in the fields ..and ii try to change the
value of column [field1] so the column [sum] also changes,Can i
change
the colour of the cells[Field1,sum] where the data has been
changed .I
have found out the cells where the data has been changed i here by
enclosing the code for finding out the data changed in cells

Private Sub btnHighlight_Cl ick(ByVal sender As System.Object, ByVal e
As System.EventArg s) Handles btnHighlight.Cl ick
Dim row, col As Integer
For row = 0 To dsDb.Tables("Su m").Rows.Cou nt - 1
For col = 0 To dsDb.Tables("Su m").Columns.Cou nt - 1
If Not (dsDb.Tables("S um").Rows(row). Item(col,
DataRowVersion. Original) = _
dsDb.Tables("Su m").Rows(row).I tem(col,
DataRowVersion. Current)) Then
MsgBox("The Original value at cell[" &
row.ToString & "," & col.ToString & "] is " & _
dsDb.Tables("Su m").Rows(row).I tem(col,
DataRowVersion. Original).ToStr ing)
End If
Next
Next
End Sub
can any guide me how to change the colour of the cells where the data
has been changed

Mar 28 '07 #1
1 1654
Have a look at:
http://www.syncfusion.com/FAQ/Window...efault.aspx#44

Doug

"satish" <sa************ **********@gmai l.comwrote in message
news:11******** **************@ n59g2000hsh.goo glegroups.com.. .
I have a table with two columns field1 int,Field2 and added a column
to datagrid on runtime sum (field1+field2) ,upon changing the data in
either of the fileds the sum field or column too changes .
Intially there will be data in the fields ..and ii try to change the
value of column [field1] so the column [sum] also changes,Can i
change
the colour of the cells[Field1,sum] where the data has been
changed .I
have found out the cells where the data has been changed i here by
enclosing the code for finding out the data changed in cells

Private Sub btnHighlight_Cl ick(ByVal sender As System.Object, ByVal e
As System.EventArg s) Handles btnHighlight.Cl ick
Dim row, col As Integer
For row = 0 To dsDb.Tables("Su m").Rows.Cou nt - 1
For col = 0 To dsDb.Tables("Su m").Columns.Cou nt - 1
If Not (dsDb.Tables("S um").Rows(row). Item(col,
DataRowVersion. Original) = _
dsDb.Tables("Su m").Rows(row).I tem(col,
DataRowVersion. Current)) Then
MsgBox("The Original value at cell[" &
row.ToString & "," & col.ToString & "] is " & _
dsDb.Tables("Su m").Rows(row).I tem(col,
DataRowVersion. Original).ToStr ing)
End If
Next
Next
End Sub
can any guide me how to change the colour of the cells where the data
has been changed

Mar 28 '07 #2

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

Similar topics

2
2479
by: Lois | last post by:
My website formatting knowledge is mostly HTML; I know hardly any Javascript. Recently I created a site with a nav bar in table format across the top of the page, and I made the background colour of the cell with the name of the page that the reader was on a different shade, like this: Home | This | That | Other | Etc. If you were on...
1
1456
by: JD | last post by:
How do i get rid of the 1st column that appears in a datagrid? I do not want this? Also how do i change the colour of the background of a cell when the user selects it. i.e for the first coloumn i have made this non-editable and therefore i do not want the graey colour that appears when the user clicks on a cell in the first row. As only...
1
2288
by: ms | last post by:
Hi, I've been trying to find a way to change a cell's colour when clicking it. What I've found so far is to change the background colour by using: function whenClick(navElm) { var state1 = '#0000FF'; if(navElm.style.backgroundcolor != state1){ navElm.style.backgroundcolor = state1; } } My problem is, first it does not work when I used...
3
4742
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
1
1271
by: QT | last post by:
Dear Sirs, I have a datagrid which is taking sorce from .mdb file. I want to change some cell's font colour to red depent of data conditions. Can I do that? Best Regards
5
1580
by: Earl | last post by:
I want to fire a database update off of a single change to a single cell in the datagrid. This apparently cannot be done using keypress, keyup, keydown, etc. I've read George Shepard's FAQ and while I may have overlooked it, I have not found an answer. I now am using the CurrentCellChanged event, and this is satisfactory IF the user moves off...
0
1586
by: Badino | last post by:
Hi, Can someone tell me what to put in this code so that if a user selects 0 (Black) then make the font white (0) as my default colour is black on my Excel spreadsheet. Private Type CHOOSECOLOUR lStructSize As Long hwndOwner As Long Hinstance As Long rgbResult As Long lpCustColors As String
0
1331
by: satish | last post by:
I have a table with two columns field1 int,Field2 and added a column to datagrid on runtime sum (field1+field2) ,upon changing the data in either of the fileds the sum field or column too changes . Intially there will be data in the fields ..and ii try to change the value of column so the column also changes,Can i change the colour of the...
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.