tlikeit tlikeit - 3 months ago 20
ASP.NET (C#) Question

Why my DevExpress v14.1 doesn't have the GridViewEdittingMode component?

According to the official document of DevExpress : https://documentation.devexpress.com/#AspNet/DevExpressWebGridViewEditingModeEnumtopic , the assembly which contains GridViewEditingMode component should be DevExpress.Web.v14.1.dll. However, I tried to add it to my reference, it still said GridViewEditingMode does not exist. The hash code of my DevExpress.Web.v14.1.dll is SHA256 CFDE95612BA9D4A771DD0236D95A8A1881BE983DC72985205E36134CA37D1075. Worse still, I don't have the project converter in my computer, nor does DevExpress provide v14.1 trial anymore.

Is there any one who knows how to make GridViewEditingMode component be available in a DevExpress v14.1 based project?

Answer

Looks like you faced this breaking change (Some classes related to DevExpress ASP.NET controls have been moved to the DevExpress.Web namespace). So, the namespace where the GridViewEditingMode enumeration is implemented was changed from DevExpress.Web.ASPxGridView to DevExpress.Web. The following code should work for you.

var grid = Html.DevExpress().GridView(settings =>
{
    settings.Name = "GridView";
    // code
    settings.SettingsEditing.Mode = DevExpress.Web.ASPxGridView.GridViewEditingMode.EditFormAndDisplayRow;
    // code
});
Comments