473,786 Members | 2,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid And DropDown

Is there no work around for this?
-----Original Message-----
I have asked this question on about every board I can
think of and I have yet to get an answer, so If anyone
would know I imagine it would be here.

I have a datagrid, and inside of it in an edit item
template I have a drop down list, I want to be able to
have that dropdown autopostback and run its selectedindex
changed event so that I can populate an addition dropdown.

From what I can tell when I do selected a different item
it does postback but the selectedindex changed event neverfires.

Is this even possible inside of a datagrids edit item
template?

Have I been wasting my time trying to figure this out?

To give a little more insight of what I want this thing todo:

I have a dropdown called Entity and in that dropdown I
have Merchant, Customer... When the user selects Merchant
I need an additional dropdown to pupolate with all the
merchant id's I have in the database, same for
customers ...

Can anyone lend a hand or at least point me in a directionto get this problem solved.

thanks
.

Jul 21 '05 #1
1 1661
there is a way to do this.

the way we solved the problem where I work is we created a
generic DataGrid class and a column template class.

In the ColumnTemplate class in the InstantiateIn method we
set the event handler for the "parent" DropDownList.
Then define the event handler, you can populate a "child"
DropDownList based on what is selected in the "parent".

I have an example if you need one.
Email me at An************* @globalcrossing .com if you need
more help.

Angela
-----Original Message-----
Is there no work around for this?
-----Original Message-----
I have asked this question on about every board I can
think of and I have yet to get an answer, so If anyone
would know I imagine it would be here.

I have a datagrid, and inside of it in an edit item
template I have a drop down list, I want to be able to
have that dropdown autopostback and run its selectedindexchanged event so that I can populate an addition dropdown.
From what I can tell when I do selected a different item
it does postback but the selectedindex changed event

never
fires.

Is this even possible inside of a datagrids edit item
template?

Have I been wasting my time trying to figure this out?

To give a little more insight of what I want this thing

to
do:

I have a dropdown called Entity and in that dropdown I
have Merchant, Customer... When the user selects MerchantI need an additional dropdown to pupolate with all the
merchant id's I have in the database, same for
customers ...

Can anyone lend a hand or at least point me in a

direction
to get this problem solved.

thanks
.

.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2033
by: Kilic Beg via .NET 247 | last post by:
Hi, I am having trouble adding a dropdown to DataGrid at runtime. I create all boundColumns and the TemplateColumn for the dropdown at runtime. The dropdown has a different datasource then the DataGrid. 1. If I try to bind the second datasource to the dropdown I get An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll. 2. If I comment that line out it displays always the dropdown. I want it to...
2
4334
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know how to use this code? please help! http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_20862953.html
4
5980
by: Richard Roche | last post by:
Is it possible to use a drop combo instead of a text box when using the EditCommand in the Datagrid? Many table columns are bound to 'lookup' tables, user's don't care about the foreign keys, they want the text value. Any advice, samples or places to read are appreciated. Thanks.
1
1966
by: Vijay Kerji | last post by:
Hi, I have a datagrid with dropdown list and Remove hyperlink in it as columns. When I remove a row from the datagrid, Dropdown list selection is retaining its previous value. i.e, removed Dropdown item selection is applied to the next dropdown list. Is there any way to fix this problem?
6
5398
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I am receiving errors when trying to set the selected value of the dropdown within the ItemDataBound() subroutine. Below is the code I am using. I hope someone can tell me if this is possible. '''HTML''' <asp:datagrid id="dgAssignments"...
0
923
by: Sean | last post by:
Hi, I am trying to get this piece of code to work. I have to design a GUI which would look similar to Month |Year |Old | New dropdown |dropdown |4 | dropdown dropdown |dropdown |2 | dropdown dropdown |dropdown |1 | dropdown
2
2855
by: Peter | last post by:
ASP.NET 2003 In the DataGrid how do I select current cell value in the dropdown box when I click on the edit link, currently when I click on the edit link in the DataGrid the dropdown box appears in the cell, but allways the first item in the dropdown box is shown not the current cell value? How do I make the current value in the cell automaticaly be selected in the dropdown box.
0
2913
by: cindy | last post by:
I have a dynamic datagrid. I have custom classes for the controls public class CreateEditItemTemplateDDL : ITemplate { DataTable dtBind; string strddlName; string strSelectedID; string strDataValueField; string strDataTextField; public CreateEditItemTemplateDDL(string DDLName,string DataValueField,string
4
1448
by: youvrajasnsm | last post by:
Hi All, >I am using datagrid control in asp.net with C#. >I have two dropdown list in datagrid e.g. one dropdown have Classname and another have Studentname. >now I want to show all the studentname in second dropdown related to their class selected in first dropdown. >plz help me in above. >Remember i am using both dropdown in a datagrid.......... Thanks.
5
5480
by: Me LK | last post by:
I need to add a line to choose a size into a dropdown . Since I have the dropdown nested inside a datagrid this is not working.When a page displays there are several rows of dropdowns but only the top dropdown has the option added. The others do not. I am using the following code Dim ddlPsize As DropDownList ddlPsize = (itemInfo.Items(0).FindControl("ddlsizes")) ddlPsize.Items.Insert(0, "Choose a Size")
0
9497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7515
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
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 we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.