Hi,
In my page there's a RadSplitter with 3 RadGrids, 2 of them are in a SlidingPane, see aspx-code below.
I want to drag items from the two grids in the slidingPanes into the other grid. Therefore I use the RadAjaxManager with dynamically added AjaxSettings on preRender.
This is what happens:
The first time I drag an item into the grid everything works fine, except the following text appears above the grid:
"16651|updatePanel|ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_grdPlaylistItemsPanel|"
When after that I drag another item into the grid, I get a JS error:
"Runtime-fout Microsoft JScript: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_grdPlaylistItemsPanel'. If it is being updated dynamically then it must be inside another UpdatePanel."
I tried adding the AjaxSettings in the aspx-page or dynamically, but that makes no difference. I even tried to use the AjaxManagerProxy instead of the AjaxManager. Then I don't get the error, but I don't see the loadingPanel.
Here's my code:
There is a MasterPage, but there's no Ajax or RadControls in it.
OnPreRender:
Thanks!
In my page there's a RadSplitter with 3 RadGrids, 2 of them are in a SlidingPane, see aspx-code below.
I want to drag items from the two grids in the slidingPanes into the other grid. Therefore I use the RadAjaxManager with dynamically added AjaxSettings on preRender.
This is what happens:
The first time I drag an item into the grid everything works fine, except the following text appears above the grid:
"16651|updatePanel|ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_grdPlaylistItemsPanel|"
When after that I drag another item into the grid, I get a JS error:
"Runtime-fout Microsoft JScript: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_grdPlaylistItemsPanel'. If it is being updated dynamically then it must be inside another UpdatePanel."
I tried adding the AjaxSettings in the aspx-page or dynamically, but that makes no difference. I even tried to use the AjaxManagerProxy instead of the AjaxManager. Then I don't get the error, but I don't see the loadingPanel.
Here's my code:
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"ContentPlaceHolderMain"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Office2007"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
asp:UpdatePanel
runat
=
"server"
ID
=
"UpdatePanel"
>
<
ContentTemplate
>
<
cc1:QYNPanel
ID
=
"QynPanel"
runat
=
"server"
>
<
asp:Label
ID
=
"lblHeader"
runat
=
"server"
CssClass
=
"panel-header"
></
asp:Label
>
<
table
class
=
"form"
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"lblName"
runat
=
"server"
Text
=
"Name"
></
asp:Label
>
</
td
>
<
td
>
<
uc1:QYNTextBox
ID
=
"txtName"
runat
=
"server"
Name
=
"Name"
MaxLength
=
"255"
Width
=
"500"
/>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"lblDescription"
runat
=
"server"
Text
=
"Description"
></
asp:Label
>
</
td
>
<
td
>
<
uc1:QYNTextBox
ID
=
"txtDescription"
runat
=
"server"
Name
=
"Description"
MaxLength
=
"255"
Width
=
"500"
IsValidEmpty
=
"True"
/>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"lblPickPolicy"
runat
=
"server"
Text
=
"Playback Method"
></
asp:Label
>
</
td
>
<
td
>
<
asp:RadioButtonList
ID
=
"rblPickPolicy"
runat
=
"server"
AutoPostBack
=
"True"
>
</
asp:RadioButtonList
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"lblArchived"
runat
=
"server"
Text
=
"Archived"
></
asp:Label
>
</
td
>
<
td
>
<
asp:CheckBox
ID
=
"chkArchived"
runat
=
"server"
/>
</
td
>
</
tr
>
</
table
>
<
br
/>
<
br
/>
<
strong
>Playlist Items</
strong
>
<
telerik:RadSplitter
ID
=
"RadSplitter1"
runat
=
"server"
>
<
telerik:RadPane
ID
=
"RadPane1"
runat
=
"server"
>
<
telerik:RadGrid
ID
=
"grdPlaylistItems"
runat
=
"server"
>
<
MasterTableView
TableLayout
=
"Fixed"
>
<
Columns
>
<
telerik:GridTemplateColumn
ItemStyle-Width
=
"500"
HeaderText
=
"Thumbnail"
>
<
ItemTemplate
>
<
asp:Image
ID
=
"imgThumbnail"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"ItemName"
HeaderText
=
"Name"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PlaylistItemType"
HeaderText
=
"Type"
></
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
DataField
=
"Duration"
FooterText
=
"Total Duration: "
HeaderText
=
"Duration"
Aggregate
=
"Sum"
></
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"SortOrder"
HeaderText
=
"SortOrder"
UniqueName
=
"SortOrder"
Visible
=
"true"
></
telerik:GridBoundColumn
>
<
telerik:GridButtonColumn
CommandName
=
"Delete"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
ItemStyle-Width
=
"30"
ConfirmDialogType
=
"RadWindow"
ConfirmText
=
"Are you sure you want to delete this item?"
></
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
telerik:RadPane
>
<
telerik:RadPane
ID
=
"RadPane2"
runat
=
"server"
>
<
telerik:RadSlidingZone
ID
=
"RadSlidingZone1"
runat
=
"server"
>
<
telerik:RadSlidingPane
ID
=
"SlidingPaneMessages"
runat
=
"server"
>
<
div
class
=
"radGrid"
>
<
strong
>Drag message to playlist</
strong
>
<
br
/>
<
telerik:RadGrid
ID
=
"grdMessages"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"ScalaId, Name"
ShowHeader
=
"false"
>
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"Name"
SortOrder
=
"Ascending"
/>
</
SortExpressions
>
<
Columns
>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:Image
ID
=
"imgThumbnail"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"Name"
DataType
=
"System.String"
ItemStyle-Width
=
"150px"
ItemStyle-Wrap
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
</
telerik:RadSlidingPane
>
<
telerik:RadSlidingPane
ID
=
"SlidingPanePlaylists"
runat
=
"server"
>
<
div
class
=
"radGrid"
>
<
strong
>Drag subplaylist to playlist</
strong
>
<
br
/>
<
telerik:RadGrid
ID
=
"grdPlaylists"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"ScalaId, Name"
ShowHeader
=
"false"
>
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"Name"
SortOrder
=
"Ascending"
/>
</
SortExpressions
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Name"
DataType
=
"System.String"
ItemStyle-Width
=
"150px"
ItemStyle-Wrap
=
"true"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
div
>
</
telerik:RadSlidingPane
>
</
telerik:RadSlidingZone
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
<
table
width
=
"100%"
>
<
tr
>
<
td
colspan
=
"2"
>
<
asp:Label
ID
=
"lblValidationMessages"
runat
=
"server"
Text
=
""
CssClass
=
"errorMessage"
></
asp:Label
>
</
td
>
</
tr
>
<
tr
align
=
"right"
>
<
td
>
<
asp:Button
ID
=
"btnSave"
runat
=
"server"
Text
=
"Save"
OnClick
=
"OnSaveClick"
/>
<
asp:Button
ID
=
"btnApply"
runat
=
"server"
Text
=
"Apply"
OnClick
=
"OnApplyClick"
/>
<
asp:Button
ID
=
"btnDelete"
runat
=
"server"
Text
=
"Delete"
Visible
=
"false"
OnClick
=
"OnDeleteClick"
CausesValidation
=
"false"
OnClientClick
=
"return confirm('Are you sure this playlist must be deleted?')"
/>
<
asp:Button
ID
=
"btnCancel"
runat
=
"server"
Text
=
"Cancel"
OnClick
=
"OnBackClick"
CausesValidation
=
"false"
/>
</
td
>
</
tr
>
</
table
>
</
cc1:QYNPanel
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
asp:Content
>
OnPreRender:
protected
override
void
OnPreRender(EventArgs e)
{
base
.OnPreRender(e);
//add AjaxManager settings
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdPlaylistItems, grdPlaylistItems, RadAjaxLoadingPanel1);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdMessages, grdPlaylistItems, RadAjaxLoadingPanel1);
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grdPlaylists, grdPlaylistItems, RadAjaxLoadingPanel1);
//set height of Splitter dynamically
RadSplitter1.Height = (LoadedPlaylistItems.Count * 57) + 60;
}
Thanks!