473,698 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dropdownlist, textbox using dropdownlist_se lectedindexchan ged

Hi
I'm using vs.net 2003.
I have a dropdownlist inside a datagrid.
I would like to be able to select a value from the dropdownlist and then
have a textbox which is also inside the datagrid filled with that value.

I'm calling OnSelectedIndex Changed="ddlGri dMonth_Selected IndexChanged" event
when an item from the dropdownlist is selected

I'm not sure of the code I should be using for this event.
Right now I'm trying something like this:

Dim vddMonth As DropDownList =
CType(dgMonthly Reports.FindCon trol("ddlGridMo nth"), DropDownList)
Dim vddMonthvalue As String = vddMonth.Select edItem.Value()

Dim vtextMonth As TextBox =
CType(dgMonthly Reports.FindCon trol("ReportMon th"), TextBox)

Dim vtextMonthValue As String = vtextMonth.Text

If vddMonthvalue <0 Then

vtextMonthValue = vddMonthvalue

End If

I'm getting the value of the dropdownlist, but not the textbox and then I
need to see if the dropdownlist value is something other then 0 and if so
write the value to the textbox.

Thanks,

CindyH
Sep 3 '07 #1
1 3102
Cindy
We wrote this article and downloadable code years ago and I haven't looked
at it since we posted it, but we get lots of downloads from it. I don't know
whether it will help you or not, but it might and no one has answered your
post in two weeks.

http://www.knowdotnet.com/articles/kdngrid.html

HTH

Le*@KnowDotNet. com

Try our latest time saving tool, Visual Class Organizer, free for 30 days.

http://www.knowdotnet.com/articles/V...oductHome.html
"CindyH" wrote:
Hi
I'm using vs.net 2003.
I have a dropdownlist inside a datagrid.
I would like to be able to select a value from the dropdownlist and then
have a textbox which is also inside the datagrid filled with that value.

I'm calling OnSelectedIndex Changed="ddlGri dMonth_Selected IndexChanged" event
when an item from the dropdownlist is selected

I'm not sure of the code I should be using for this event.
Right now I'm trying something like this:

Dim vddMonth As DropDownList =
CType(dgMonthly Reports.FindCon trol("ddlGridMo nth"), DropDownList)
Dim vddMonthvalue As String = vddMonth.Select edItem.Value()

Dim vtextMonth As TextBox =
CType(dgMonthly Reports.FindCon trol("ReportMon th"), TextBox)

Dim vtextMonthValue As String = vtextMonth.Text

If vddMonthvalue <0 Then

vtextMonthValue = vddMonthvalue

End If

I'm getting the value of the dropdownlist, but not the textbox and then I
need to see if the dropdownlist value is something other then 0 and if so
write the value to the textbox.

Thanks,

CindyH
Sep 21 '07 #2

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

Similar topics

2
17018
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of the columns of the data grid contains a DropDownlist. I managed to create this datagrid control as follows.
1
1314
by: | last post by:
This is a crosspost from a less-frequented (but more focused) asp.net group; I didn't receive an answer that worked. I'd like to get this form functional. Could someone help on what's probably a simple syntax issue? I've attempted my due diligence with the usual books and references...but I'm new to ASP.NET. Question follows: The Code Project has a nice article on making a "self configuring form mailer web control." Basically, you apply...
4
1683
by: Sandy | last post by:
Hello - Sorry to have posted this twice, but my question wasn't being answered and I think it might be because my subject wasn't clear. I have a datagrid and a dropdownlist (which is outside the datagrid). When I click on a category in the dropdownlist, the datagrid changes to correspond to that category. The datagrid is paged. Everything works fine, as long as the pager is on the first page. When the
11
5809
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
0
1203
by: stretch73 | last post by:
I have a repeater control with a DropDownList in the header template. I am trying to make a database call and sort the results by the selectedIndex property of the drop down. The SelectedIndexChanged event is not getting fired, feel like I've tried everything. Repeater Code ********************************************************************************************************************************** <asp:Repeater...
2
2533
by: wbosw | last post by:
I would like to open a new window to a url that I have set as the dropdownlist.selectedvalue on the selected index change event. The selectedvalue is the url path and it will open in the existing window. I've tried window.open before the url, but that doesn't work. protected void DropDownList_SelectedIndexChanged(object sender, EventArgs e) { Response.Redirect(this.ddl.SelectedValue); }
1
4655
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by pressing Remove button the selecetd row will be removed. I used viewstate to keep my value for postback, I want by changing selectedvalue of...
0
3498
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button ,another row will be created with the same control (I mean another dropdown and 2 button) and so on. and by...
0
1938
by: asmx126453 | last post by:
Hey mensen I am having some big troubles here i tryd solving it myself with internet for 2 days but i kind fix it. Its about this i have a DotNet project that alrydi is online and working for almost everything. but it whas made in Visual Studio 7 and i converted it to 2005. in version 7 it works almost perfect but in 2005 i am having some errors. becase all the code i am using is very long i am trying to post the nesecery code only if...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8871
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...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
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
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.