Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
@using DevExpress.Web.Mvc.UI;
@using System.Web.Mvc.Html;
@using System.IO;
@using DevExpress.AspNetCore;
@using System.Linq;
@using Microsoft.EntityFrameworkCore;
@using DevExpress.XtraRichEdit;
@using DevExpress.AspNetCore.RichEdit;
@using Microsoft.AspNetCore.Components.Web;
@using System.Net;

@using (Html.BeginForm())
{
   
    @Html.DevExpress().RichEdit(delegate(setting =>
{
     settings.Name = "RichEdit";
     settings.CallbackRouteValues = new { Controller = "Home", Action = "RichEditPartial" };
})).GetHtml()
}


What I have tried:

@using (Html.BeginForm())
{
    @Html.DevExpress().RichEdit(delegate(setting =>
{
     settings.Name = "RichEdit";
     settings.CallbackRouteValues = new { Controller = "Home", Action = "RichEditPartial" };
})).GetHtml()
}
Posted
Updated 9-Jan-22 22:40pm
Comments
Chris Copeland 10-Jan-22 4:22am    
I won't post this as a solution as I'm not 100% on ASP, but I don't think the delegate keyword is meant to be used like that. Can you try removing the keyword and the parenthesis and try this:

@Html.DevExpress().RichEdit(setting =>
{
settings.Name = "RichEdit";
settings.CallbackRouteValues = new { Controller = "Home", Action = "RichEditPartial" };
}).GetHtml()
Sudha Shana 10-Jan-22 5:53am    
Thankyou for your reply

1 solution

You are trying to use code for the MVC5 version of the control[^]. But you've tagged your question as Blazor, which means you're using the ASP.NET Core version of the control.

The ASP.NET Core version doesn't accept a delegate as a parameter to the RichEdit method. It only accepts a string representing the name of the element:
BuilderFactoryRichEditExtensions.RichEdit(BuilderFactory, String) Method | ASP.NET Core Controls | DevExpress Documentation[^]

There doesn't seem to be an equivalent for the CallbackRouteValues; you will need to consult the documentation[^] and examples[^] to determine how to update your code.
 
Share this answer
 
Comments
Sudha Shana 10-Jan-22 5:54am    
Yeah, thankyou this solution works

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900