Solved

how to bind drop down list box  in data grid using java script

Posted on 2006-11-14
3
434 Views
Last Modified: 2008-02-01
i have a one data grid that contain a drop down list box. i bind data grid and ddl when page is loaded. i have also one link button(add button) in data grid. when i click on the link button(add) the new page(child page) is open using pop up dialog box,. this child  page has one save button. when click on the save button new value added in database that relate to drop down list box and  back  to  parent page and  i want to bind drop down list boxdown list box using java script

plz help
0
Comment
Question by:polythought
3 Comments
 
LVL 25

Accepted Solution

by:
nauman_ahmed earned 500 total points
ID: 17938848
Call a javascript function from the child window that insert the value in the drop-down field:

window.opener.updateDropDown('value');

function updateDropDown(DDLValue,DDLText)
{
 var elOptNew = document.createElement('option');
    elOptNew.text = DDLText;
    elOptNew.value = DDLValue;
   document.getElementById('ddl').add(elOptNew,0);
}

You can learn more about the select DOM at http://www.mredkj.com/tutorials/tutorial005.html

HTH, Nauman.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question