Feb 09, 2011, 10:44 AM
Combobox value with ExtraParams
Hi
I'm looking for some ideas how to do this. I have som rows of data ( listed in a table ), and for each row i have a combobox with a list of emails. For each row there also is a button that does something with the selected email.
My problem is that my current code only gets the email selected from the beginning and not the one the user might have chosen since.
How do I get the correct selected value ?
/ Ulrik
I'm looking for some ideas how to do this. I have som rows of data ( listed in a table ), and for each row i have a combobox with a list of emails. For each row there also is a button that does something with the selected email.
My problem is that my current code only gets the email selected from the beginning and not the one the user might have chosen since.
ForEach Item In List
Dim Email AsNew Coolite.Ext.Web.ComboBox
' Adds an emailaddress
Dim Email1 AsNew ListItem
Email1.Text = "1@example.com"
Email1.Value = "1@example.com"
Email.Items.Add(Email1)
' Adds another emailaddress
Dim Email2 AsNew ListItem
Email2.Text = "2@example.com"
Email2.Value = "2@example.com"
Email.Items.Add(Email2)
' Selects the first address
Email.SelectedItem.Value = "1@example.com"
Dim MyButton AsNew Coolite.Ext.Web.Button
MyButton.AjaxEvents.Click.ExtraParams.Add(New Parameter("Email", Email.SelectedItem.Value.ToString(), ParameterMode.Value))
' MyButton.AjaxEvents.Click.Type = AjaxEventType.Load
AddHandler MyButton.AjaxEvents.Click.Event, AddressOf DoSomething
Next
It's a stripped down example with the emailaddresses added for this example only.How do I get the correct selected value ?
/ Ulrik