I need to be able to open a modal and bind a RadListBox within the modal at the point in time when the modal opens. Then the user will make selections from the RadListBox and click a button in the modal which needs to cause a partial postback to update a RadComboBox on the main page. I'm struggling to find the right way to achieve this. So far I have a RadWindow control which contains the RadListBox and the button and I found a code example for binding before opening a modal.
What is the best way to do a partial postback on lnkOK_Click? I have a RadAjaxManagerProxy on the page already.
<
telerik:RadWindow
ID
=
"rwModal"
runat
=
"server"
DestroyOnClose
=
"False"
Skin
=
"Telerik"
Modal
=
"True"
Width
=
"450"
Height
=
"550"
Behaviors
=
"None"
>
<
ContentTemplate
>
<
telerik:RadListBox
ID
=
"rlb1"
runat
=
"server"
Width
=
"200"
Height
=
"400"
>
</
telerik:RadListBox
>
<
asp:LinkButton
ID
=
"lnkOK"
runat
=
"server"
Text
=
"OK"
/>
<
asp:LinkButton
ID
=
"lnkCancel"
runat
=
"server"
Text
=
"Cancel"
/>
</
ContentTemplate
>
</
telerik:RadWindow
>
Private
Sub
lnkShowModal_Click(sender
As
Object
, e
As
System.EventArgs)
Handles
lnkShowModal.Click
rlb1.DataSource = cmbList.Items
rlb1.DataTextField =
"Text"
rlb1.DataValueField =
"Value"
rlb1.DataBind()
Dim
script
As
String
=
"function f(){$find("
""
+ rwModal.ClientID +
""
").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Page, Page.
GetType
(),
"key"
, script,
True
)
End
Sub
Private
Sub
lnkOK_Click(sender
As
Object
, e
As
System.EventArgs)
Handles
lnkOK.Click
cmbDeptDCVL.Visible =
False
End
Sub
What is the best way to do a partial postback on lnkOK_Click? I have a RadAjaxManagerProxy on the page already.