I have a Combox with a list of cities, if a client's city is missing I want them to be able to update the list on the fly. Everything is working except one aspect. In AddNewCityTextbox_TextChanged I simply find the textbox and add the Text to the CommandArgument of the radButton which is used to submit.
This all works, Except that the TextChanged only does a Postback when the Client clicks elsewhere. In my case they wil logically click on Submit, therefore the JavaScript fires before (or seems to) the script is updated.
Is there another wau I can logically get around this?
This all works, Except that the TextChanged only does a Postback when the Client clicks elsewhere. In my case they wil logically click on Submit, therefore the JavaScript fires before (or seems to) the script is updated.
Is there another wau I can logically get around this?
Public
Sub
AddNewCityTextbox_TextChanged(sender
As
Object
, e
As
System.EventArgs)
Dim
TextBox =
CType
(sender, RadTextBox)
Dim
item =
CType
(TextBox.NamingContainer, RadListViewEditableItem)
Dim
AddNewCityTextbox
As
RadTextBox =
DirectCast
(item.FindControl(
"AddNewCityTextbox"
), RadTextBox)
Dim
SubmitLink
As
RadButton =
DirectCast
(item.FindControl(
"SubmitNewCity"
), RadButton)
SubmitLink.CommandArgument =
"Please confirm you wish to add "
& AddNewCityTextbox.Text &
"?"
End
Sub
<telerik:RadButton ID=
"SubmitNewCity"
runat=
"server"
Text=
"Submit"
style=
"margin-right:10px;"
ValidationGroup=
"AddCityGroup"
OnClientClicking=
"function(button,args){args.set_cancel(!window.confirm(button.get_commandArgument()));}"
>
</telerik:RadButton>