473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.u k.ANDTHIS
www.nickhodge.co.uk
Jul 23 '06 #1
2 2282
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.u k.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.u k.ANDTHIS
www.nickhodge.co.uk

"Greg9Strat " <gr********@com cast.netwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.u k.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
5677
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 GridView to allow entry of quantity and Y/N switch for
4
2617
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 re-format the updated row fields. I have looked at gridView.rowUpdated method, but cannot figure out how....
7
14820
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 want to look at that data and filter it based on what is in it. I know that this could have been done with data sets and data views in asp.net 1.1 but how is this done now in asp.net 2.0?
4
7601
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 gridview control. Does anyone have a guidance on this? Thanks -- Live long, stay strong
1
2313
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 and when the search button is clicked I am sending those parameters via query string ( I need to do this since my app will run in a handheld which has certain restrictions). In the order list page, I am passing those parameters to the DAL as...
5
6454
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 dataset with a join query for the GetData() select method. I use ObjectDataStore to couple the GridView with the table adapter on the dataset. If I point the ODS at the child table, the GridView will bind to the "normal" select and I end up...
8
18090
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 display data in a "GridView" which is tied to an "ObjectDataSource". In turn, this ObjectDatasource gets it's data from a strongly-typed business object within my code.
6
3711
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 code looks like this: private void Fill() { DataTable table = new DataTable(); SqlDataAdapter adapter = new SqlDataAdapter("SELECT * from
0
1299
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 problem is that when i select the data after i search it the selected input would be coming from the previous gridiview look of the data example: standard gridview look Gridview 1strow 2ndrow 3rdrow
0
9646
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10096
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6742
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
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
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.