473,666 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

listview doesn't show the values for Dropdownlist and Label controlsbut it shows for TextBox yes

Hi colleagues,

I've a very strange problem here. I have no clue whyt it happens.

I have a listview. The Listview populates well. I have an Update
Button in the listview and a Listview_ItemUp dating(object sender,
ListViewUpdateE ventArgs e).

The problem is : I'm able to retrieve the TextBox values. But not for
the Labels and for the Dropdownlistbox ????

So below the the field :
- Location type TEXTBOX shows the data ( property Text) I get the data
value
- Lot type LABEL and LineType DROPDOWNLISTBOX (property: .text
and .SelectedValue) shows empty. I won't get the data. It shows empty.

why???????? I'm confused, because why am I able to get the values from
TEXTBOXES but not for other controls like DROPDOWNLISTBOX ,
LABELS?????? etc.

returns:
location = "abcdef"
Lot = ""
LineType = ""

protected void lvSalesOrderInq uiry_ItemUpdati ng(object sender,
ListViewUpdateE ventArgs e)
{
ListView me = (ListView)sende r;
// I get some value
Location =
((TextBox)me.It ems[e.ItemIndex].FindControl("T extBoxProductNu mber")).Text;

//I get empty string.... no value is returned.
Lot =
((Label)me.Item s[e.ItemIndex].FindControl("L abelLot")).Text ;
LineType =
((DropDownList) me.Items[e.ItemIndex].FindControl("( (DropDownListLi neType")).Selec tedValue;
thanks for the help,
mesut
Sep 5 '08 #1
0 1111

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

Similar topics

2
21241
by: John Lauwers | last post by:
I know you can edit the first column of the listview control, is there a way to edit the second and/or the other columns? greets John
4
16974
by: Todd Perkins | last post by:
Hello all, surprisingly enough, this is my first newsgroup post, I usually rely on google. So I hope I have enough info contained. Thank you in advance for any help! Problem: I am getting this error when I try to pull up my edit page to display the current database information in the form, and then edit it on click:
3
1537
by: robboll | last post by:
I am building an ASP.NET data entry form and when I change the values per the dropdowns and click "save", the old values remain. Are there any suggestions on how to update the variables to the latest data selections? ***** The code: ******************************************* Imports System.Data.SqlClient Public Class WebForm1
2
399
by: Ned Balzer | last post by:
Hi, Apologies if this is a newbie question, I haven't found the answer in any faqs. I have an asp.net 2.0 page that sets session variables and then redirects to another page. For the page that gets redirected to, I've swapped in a simple page for testing that reads the session variables and displays their values.
0
5947
by: sgtmarcjones | last post by:
How do I access a dropdownlist that is nested within a Formview ItemTemplate Gridview Template? I want to see a label (lgbTimeKeep ! TextValue of ddlName dropdownlist) instead of a dropdownlist in the FormView ItemTemplate Nested Gridview ddlName ItemTemplate. My label is named lgvTimeKeep and the dropdownlist name is ddlName. Thanks!
9
2185
by: Bob Malcoprs | last post by:
Hi, I want to get all the selected values of a listbox in several labels.. With this code here below, when i click on e.g. "option 2", i get '2' in label2. That's ok. But if i then click on "option 3", "option 3" is selected and "option 2" is deselected. So i get '3' in label3 but also still '2' in label2. Same with "option 1". And when i deselect everything, i still get '2' and '3'. I can't get rid of them.
3
5523
by: mwalts | last post by:
I'm fairly new to ASP.NET, although I have a fair amount of C# experience. I'm creating a SharePoint Web Part, but I'm doing the development for it locally in ASP.NET 1.1 I'm using a DropDownList control with autopostback = true in order to run code on the SelectedIndexChanged event. Both IE 7 and FireFox are obviously loading a page again when a selection is made, but only FireFox actually shows the changes made to the page. I tried a...
2
3359
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I am attempting to insert a simple record with LinqDataSource from a ListView, however I always get a message saying "....LinqDataSource 'dataSource' has no values to insert. Check that the 'values' dictionary contains values...." I am using a ListView with a DataSourceID of a LinqDataSource. When a new row icon is clicked....the ListView properly enters into the InsertItemTemplate....however when the ImageButton with a CommandName of...
0
1276
by: mesut | last post by:
Hi colleagues, I know this group is not related to ASPX directly, but I'm struggling with this already a week and can't get/find any answer from other groups or internet site... I'm using a listview and the problem is I won't get the values from the server controls in 1-ListView_Itemcommand and/or 2- listview_ItemUpdating events for all Server controls Except for TEXTBOX controls.
0
8355
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
8866
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
8781
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
8550
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
8638
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
4193
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
2769
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
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1769
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.