How do I invoke a different DbContentProvider class?
Thanking you in anticipation.
Roger
7 Answers, 1 is accepted
Yes, the ImageSrc icon uses the Image Manager and both uses the same DbcontentProvider class - this is by design. What you can do is to register the external dialogs paths and replace the <tools:ImageDialogCaller control inside the \EditorDialogs\TableProperties.ascx and CellProperties.ascx files with your own button that will launch a custom dialog.
Greetings,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Rather than adopt the solution you suggest, is it possible to send a flag to the DBContentProvider that indicates whether the ImageSrc icon was clicked in the toolbar or in the table (or cell) dialog?
Many thanks.
Roger
It is not possible to send a flag to the DBContentProvider but you can implement a custom button that will invoke the stanalone Image manager dialog. The following KB article will show you how to use the image manager as a standalone control: Using the Image and Document managers outside RadEditor.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I have copied default.aspx and default.aspx.cs into my project, converting the default.aspx.cs to default.aspx.vb.
An error message said that DialogOpener was obsolete, so I changed it to RadDialogOpener as instructed and the file opened successfully.
But, when I click Open ImageManager, I get the error:
Line:121
Error: Sys.ArgumentNullException: Dialog Parameters for the ImageManager dialog do not exist
Parameter name: dialogName
Please advise.
Many thanks.
Roger
For your convenience I converted the C# code to VB.NET and attached a sample working project that demonstrates how to use the Image and Document manager dialogs outside of RadEditor.
All the best,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Thanks for your reply and code, Rumen.
I have successfully built an image manager as a stand alone control that triggers from a custom button in the toolbar.
Now, I want to trigger it from the TableProperties.ascx file instead of the <tools.ImageDialogCaller control.
My control is:
<tr>
<td style="padding: 3px 0;">
<div class="propertyLabel" style="width: 104px;">
<script type="text/javascript">document.write("Background Image");</script>:
</div>
</td>
<td style="padding: 3px 0;">
<input type="text" id="BgImageId" value="" />
<webui:raddialogopener runat="server" id="DialogOpener1"></webui:raddialogopener>
<button onclick="fnDialogOpener()" />
</td>
</tr>
and the function is:
<webui:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function fnDialogOpener() {
$find('<%= DialogOpener1.ClientID %>').open('ImageManager', { CssClasses: [] });
return false;
}
</script>
</webui:RadCodeBlock>
When I run this, the source code shows the function renders as follows:
<script type="text/javascript">
function fnDialogOpener() {
$find('').open('ImageManager', { CssClasses: [] });
return false;
}
</script>
Why doesn't <%= DialogOpener1.ClientID %> resolve?
Thanking you in anticipation.
Roger
You can find attached a sample example which demonstrates how to trigger the standalone ImageManager dialog from the TableProperties tab of the Table Wizard.
The new code is placed in the UserControl.ascx and TableProperties.ascx files.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
