473,569 Members | 2,813 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 3094
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
16984
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
1306
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...
4
1681
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. ...
11
5792
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
0
1197
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...
2
2529
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)...
1
4645
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...
0
3486
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...
0
1928
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...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
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. ...
0
8138
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...
0
6287
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...
1
5514
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...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
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
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
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...

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.