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

Show all items in gridview based on dropdown lists

3
Hello everybody ... I have a gridview that display data from SQL table using the Configure data source with where clause to show data based on 2 Dropdown list


It works fine and the data already show based on the choices of the drop menu .... but I need to SHOW ALL Items on gridview when I select the SHOW ALL from the dropdown menu

Can anybody help me please???
Jul 18 '13 #1
4 3657
Frinavale
9,735 Expert Mod 8TB
Is your DropDownList configured to autopostback?
Do you have code that handles it's selected index changed event?

If so, have you tried setting the DataSource of the GridView to a source that has all of the records?

If so, did you call the DataBind method on the GridView after you set it's DataSource?

-Frinny
Jul 19 '13 #2
Suny
3
Thanks for your kindly reply and your attention

Yes my dropdownlist configured to autopostback

No I didn't generate any code (it's required to do it without any coding)

Yes I did , It's connected to the data source (table) that has all the data

Look I did it as follow:
1- My grideview -- add data source -- add new datasource.
2- choose the connectionstring
3- On the configure the Select data source I choose the all fields then click the Where button.
4- Choose the Data control = Dropdownlist 1 then choose the field and the same for dropdownlist 2

Now it works fine and it filter the data except It didn't return the ALL value
Jul 23 '13 #3
Frinavale
9,735 Expert Mod 8TB
Then it is something in your select statement?

-Frinny
Jul 25 '13 #4
Suny
3
Could you please tell me the select statement how should it be??
Jul 26 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tony Grider | last post by:
I am trying to find a way to create dependent dropdown lists in C# The old way I knew involved javascript and will no longer work in the new design. I need for each list to be database driven (data...
6
by: Scott | last post by:
The code below appears to work on the following: MAC - Safari PC - IE PC - Opera But the addition of items to the dropdown (select2) does not function in: MAC – IE
0
by: Mike O. | last post by:
MS Access 2003 "filter by form" has drop down lists that allow the user to select values for each field to filter by. However, once some values are selected,the remaining dropdown lists remain the...
0
by: Henke | last post by:
Hi, I have done some research about my problem I have when using the "back button" in IE to go back to a page with two dropdown lists. The both dropdown lists are populated with data. The...
2
by: Chris Becker | last post by:
This is my attempt to rephrase a question I asked earlier that got no response. I suspect it was my poor/unplanned wording. Here is another attempt: I have a form with some drop down lists. I...
1
by: sck10 | last post by:
Hello, I am using the following in a GridView. Currently, I am using a dropdown that pulls the Name of the person, given the Employee ID. I am doing this in both the ItemTemplate and the...
2
by: Lair | last post by:
I am creating a page that has three to four databound dropdown lists. Each one is has different data sometimes from the same table but with a different where clause. What is the best way to...
1
by: eddie23 | last post by:
Hi group. we've an ASP.net application. there are dropdown lists all over it. we use IE6 SP2 here in work. When the dropdown is accessed by someone logged in as a local admin to the XP workstation...
0
by: tariq2030 | last post by:
I have five dropdown lists each with different data sources.the grid view selection should get more refined as i make each selection from ddl1 to ddl5 and the selection should be between two date...
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: 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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.