468,740 Members | 1,948 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,740 developers. It's quick & easy.

strange problem in Listview eventhandler - please help - strugglingalready a week

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.
I'm not using an object Datasource...

ItemUpdating
-------------------
protected void lvSalesOrderInquiry_ItemUpdating(object sender,
ListViewUpdateEventArgs e)
{
ListView item = (ListView)sender;

-1-
// this works fine I get the .Text Property = 550 ->works
well
((TextBox)e.Item.FindControl("TextBoxQuantity")).T ext

-2-
// The .SelectedValue property is empty = "" - I should get
normally "ABC"

((DropDownList)e.Item.FindControl("DropDownListHol dCode")).SelectedValue

-3-
// The .Text property is empty = "" - I should get normally
"Z-Hold"
((Label)e.Item.FindControl("LabelHoldCode")).Text

So what is the problem in 2 and 3. I get the changed value for
Textbox but not for the other controls like Dropdownlist, label
etc...

what is the reason?

thans for any any help,

mesut

ps: I also tried ItemCommand eventhandler... the same results.
Sep 8 '08 #1
0 1037

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Simon Middlemiss | last post: by
reply views Thread by Martin Streller | last post: by
6 posts views Thread by Vanessa | last post: by
4 posts views Thread by Paddy | last post: by
reply views Thread by willow1480 | last post: by
4 posts views Thread by Bill2k | last post: by
5 posts views Thread by Jure Bogataj | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.