I'm looking to see if there is a way to copy the current image that is in the RadImageEditor into clipboard, and also be able to replace it using Paste.
I need to show the handle / title bar under certain conditions, and have not showing under other conditions. Looking for a way to set the DockHandle to none using javascript.
Is there a way to do this? I tried dock.set_handle(null), and that didn't work.
Thanks,
Dave

Hi there,
I have a radtoggleButton in a grid with two states and I´m creating the new rows using a DataTable source of the Grid.
My question is how I can use the datable to set the second state of the toggle button.
This is how the grid looks like:
And this is the column template for the grid.
I´ve tried to set the value as newRow("Visibility") = "Hide" or adding the button directly to this cell of the row.
Let me know if you have some ideas, please.
Thanks,
Alvaro.

Hello,
For my RadGrid, I need 2 different ways to insert.
So, I declare I want to use User controls,
<EditFormSettings EditFormType="WebUserControl"></EditFormSettings>and I change programmatically the form to use.
protected void rgrid_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName.Equals("AddF"))
{
e.Item.OwnerTableView.EditFormSettings.UserControlName = "../UserControl/UC_PDGInsertionF.ascx";
e.Item.OwnerTableView.InsertItem();
}
else if (e.CommandName.Equals("AddN"))
{
e.Item.OwnerTableView.EditFormSettings.UserControlName = "../UserControl/UC_PDGInsertionN.ascx";
e.Item.OwnerTableView.InsertItem();
}
}My Command buttons that show the forms work perfectly.
However, my Command buttons don't work on my User controls (both of them).
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UC_PDGInsertionN.ascx.cs" Inherits="UC_PDGInsertionN" %>
<table>
<%-- some code --%>
<%-- Buttons --%>
<tr>
<td align="right" colspan="2">
<asp:Button ID="btnAdd" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Add" Visible="True"></asp:Button>
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel" Visible="True"></asp:Button>
</td>
</tr>
</table>Whether I click on one or the other, I get this exception:
La valeur ne peut pas être null.
Nom du paramètre : virtualPath
Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.
Détails de l'exception: System.ArgumentNullException: La valeur ne peut pas être null.
Nom du paramètre : virtualPath
[ArgumentNullException: La valeur ne peut pas être null.
Nom du paramètre : virtualPath]
System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +511
Telerik.Web.UI.GridEditFormItem.InitializeUserControlForm(GridColumn[] columns, ControlCollection controls, GridEditFormSettings formSettings) +92
Telerik.Web.UI.GridEditFormItem.InitializeEditForm(GridColumn[] columns) +6349
Telerik.Web.UI.GridEditFormInsertItem.InitializeEditForm(GridColumn[] columns) +37
Telerik.Web.UI.GridEditFormItem.Initialize(GridColumn[] columns) +369
Telerik.Web.UI.GridEditFormItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +266
Telerik.Web.UI.GridTableView.CreateInsertItem(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ControlCollection rows) +656
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +3191
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +1308
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +97
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +207
Telerik.Web.UI.GridTableView.PerformSelect() +23
Telerik.Web.UI.GridTableView.DataBind() +360
Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +3113
Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +150
System.Web.UI.Control.LoadRecursive() +154
System.Web.UI.Control.LoadRecursive() +251
System.Web.UI.Control.LoadRecursive() +251
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082
I had to disable AJAX in the RadAjaxManager to be able to see the exception.
Do you any idea of the source of the problem?
Hi, I'm trying to create a dynamic rad grid (two columns) for batch edit where one column can have different control based on a condition. Basically, it should look like this once click to edit the cell.
Value 1 Dropdown Value 2 TextBox Value 3 DatePicker Value 4 Checkbox Value 5 TextBox
Can anyone share a sample code for this?
Thank You

Hi there,
I´m using a RadNumericTextBox as a counter and I would like to show the number on the right but no between the arrows.
Right now I´m using the option: <EnabledStyle HorizontalAlign="Right" />
Thanks,
Alvaro.
Hi there,
I'm updating the number of the frozen columns of a grid in another modal form, and after I would like to see the changes in the grid after closing the modal form. Which action should I call?
Thanks,
Alvaro.
Hi there,
since it is not possible to paste images, if stripping all formatting is configured, i have created a small workaround, which i want to share. Target was, to get pretty clean HTML - without annoying markup - but to allow images to be inserted via clipboard.
First of all, use the options of the editor, to "pre-clean" the HTML:
StripFormattingOptions="Css,Font,Span,MSWordRemoveAll"
Then attach to the OnClientPasteHtml event and perform special cleaning, if HTML is pasted:
function Editor_PasteHtml(sender, args) {
var sInitialValue = args.get_value();
if ((args.get_commandName() == 'Paste') && (sInitialValue != null)) {
// Only allow basic tags
var sStrippedValue = sInitialValue.replace(new RegExp("<(?!\/?(strong|b|em|img|(i(?!nput))|u|ol|ul|li|p|br)(?=>|\s?.*>))\/?.*?>", "ig"), "");
args.set_value(sStrippedValue);
}
}The solution is not perfect and the RegEx could be extended, but for our case, it works good enought. The RegEx itself was taken from a sample by Rumen and modified, to allow less tags.
Kind regards, Carsten
