Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dropdown list in a datagrid

Reply
Thread Tools

Dropdown list in a datagrid

 
 
=?Utf-8?B?V2FyYW4=?=
Guest
Posts: n/a
 
      03-28-2006
I Want to add a dropdown box in a datagrid on Page_Load.

This Datagrid shares two tables.

One table contains Employee details, and the other having the list of
projects the employee is working.

Table 1
-------
Name DOB Address
Emp1 01/01/1976 Address1
Emp2 01/01/1977 Address2
Emp3 01/01/1978 Address3

Table 2
------
Name Projects_working

Emp1 Project1
Emp1 Project2
Emp1 Project3

I need to populate the List of Projects in a dropdownlis on a page load
which is inside the datagrid.

Thanks
Waran
 
Reply With Quote
 
 
 
 
hangar18
Guest
Posts: n/a
 
      03-28-2006
I'm currently doing a similar requirement .. though still not complete
...
there are quiter a few approaches .. search for one on using
objectdatasource .. that is pretty cool and easy ..

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      03-28-2006
Waran,

You need to make an ItemTemplate that will include a ddl. Then, in the
datagrid's ItemDataBound event you will need to populate the ddl and set the
selected project for every datagrid row.

If all employees share the same list of projects, you can populate a
datatable with the project list before databinding the grid and in the
ItemDataBound event just set the selected project.

Eliyahu

"Waran" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I Want to add a dropdown box in a datagrid on Page_Load.
>
> This Datagrid shares two tables.
>
> One table contains Employee details, and the other having the list of
> projects the employee is working.
>
> Table 1
> -------
> Name DOB Address
> Emp1 01/01/1976 Address1
> Emp2 01/01/1977 Address2
> Emp3 01/01/1978 Address3
>
> Table 2
> ------
> Name Projects_working
>
> Emp1 Project1
> Emp1 Project2
> Emp1 Project3
>
> I need to populate the List of Projects in a dropdownlis on a page load
> which is inside the datagrid.
>
> Thanks
> Waran



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
1 Gridview. Dropdown A is column from database, Dropdown B is column from database, Data in A and B must be from same row. anonymoushamster@gmail.com ASP .Net 2 11-07-2007 12:40 PM
ajax cascading dropdown: second dropdown disabled acadam ASP .Net 0 12-27-2006 10:59 AM
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
How to add a Dropdown list to a datagrid at runtime (dynamic) without using template columns in ASP.NET and still have the ability to us the datagrid Update event. Daniel Roth ASP .Net Datagrid Control 0 04-05-2005 03:58 AM
Select dropdown box bleeds into Javascript dropdown menu Mike HTML 1 12-18-2003 09:49 PM



Advertisments