SunQuest
 
           Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old November 6th, 2006, 04:22 AM
ccarew ccarew is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2006
Posts: 2 ccarew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 23 sec
Reputation Power: 0
Datagrid

Hi all,


I have a data grid which is being displayed on my web page. The datagrid is generated by a stored procedure like the one below.

The first and last rows are dummy rows and I need to Permanently show or hide these rows depending on the number or rows returned in between.

i.e. if row 2 passes a condtion then I want to hide row one once the screen loads.

Does anyone know if there is a way this can be done.

I'm using a Query with UNION in it like the this one below.
Is it possible to remove the first and last rows in the Query if a certain condtion passed or can this be done in in the vb.net code when I'm binding the datagrid

SELECT Bookname, 1 AS VERSION, COUNT(*) OVER () AS totalRows
FROM book
WHERE bookname = 'doctor Who'
UNION
SELECT Bookname, VERSION, COUNT(*) OVER () AS totalRows
FROM tablebook
WHERE bookname = 'Harry potter'
UNION
SELECT Bookname, 20 AS VERSION, COUNT(*) OVER () AS totalRows
FROM book
WHERE bookname = 'Witches and wizards'

Results

BookName VERSION totalRows
Doctor Who 1 1
Harry potter 3 1
Harry potter 3 2
Harry potter 3 3
Witches AND wizards 1 20

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > Datagrid


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway