This is a migrated thread and some comments may be shown as answers.

New Value using SelectedIndexChanged

2 Answers 119 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Philip Senechal
Top achievements
Rank 1
Philip Senechal asked on 10 May 2011, 07:45 PM
I'm creating a RadComboBox programatically and I'm setting the RadComboBoxSelectedIndexChangedEventHandler. The function runs when the RadComboBox is changed, however, I can't seem to figure out how to get the value that it's being changed to. I seem to be one change behind when I'm evaluating it.

My code for the SelectedIndexChanged function is fairly simple
protected void dd_RptDate_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    if (e.Value == "DAILY")
        Session["s_datePickers"] = "true";
    else
        Session["s_datePickers"] = "false";
}

but e.Value gets me the existing value before I change it. I need to get the value it has been changed to. Any ideas? thanks.

2 Answers, 1 is accepted

Sort by
0
Philip Senechal
Top achievements
Rank 1
answered on 10 May 2011, 07:52 PM
errr...never mind. Looks like it was some other piece of code that was screwing with the session variables, not the ComboBox value.
0
Chris
Top achievements
Rank 1
answered on 30 Jan 2012, 08:41 PM
Philip,

I have a situation where the RadCombo box is behaving exactly as you mention in your first post... i.e the "new" Value property is not reporting the selected value but that which was previously selected.

To my knowledge I don't have any other code "scewing" with my session variables but any comment on how you resolved this issue would be very much appreciated.

Chris.
Tags
ComboBox
Asked by
Philip Senechal
Top achievements
Rank 1
Answers by
Philip Senechal
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Share this question
or