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

M

mesut

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_ItemUpdating(object sender,
ListViewUpdateEventArgs 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 lvSalesOrderInquiry_ItemUpdating(object sender,
ListViewUpdateEventArgs e)
{
ListView me = (ListView)sender;


// I get some value
Location =
((TextBox)me.Items[e.ItemIndex].FindControl("TextBoxProductNumber")).Text;

//I get empty string.... no value is returned.
Lot =
((Label)me.Items[e.ItemIndex].FindControl("LabelLot")).Text;
LineType =
((DropDownList)me.Items[e.ItemIndex].FindControl("((DropDownListLineType")).SelectedValue;


thanks for the help,
mesut
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top