We help IT Professionals succeed at work.

Compare rows from gridview1 to gridview2

teogos
teogos asked
on
601 Views
Last Modified: 2013-11-25
I have two gridview in a webpage, each get data from different source but they have two rows are are the same
Gridview1
Code    Boxes      
x1           100

GridView2
Code     Boxes
x1          120

Gridview updates Boxes automatically
so I want to compare this two numbers an get the results into another column on GridView2 called Difference  based on the  Code  listed on both grids. Any ideas
Comment
Watch Question

Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
How do you retrieve the data ? Is it in a dataset, ... ?

Author

Commented:
using the wizard to a SLQ connection   sqldatasource
Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
Compare 2 Gridview row values and write those who doesn't match
http://forums.asp.net/p/1236832/2247869.aspx

Author

Commented:
Looks a good sample but I can see to get where is writing the difference

Author

Commented:
Perhaps the question was not understood,  
Grid1
code     boxes
x1          200
x2          100

Grid2
code      boxes
x1         300
x2          150

compare grid1  on code  to grid2 and   add a column on grid2
where it will show the difference on BOXES  from grid1  to grid2  base on CODE
Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
Can you show how you bind the data, because I think you'll need some comparision on level of your datainput (sqldatasource, objectdatasource, ...)
Project manager
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Sorry, took so long to get back into, but this works I just have to rearrenge the data. Thanks
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.