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?
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
});
Related
I am trying to extract thumbnails from source jpegs and save them to the file system, using the C# ImageSharp library. I see there is some mention of it in the intellisense for the component:
SixLabors.ImageSharp.Image.Metadata.ExifProfile.CreateThumbnail()
...but I can't seem to find any documentation for it or examples to call it correctly.
I did find this:
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
//method code:
Image<TPixel> thumbnail = image.Metadata.ExifProfile.CreateThumbnail<TPixel>();
https://docs.sixlabors.com/api/ImageSharp/SixLabors.ImageSharp.Metadata.Profiles.Exif.ExifProfile.html
...but I need to find where the TPixel type is to get it to work. VisualStudio doesn't recognize it and I can't seem to find a namespace or use it correctly:
"The type or namespace name 'TPixel' could not be found (are you missing a using directive or an assembly reference?)"
Legacy Windows .NET Framework could do this for System.Drawing.Image.Image.GetThumbnailImage() and it worked pretty well.
EDIT: Using tocsoft's answer, I changed the code to:
if (image.Metadata.ExifProfile != null)
{
Image<Rgba32> thumbnail = image.Metadata.ExifProfile.CreateThumbnail<Rgba32>();
thumbnail.Save(thumbnailPath, encoder);
}
...however, the image.Metadata.ExifProfile is null, which is unexpected since I know these source images have EXIF data.
EDIT: Actually, it's working now. Success! Thank you!
TPixel would be any of the pixel formats in the SixLabors.ImageSharp.PixelFormats namespace. But unless you are planning on interoperating with other systems that require the pixel data layed out in memory in specific ways you will likely just want to use Rgba32
Image<Rgba32> thumbnail = image.Metadata.ExifProfile.CreateThumbnail<Rgba32>();
I have some problems, to change user profile with cefsharp 71.0.2.
All is working good with an user1.
To change users, the General Usage Wiki page gives me the solution.
But the 3rd line of this code
var requestContextSettings = new RequestContextSettings { CachePath = cachePath2 };
browser = new ChromiumWebBrowser();
browser.RequestContext = new RequestContext(requestContextSettings, new CustomRequestContextHandler());
gives 2 errors :
impossible to convert Cefsharp.RequestContextSettings to Cefsharp.IRequestContext
CustomRequestContextHandler reference can't be found.
I used Nuget to include the package 71.0.2 targetFramework 461 to my project.
A RequestContext(requestContextSettings) constructor is working to run something, but the browser is frozen on the last page I loaded with the user1.
Some tips to fix the problem ?
I saw that a 73.1.120.pre is on GitHub, but I don't know how to manage that without some Nuget package.
Tx for your help.
I am trying to experiment with Native Forms in XF. I have this in iOS working right. That is fine.
In Android, I am getting the following error:
'MainPage' does not contain a definition for 'CreateSupportFragment' and the best extension method overload 'PageExtensions.CreateSupportFragment(ContentPage, Context)' requires a receiver of type 'ContentPage'
The code is erroring in the following code:
var _cp = new MainPage(); // my page from XF.
_list = _cp.CreateSupportFragment(this);
I have made sure that my nuget packages are up to date. I have cleaned and compiled. I've done a bunch of things, but alas, no love. Any ideas on this?
TIA
you need add the line to head of source:
using Xamarin.Forms.Platform.Android
because CreateSupportFragment is an extension method defined in it.
I've spent the last day trying to get a checkbox validator to work. I found some starting code on the 4GuysFromRolla website, however this was coded back in 2006 and doesn't play alongside updatepanels.
I've made changes and now it works. As I'd made quite a few changes I wanted to standardise it and use it alongside other utility classes, so I created a new class project and copied the code verbatim.
The problem is that the original works, but I get a WebResource not found error on my new class project.
The differences are: The original was a web application project:
my new project is simply a class library project.
The original assembly and namespace have changed.
Both contain a single class and a resource file (.js)
Both resource files are contained in the root directory
Both resource files are set to embed resource
I'm running out of ideas, and have exhausted the answers I've found on the web with no success.
Is there an issue with the fact that its a class library? Have I perhaps overlooked something else?
Its pretty difficult to see beyond those 2 questions because the project is so small and insignificant.
Here's the code that does work:
if (this.RenderUplevel && this.Page != null)
{
ScriptManager.RegisterClientScriptResource(Page, this.GetType(), "skmValidators.skmValidators.js");
}
Here's the code that doesn't:
if (this.RenderUplevel && Page != null)
{
ScriptManager.RegisterClientScriptResource(Page, this.GetType(), "ValidationExtender.EvaluationFunctions.js");
}
Anyone give any ideas?
Thanks in advance.
The error turned out to be a mismatch between the dll's in the test page.
I'm doing a bit tidy of the Content Manager and have a component that won't delete (not the same as my other question).
When I try to delete the component in question I get the following error
(8004032D) This item is in use.
Unable to delete Component (tcm:4-65020).
UtilitiesBL.AssertItemCanBeDeleted
UtilitiesBL.AssertItemCanBeDeleted
ComponentBL.Delete
Component.Delete
Request.Delete
When I use the Where Used tool on the component I get no results in the "Used In" tab, one result in the "Uses" tab, the "Blueprint Hierachy" shows it is not localized in any of my three child publications and no results in the "Published To" tab.
I have had a look in the Content Manager database to see if I can spot what is going wrong but not really found anything.
Any ideas?
Thanks in advance.
It looks like the Where Used tool in R5.3 isn't working correctly. The component in question is used in 15000 other components. I found this by using the TOM API directly.
var componentID = "tcm:4-65020";
TDS.TDSE tdse = new TDS.TDSE();
var component = (TDS.Component)tdse.GetObject(componentID, TDSDefines.EnumOpenMode.OpenModeView);
var whereUsedString = component .Info.GetListUsingItems();
Now comes the task of deleting all these links...