Hi! I need to have a RadComboBox, contained within a RadListView, rebind upon a RadWindowClosing.
I followed the solution from http://www.telerik.com/community/forums/aspnet/window/rebind-radcombobox-when-radwindow-closed.aspx. However cannot seem to access the RadComboBox in the code behind.
Here's the relevant code from the aspx page:
Here's the relevant code from the vb page:
I get an error saying 'object reference not set to an instance of an object', and when debugging through the code I see that it's not able to find the RadComboBox. I'm guessing perhaps this has something to do with the button only being in the Edit and Insert Item Templates?
Any assistance would be greatly appreciated, thank you!
I followed the solution from http://www.telerik.com/community/forums/aspnet/window/rebind-radcombobox-when-radwindow-closed.aspx. However cannot seem to access the RadComboBox in the code behind.
Here's the relevant code from the aspx page:
// Javascript
function closeRadWindow() {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
}
function openWin() {
var oWnd = radopen("/TestDevelopment/Controls/CopyrightHolder.aspx", "winCopyright");
}
// RadAjaxManager and RadWindow declaractions
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
UpdatePanelsRenderMode
=
"Inline"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
onajaxrequest
=
"RadAjaxManager1_AjaxRequest"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadListView1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"cboHolder"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadWindowManager
>
<
Windows
>
<
telerik:RadWindow
ID
=
"winCopyright"
Modal
=
"true"
Behaviors
=
"Close, Move"
NavigateUrl
=
"/TestDevelopment/Controls/CopyrightHolder.aspx"
runat
=
"server"
Width
=
"870px"
Height
=
"515px"
OnClientClose
=
"closeRadWindow"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
// Button
<
input
type
=
"button"
id
=
"btnHolder"
runat
=
"server"
value
=
"Holder"
onclick
=
"openWin(); return false;"
/>
Here's the relevant code from the vb page:
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
Dim cb As RadComboBox = DirectCast(RadListView1.FindControl("cboHolder"), RadComboBox)
cb.DataBind()
End Sub
I get an error saying 'object reference not set to an instance of an object', and when debugging through the code I see that it's not able to find the RadComboBox. I'm guessing perhaps this has something to do with the button only being in the Edit and Insert Item Templates?
Any assistance would be greatly appreciated, thank you!