473,602 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 dropdownboxes and datagrib

1st dropdown box is main category

when 1st dropdown box is clicked, 2nd dropdown box list the sub category

when 2nd dropdown box is clicked, the datagrib show the data according it
2nd dropdown box

it works to some extent by "human clicks".

however, when i click 1st dropdown box, 2nd dropdown changed but datagrib
not changed.

If i click 1st dropdown, so that 2nd dropdown will be triggered to change
"by code".

How can i do? Then datagrib can be changed!

Thanks a lot.

tony
Nov 1 '07 #1
5 988

Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_ selectedindexch anged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_ selectedindexch anged".
Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 1 '07 #2
Hi Mansi

Thanks for your reply

i did not write any code on the dropdownlist. i just bind them to data
source objects.
The datagrid can be refreshed by "MANUAL click" on 2nd dropdownlist

my problem is
when i click 1st dropdownlist, then it fires to 2nd dropdownlist, but the
datagrid is not updated

what should i do? grateful for any hints?

tony

"Mansi Shah" <ma***@devdex.c om>
???????:%2***** ***********@TK2 MSFTNGP02.phx.g bl...
>
Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_ selectedindexch anged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_ selectedindexch anged".
Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 1 '07 #3
thanks a lot. i find a solution here
http://www.asp.net/learn/data-access...ial-08-vb.aspx

Protected Sub ProductsByCateg ory_DataBound(s ender As Object, e As EventArgs)
_ Handles ProductsByCateg ory.DataBound ProductDetails. DataBind() End Sub

"Tony WONG" <x3*@netvigator .com¼¶¼g©ó¶l¥ó· s»D:uN********* *****@TK2MSFTNG P05.phx.gbl...
Hi Mansi

Thanks for your reply

i did not write any code on the dropdownlist. i just bind them to data
source objects.
The datagrid can be refreshed by "MANUAL click" on 2nd dropdownlist

my problem is
when i click 1st dropdownlist, then it fires to 2nd dropdownlist, but the
datagrid is not updated

what should i do? grateful for any hints?

tony

"Mansi Shah" <ma***@devdex.c om>
???????:%2***** ***********@TK2 MSFTNGP02.phx.g bl...
>>
Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_ selectedindexch anged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_ selectedindexch anged".
Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***


Nov 1 '07 #4

Hi,

As per my knowledge, if you want to refresh the datagrid as per some
value(like dropdownlist in your case), you have to write some condition
or code for that. And you have to bind the datagrid by datasource in
your .cs or .vb file.

It would be gr8 if you can send me your code, where you have bind the
lists and grid.

Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 1 '07 #5
You can see the whole procedure here. thx.
http://www.asp.net/learn/data-access...ial-08-vb.aspx


"Mansi Shah" <ma***@devdex.c om>
???????:eZ***** *********@TK2MS FTNGP04.phx.gbl ...
>
Hi,

As per my knowledge, if you want to refresh the datagrid as per some
value(like dropdownlist in your case), you have to write some condition
or code for that. And you have to bind the datagrid by datasource in
your .cs or .vb file.

It would be gr8 if you can send me your code, where you have bind the
lists and grid.

Regards,
Mansi Shah.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 1 '07 #6

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

Similar topics

6
2012
by: thomas j | last post by:
Hi, I have a MySqlBase with a tabel named CARS and with 3 fields; CarsType, CarsModel, CarsInfo. Now I want to generate 2 dropdownboxes in PHP read from CARS. First I will "load" CarsType into an dropdownbox, and then I make a choice, exampel FORD, now the next dropdownbox (CarsModel) will show Escort, Sierra and so... Finally I will make a "actionbutton" named showinfo and when I click it will show CarsInfo.
6
5056
by: Graham Mattingley | last post by:
Hello group, I have a question hope it does not turn out to be a silly on.... On everyone of my pages I have an a include page at the top and at the bottom of the page one is the database connection and one is for the database disconnection. is there anyway I can automaticly connected to the database using a string
2
1999
by: Ward | last post by:
Hi, Consider a window with 2 linked dropdownboxes, dynamically fed from a dbase. One technique to implement this would be to use an onchange event on the first box, then have the script call itself again, this time with a GET variable, calling the db for a 2nd time to populate the 2nd dropdownbox. (using PHP)
1
1282
by: Bill | last post by:
Has anyone used ASP.NET to access Exchange 2000 to populate dropdownboxes from a public folder contact? I am not sure if this is possible, but I am needing a web application to hit my exchange 2000 public folder where I have contacts stored and pull information from certain fields that the contacts have. I have read that I might be able to do this by installing the .NET framework on the exchange server and creating a web service on...
12
467
by: Thomas Scheiderich | last post by:
I have 2 dropdowns that are exactly the same and I don't want to re-read for each. Is there a way to do something like below where I read the data, bind to depCity1 and then bind to destCity2. I find that the second one always is blank. I assume this is because the DataReader is read-forward only. ******************************************************** connect.open() cmdSelect = New OleDbCommand("exec populateCities 'North...
2
958
by: TN Bella | last post by:
I downsized my code below...my text boxes work out okay with this format, it is just the dropdownboxes that give me an error. I need this to work so I can press on with other pressing things...thanks for the help! Right now I am so far behind. Compiler Error Message: BC30456: 'text' is not a member of 'System.Web.UI.WebControls.DropDownList'. Line 29: litResponse.text+="<b>Invoice Location</b>:" & txtInvLoc.text & "<br>"
3
1821
by: Jim Corey | last post by:
I'm trying to save some ArrayLists to viewstate and then use them as DataSources for dropdownboxes. The code looks like this: 'DptList is a arraylist variable local to this procedure '...populate DptList viewstate("Dept01") = DptList DptList.Clear()
1
1271
by: GunnarJ | last post by:
I am using a VE map in an asp.net application to allow users to display data that they can filter through selecting rows in dropdownboxes. When they have set the filters I create a GeoRSS-file and import it into the map with map.ImportShapeLayerData(veLayerSpec, onFeedLoad,true ); veLayerSpec points to the GeoRSS-file. My problem is that it works OK the first time but when I do a new selection and create the GeoRSS-file, I can verify...
1
2707
by: sanpuli3 | last post by:
Hi , I have a radio buttons yes and no. when i check "yes" it has enable the two dropdownboxes and when i check "no" it has to disable the two dropdownboxes? can anyone send me the code. Thanks,
0
7920
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
8404
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
8054
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,...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
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
3900
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...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
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
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.