Link to home
Start Free TrialLog in
Avatar of jaws1021
jaws1021

asked on

at the clientside fill dropdown

In datagrid , When user checks checks any checkboxes, that row's dropdown populates from database and also gets filter according to id of the checkbox because dropdownlist values are different for each checkboxes tight to dropdown. I need this at the client side so I need javascript code to do that for me, how can I achieve this?
Avatar of MasonWolf
MasonWolf
Flag of United States of America image

Sounds like the very epitome of why AJAX was created.

Unfortunately, I know nothing about AJAX myself (I've been meaning to get to it), but if you like, I can show you an example of how to that by combining PHP and Javascript. Interested?
Avatar of cap2501
cap2501

Before resorting to ajax you should consider how much data in total you will be working with and if it is static or changing(dynamic). If the dataset isnt too large and static than you would probably be better off creating a client side datastore and quering that with javascript which I am assuming is what MasonWolf is offering to show you.

The AJAX route isnt too complicated but it will add another layer of complexity to the system.
Yes cap, that's exactly what I was thinking of doing. If it is a large amount of data, do you think you could explain an AJAX solution? I could just bow out and let you take over if that's what we're dealing with.
Avatar of jaws1021

ASKER

Thanks guys, actually I have ajax now and learning too, I put my datagrid inside the update panel, enablepartialrendering = true on scripting and set to update panel UpdateMode ="Conditional" that time dropdown is not getting flicker, but before it was refreshing it before I set those above. At the ajax, is there anyway I can take the updatemode out  just for dropdown, I don't know though that time maybe it will be some refreshing again, which I don't want that.. If this doesn't work I can go javascript way then..
my dropdown has at most going to have 5 stuff.
ASKER CERTIFIED SOLUTION
Avatar of cap2501
cap2501

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you are right!!! I am trying to do XMLHttpRequest object. now I found a good example but different than mine I am having hard time to put the my cde on right place..