473,414 Members | 1,988 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,414 software developers and data experts.

Comparing data in a gridview

Hi

I currently have a gridview connected to a SQLDatasource. (This data comes
from a remote iSeries). It shows catalogue sales as they build during the
day (works great). I have a local SQL server with the budget data for each
catalogue/day and wanted to compare the gridview data with this to display
KPI traffic lights as the sales build. (This is used across the organisation
and is connected 'live')

One issue is that all catalogue codes on the iSeries are like 00000153,
00000100,etc. If a catalogue is 'live' I can key on this as the data is the
same in both places. If the catalogue does not exist in the budget data
then it would be classed as 'dead' and should be grouped as such. (The total
of 'Dead' books should then show in the grid across all the books that made
it up, e.g If the 'Dead' budget for the day is £1,000 and the sum of the
'dead' books in the gridview were £1001, then all 'dead' book rows would
show a green light)

I am dabbling with the gridview RowDataBound event, passing the values to a
method to decide if it is 'live', 'dead', 'web', etc. but I have no idea how
to pick up and compare the other data, or, once the gridview is built, to
pass the 'dead' data across the catalogues that made it up.

I feel I am fighting the tool, so there must be a better way. (Explanation
not good, but if someone could just point me, that'd be great

Thanks a lot

--
Nick Hodge
Microsoft MVP - Excel
Southampton, England
ni*******************@zen.co.uk.ANDTHIS
www.nickhodge.co.uk
Jul 23 '06 #1
2 2248
Hi Nick,

My recommendation is to load the data into a dataset first. Then do
some testing for your requirements and store that info into variables
(for instance, if the quota has been met for a category...). Or you
could manipulate the DataSet by adding columns and dynamically setting
the image in your new column...

Then you can bind your data from the dataset to the GridView control.

Hope this give an idea or helps...
Greg

Nick Hodge (MVP) wrote:
Hi

I currently have a gridview connected to a SQLDatasource. (This data comes
from a remote iSeries). It shows catalogue sales as they build during the
day (works great). I have a local SQL server with the budget data for each
catalogue/day and wanted to compare the gridview data with this to display
KPI traffic lights as the sales build. (This is used across the organisation
and is connected 'live')

One issue is that all catalogue codes on the iSeries are like 00000153,
00000100,etc. If a catalogue is 'live' I can key on this as the data is the
same in both places. If the catalogue does not exist in the budget data
then it would be classed as 'dead' and should be grouped as such. (The total
of 'Dead' books should then show in the grid across all the books that made
it up, e.g If the 'Dead' budget for the day is £1,000 and the sum of the
'dead' books in the gridview were £1001, then all 'dead' book rows would
show a green light)

I am dabbling with the gridview RowDataBound event, passing the values toa
method to decide if it is 'live', 'dead', 'web', etc. but I have no idea how
to pick up and compare the other data, or, once the gridview is built, to
pass the 'dead' data across the catalogues that made it up.

I feel I am fighting the tool, so there must be a better way. (Explanation
not good, but if someone could just point me, that'd be great

Thanks a lot

--
Nick Hodge
Microsoft MVP - Excel
Southampton, England
ni*******************@zen.co.uk.ANDTHIS
www.nickhodge.co.uk
Jul 24 '06 #2
Greg

Thanks for that... being a native VBA developer, this stateless world is
very strange, but I felt I was better building a dataset from the disparate
datasources and working with that.

I'll give it a go, thanks for the confidence boost

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
ni*******************@zen.co.uk.ANDTHIS
www.nickhodge.co.uk

"Greg9Strat" <gr********@comcast.netwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi Nick,

My recommendation is to load the data into a dataset first. Then do
some testing for your requirements and store that info into variables
(for instance, if the quota has been met for a category...). Or you
could manipulate the DataSet by adding columns and dynamically setting
the image in your new column...

Then you can bind your data from the dataset to the GridView control.

Hope this give an idea or helps...
Greg

Nick Hodge (MVP) wrote:
Hi

I currently have a gridview connected to a SQLDatasource. (This data comes
from a remote iSeries). It shows catalogue sales as they build during the
day (works great). I have a local SQL server with the budget data for
each
catalogue/day and wanted to compare the gridview data with this to display
KPI traffic lights as the sales build. (This is used across the
organisation
and is connected 'live')

One issue is that all catalogue codes on the iSeries are like 00000153,
00000100,etc. If a catalogue is 'live' I can key on this as the data is
the
same in both places. If the catalogue does not exist in the budget data
then it would be classed as 'dead' and should be grouped as such. (The
total
of 'Dead' books should then show in the grid across all the books that
made
it up, e.g If the 'Dead' budget for the day is £1,000 and the sum of the
'dead' books in the gridview were £1001, then all 'dead' book rows would
show a green light)

I am dabbling with the gridview RowDataBound event, passing the values to
a
method to decide if it is 'live', 'dead', 'web', etc. but I have no idea
how
to pick up and compare the other data, or, once the gridview is built, to
pass the 'dead' data across the catalogues that made it up.

I feel I am fighting the tool, so there must be a better way. (Explanation
not good, but if someone could just point me, that'd be great

Thanks a lot

--
Nick Hodge
Microsoft MVP - Excel
Southampton, England
ni*******************@zen.co.uk.ANDTHIS
www.nickhodge.co.uk

Jul 24 '06 #3

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

Similar topics

3
by: theKirk | last post by:
using Visual Studio 2005 C# ASP.NET I know there has to be a simple way to do this....I want to use C# in a code behind for aspx. Populate a GridView from an xml file Add Fields to the...
4
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
4
by: Congero | last post by:
I'm trying to find a way to bind hierarchical data to a gridview control. I've been able to do this with some third party controls and was wondering if this functionality is available with the...
1
by: Siva | last post by:
Hi, I have a 3 tier ASP.Net app for a handheld which needs to fetch orders from database via a DAL and populate it in a gridview using objectdatasource. In the search page I have a few parameters...
5
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the...
8
by: Greg Lyles | last post by:
Hi all, I'm trying to develop an ASP.NET 2.0 website and am running into some real problems with what I thought would be a relatively simple thing to do. In a nutshell, I'm stuck on trying to...
6
by: rcoco | last post by:
Hi, I have a datagrid that is ment to insert data. But when I run the form only the header appears. I would like some advise from you all and solve this problem I'm using visual studio 2003. My...
0
by: jaz215 | last post by:
Hi i have an update page where i update data when a user select a row in the gridview, i also have a search function that displays the data in the gridview all those data that matched the search. my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
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
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...

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.