The correct usage is:
this.imageList1.Images.Add(new ImageListEntry { Name = "myImage" ImageSource = "myImage" });
With Wisej.NET the ImageSource property is alternative to Image. Image is a System.Drawing.Image while ImageSource is a string. It takes a URL, a name of a themed image, a relative file path. See https://docs.wisej.com/docs/controls/general/icons#image-files.
You can put the code in your application. Write it or use the designer.
which place I put this statement? inside my class?
this.imageList1.Images.Add(new ImageListEntry
{
Name = "myImage"
ImageSource = Application.Theme.Images["myImage"]
});
Hi Sidney,
Attached a template for the JSON file.
If you want to register an EJ1 license, please follow the guide on Syncfusion’s Website.
HTH,
Alaa
//
Hi Julie!!
Thanks for your answer!
To illustrate, I attached to the example you sent me, a library, that I created, and referenced in the Wisej project. The Wisej project runtime takes place in the net4.8 environment and I don’t know how to get around it. See in the attached example that the application does not recognize the net6.0 runtime.
I know I’m doing something wrong but I don’t know what it is, since in the example the EntityFramework 6.0 packages were attached to the 6.0 runtime and it worked, but with my library it doesn’t work.
Thanks!
Yes, it’s possible and a normal thing to do in Visual Studio to have multi targeting.
There are 3 common approached to multi targeting whether it is for .NET versions or OS targets:
1. Conditional compilation #if NETCOREAPP
etc. You’ll find examples in most of Microsoft code on GitHub. You might also find the Microsoft Documentation on conditional compilation helpful.
2. Separating folders using conditional <ItemGroup>
in the sdk format project
3. Separating files using conditional <ItemGroup>
in the sdk format project
3a. Separating partial class files (most Microsoft projects use this approach with Socket.cs Socket.Windows.cs
and Socket.Unix.cs
for example, see Github)
See attached sample using EF Core.
We need net48 for the designer until Wisej.NET 4 where we will be able to have two separate designers, one for net48 and one for net core.
I tried the same sample provided and it works without any issue. You cannot expect to use an Image as a string that is the name of an image file. Also base64 is not the name of an image. If you want to use a bitmap you need to assign it to a property of type Image not string. Try BackgroundImage.
So… i tried this, but the compiler says to me: you can convert the bitmap to string. This appears that the cellStyle dont receive the image tipe, how i can do, i tried convert in base64 to .. but nothing happens.
method cellformating{
Icon iconMsgFechada = new Icon(serviceMsg.EntregaDiretorio(1) + “MsgFechada.ico”);
Icon iconMsgAberta = new Icon(serviceMsg.EntregaDiretorio(1) + “MsgAberta.ico”);
if (e.ColumnIndex == 1)
{
if (e.Value.Equals(0))
{
e.CellStyle.BackgroundImageSource = iconMsgFechada.ToBitmap();
}
else
{
e.CellStyle.BackgroundImageSource = iconMsgAberta.ToBitmap();
}
}
}
Hi Jay,
It’s better to use the CellFormatting Event to apply your logic.
I have attached a sample for you!
I would also like to point out that it’s highly recommended that you don’t use the Bitmap() object but instead use the “ImageSource” property and deploy your /Images resources, This way there is no memory usage on the server to load the image and it’s also cached on the browser.
You can check out our DemoBrowser application for more details about this, and I would like to also point you out to another similar post in this forum for more info!
Merry Christmas,
Alaa
That’s it! The iis users had read only permissions on the temp folder.
Thx and merry christmas
Stephan
Hi Stephan
Testing in a IIS into web machine from our side, all works fine
We suggest you that check for permission in directory /temp on your IIS machine.
Regards
Unfortunately it’s a regression related to sorting a DataGridView data bound to a source that doesn’t support sorting. It’s fixed in the current internal build and will be available shortly If you use dgv.Fill(dataSource) you can see the correct sorting.
Hi Dragan,
Yes, You’ll have to get the NuGet Packages from the NuGet Package Manager in Visual Studio to get the premium extension controls.
HTH,
Alaa
Surely the DataGridView should be able to handle sorting the basic types like strings and numbers automatically. Or I’m just spoiled in the past by using the DevExpress grid in WinForms. ?
I’ll give your suggestion a try, thanks for the reply!
Don’t know what could possibly go wrong here. You might consider an event handler to have more control over the sorting, e.g. to sort durations in der format hours:minutes, that’s c#:
dataGridView1.SortCompare += DataGridView1_SortCompare;
private void DataGridView1_SortCompare(object sender, DataGridViewSortCompareEventArgs e)
{
if (e.Column.Name == Tags.Duration)
{
e.Handled = true;var v1 = e.CellValue1 as string;
var v2 = e.CellValue2 as string;var d1 = 0;
var d2 = 0;if (v1.Contains(‘:’))
{
var c1 = v1.Split(‘:’);
d1 = int.Parse(c1[0]) * 60 + int.Parse(c1[1]);
}if (v2.Contains(‘:’))
{
var c2 = v2.Split(‘:’);
d2= int.Parse(c2[0]) * 60 + int.Parse(c2[1]);
}e.SortResult = System.Collections.Comparer.DefaultInvariant.Compare(d1, d2);
}
}
Cheers, Gerhard
Hi Pablo,
Thank you for contacting support!
Would you mind trying with version 3.1.4 and/or 3.1.3 and see if that fixes the issue ?
Thanks!
Alaa
Hi Kurt,
Would it be possible to provide more information?
Preferably:
TIA,
Alaa
Hi Jay,
The right thing to do is to have your Images resources accessible throughout the app.
That way it could be accessible from anywhere, something similar to MyApp.Properties.Resources.myimage.
With Wisej.NET, there’s another way of loading images and that’s directly from the ImageSource property which would behave similarly to a website loading a ‘static image’ from the public folder, or using a URL.
You can find out more about the latter in our Documentation.
So, you have a few options:
I would also highly encourage that you check out our DemoBrowser Application, it’s Open Source and you can use it to see how any control can be used/configured and much more!
HTH,
Alaa
Hi Manfred,
Thank you for contacting support!
Can you try running the Visual Studio Command Prompt and then executing the devenv /updateConfiguration command?
Also, you can checkout our Documentation for Troubleshooting steps!
HTH,
Alaa
Hi Kizaemon,
The RadioButton control can be controlled in any way an application needs to.
You can set the AutoCheck property to false and then handle the CheckStateChanged event.
You can checkout our API Documentation for more info!
Also, you can combine my answer from an older post of yours for better results!
HTH,
Alaa
It’s not bizarre. Static means it’s shared across all threads. The timer is created once (since you created it as a static component). Which means browser1 fires the timer. Then you attached multiple handlers to the same timer instance (because it’s static) therefore the handlers are invoked by the thread that fired the event, which means they execute for other sessions out of context. This is not something related to Wisej.NET. It’s simply the way static instances of anything work.
Polling is alternative to websocket.
I tried your sample is all works as expected.