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

need suggestions on dropdownlist with "ALL" item...

I have a databound dropdownlist. It is acting as a "filter" for a gridview.
I wanted to add "ALL" to the first item on the list.

Question: In the SQLDataSource (that the ddl is bound to) how do you
suggest I handle the WHERE clause? If the ddl is set to "ALL" then I don't
really want to use the WHERE clause, but if it's something other than "ALL"
I do.

Your thoughts? How can I best implement this?

Thansk!
Oct 27 '07 #1
3 1110
On Oct 29, 3:48 am, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
I wouldn't add WHERE clause for ALL in the first case. It is the simplest
solution.
You have to. If your SQL data source says

where columnname=@ddvalue

What do you think will happen if @ddvalue is "all" or empty or any
value whatsoever?

Oct 29 '07 #2
I mean I would modify the sql to exclude the WHERE clause. I would remove
"where columnname=@ddvalue".

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Larry Bud" <la**********@yahoo.comwrote in message
news:11**********************@22g2000hsm.googlegro ups.com...
On Oct 29, 3:48 am, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
>I wouldn't add WHERE clause for ALL in the first case. It is the simplest
solution.

You have to. If your SQL data source says

where columnname=@ddvalue

What do you think will happen if @ddvalue is "all" or empty or any
value whatsoever?

Oct 30 '07 #3
>
You have to. If your SQL data source says
where columnname=@ddvalue
What do you think will happen if @ddvalue is "all" or empty or any
value whatsoever?- Hide quoted text -
On Oct 30, 4:12 am, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@mMvVpPsS.orgwrote:
I mean I would modify the sql to exclude the WHERE clause. I would remove
"where columnname=@ddvalue".
Kinda defeats the purpose of having a dropdown filter.

Oct 30 '07 #4

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

Similar topics

4
by: KJ | last post by:
My xslt has xsl:templates that match a large majority of the xml in our xml files. What I would like to do is create a test expression that matches any of the tags or text that these templates...
2
by: Dale Ring | last post by:
Access 2000 I am trying to add "ALL" to a combo that is used to filter a query. When "ALL" is selected no records show instead of ALL records showing. I have setup a "dummy" table (tblDum)...
1
by: S.Guhananth | last post by:
I need to capture a country from dropdown list and use that in sql query. How to do this protected DataSet GetCountry() { I have the code for this block
3
by: MeNotHome | last post by:
I am trying to automate web browser navigation and form fill out in vb.net Why doesn't this work? AxWebBrowser1.Document.Forms(0).All("action-download").click() I also tried...
3
by: Quick | last post by:
.Value is now .setattribute & .getattribute("name", "value") What took the place of .Click? I see .Click is still stated as a method of Forms. I have a reference "xForm" to the exact form I...
2
by: bhdvir | last post by:
Does anybody have any advice on selecting all records within a iif-statement? I have a form in which one has to state if all projects or just a selection of projects are to be used for a query....
2
by: José Joye | last post by:
Hello, When openning a solution, all projects are expended in the Solution Explorer, is there a magic key to "reduce" all the project? Thanks, José
6
jlandbw04
by: jlandbw04 | last post by:
Okay. Here's the deal. I have this assignment for college that has me completely puzzled. I need this assignment to do the following: 1. input 12 integers into an array from the user. 2. output...
0
by: gp | last post by:
I am and have been using PDO for about a year now...and have finally gotten around to solving the "DB NULL value" issues I ran into early on... I am looking for suggestions and techniques to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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,...

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.