Solved

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

Posted on 2006-11-14
3
433 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
crm development 2 68
Entity Framework 3 47
Resolve Dependency Issues 4 47
SQL Exceptions 3 39
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

896 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now