By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,686 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,686 IT Pros & Developers. It's quick & easy.

Comparing Datagrid Columns

P: n/a
I just created an application that displays data from 2 sources in a
datagrid. There are 2 repeaters nested in the datagrid (probably not the
best idea). The whole purpose of this application is to visually display
side-by-side data from these 2 sources so that the end-user can track
changes. What I am wanting to do now is to highlight, bold, etc... rows
where values are different.

Layout (currently have):
Column1(product) / Column2 (Source A) / Column3 (Source B)

Sample data (currently):
hairgel / 29.95 / 29.95
toothbrush / 29.95 / 39.95

I'd like to have:
hairgel / 29.95 / 29.95
toothbrush / 29.95 / <strong>39.95</strong>

The <strong /> wrapped around the 39.95 would indicate to the end-user
that there has been a change in price. What would be the easiest way to
go about comparing the values? Is there a way to get a datagrid row
count and loop through comparing column 1 and column 2's values?

If this sounds too confusing I will be more than happy to clarify.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 28 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Just use DataRow.RowState on binding relevant column...

--
HTH

Thanks,
Yunus Emre ALP÷ZEN
BSc, MCSD.NET

"Will Chamberlain" <wi**************@devdex.com> wrote in message
news:eN**************@TK2MSFTNGP14.phx.gbl...
I just created an application that displays data from 2 sources in a
datagrid. There are 2 repeaters nested in the datagrid (probably not the
best idea). The whole purpose of this application is to visually display
side-by-side data from these 2 sources so that the end-user can track
changes. What I am wanting to do now is to highlight, bold, etc... rows
where values are different.

Layout (currently have):
Column1(product) / Column2 (Source A) / Column3 (Source B)

Sample data (currently):
hairgel / 29.95 / 29.95
toothbrush / 29.95 / 39.95

I'd like to have:
hairgel / 29.95 / 29.95
toothbrush / 29.95 / <strong>39.95</strong>

The <strong /> wrapped around the 39.95 would indicate to the end-user
that there has been a change in price. What would be the easiest way to
go about comparing the values? Is there a way to get a datagrid row
count and loop through comparing column 1 and column 2's values?

If this sounds too confusing I will be more than happy to clarify.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 28 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.