473,480 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create 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 981

Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_selectedindexchanged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_selectedindexchanged".
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.com>
???????:%2****************@TK2MSFTNGP02.phx.gbl...
>
Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_selectedindexchanged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_selectedindexchanged".
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 ProductsByCategory_DataBound(sender As Object, e As EventArgs)
_ Handles ProductsByCategory.DataBound ProductDetails.DataBind() End Sub

"Tony WONG" <x3*@netvigator.com¼¶¼g©ó¶l¥ó·s»D:uN************** @TK2MSFTNGP05.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.com>
???????:%2****************@TK2MSFTNGP02.phx.gbl...
>>
Hi Tony,

It is as simple as you did with 2 dropdownlists.
You must have written a code in "dropdownlist1_selectedindexchanged" 2
change 2nd dropdownlist. Like that you can call the datagrid bind
function in "dropdownlist2_selectedindexchanged".
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.com>
???????:eZ**************@TK2MSFTNGP04.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
2002
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...
6
5043
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...
2
1997
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...
1
1275
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...
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. ...
2
949
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...
3
1814
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 ...
1
1260
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...
1
2703
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
6912
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
7052
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,...
0
7092
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
6981
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...
1
4790
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...
0
3000
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...
0
1304
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 ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
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...

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.