All Answers

0 votes
In reply to: Report

Hi Anz,

Please check out this link or do a quick search in the forum, there are many posts about using Report Viewers in Wisej 🙂

https://wisej.com/support/question/does-anyone-has-got-working-example-of-crystal-report-viewer-or-ms-reporting-services-viewer

Best,

Levie

0 votes
In reply to: get filled html

Hi Luca,

have you a javascript example, please?

best

Cristian

0 votes

Hi Luca,

thank you for your reply.

Please find a sample project attached, that i used to play around integrating the captcha control.

The sample contains an AspNetControl Wrapper, that wraps the ASPxCaptcha Control and one window.
The goal is to validate the captcha, when the user clicks the button “Check captcha”. The captcha control by DevExpress has its own TextBox and has the Property “IsValid”, which tells if the Captcha is valid. But as we did not find a way to access this property in WiseJ, we tried saving the Code of the captcha within the OnInit/OnLoad methods and match the code against the text value of a WiseJ Textbox. Onfortunately the code property always returned null, until the code got refreshed.

I hope this sample is of use to you.
Thank you very much for your assistance.

 

 

1 vote

Half a million rows is a lot of data to manage and display and will use lots of memory, but:

See attached video and sample.

https://drive.google.com/file/d/1vFRCca_ahUQVwGa-mB-e1x5g3ilny9Dq/view

The sample loads 500K rows x 10 columns and uses about 480MB and when cleared it goes down to zero (11MB, which is where it started at). Half a million row is a lot of data and they do use memory but with VirtualMode you can feed the data to each cell virtually, meaning that you can load/discard the data in chunks, or load it from disk or from the database. It saves all the memory needed for the data since it’s just returned to the client and just for the visible rows.

However, 480MB is still a lot of memory and we have an enhancement for 2.2 (virtual rows) that will bring it down in a case like this to about 4MB!

For the memory not going down, don’t use GC.SuppressFinalize(true) and let the GC do it’s work. If the objects are not referenced they will be released by .NET. If they are not released it means that your data source is referenced somewhere in the app.

If you want to send a small sample I can take a look.

  • Luca answered May 6, 2020 - 6:56 pm
0 votes
In reply to: get filled html

Hi Cristian,

You can get all of the HTML in the CKEditor by checking the “Text” property.

Something like

this.htmlPanel1.Html = this.ckEditor1.Text;

Takes all of the HTML from your editor and loads it into the panel.

 

If you’re trying to filter the HTML you’ll need to use JavaScript or some kind of RegEx expression.

 

If this isn’t what you’re after can you please attach a small sample or explain?

 

Best,

Levie

 

0 votes

“Apparently we can not access those properties outside of the OnLoad and OnInit Events”

You are correct. ASP.NET properties do not exist outside of the page load cycle, that’s the nature of ASP.NET.

Can  you attach a sample app?

  • Luca answered May 6, 2020 - 4:10 pm
0 votes

Hi Levie,

The code (similar with my own) is working and no error occur. The (strange) behavior is like following:

  1. When using normal HTTP, the pdf file is opened in another tab. I can view it, and I can push the “Save” button (pdf viewer in browser, near the print button). It propose me to save the pdf file with correct name (abc.pdf in our sample).
  2. when using HTTPS, the pdf file is opened in another tab. I can view it correctly, and I can push the “Save” button, but instead of saving the pdf file I got “download.html” and if I say “yes” it save nothing.

I attach the save dialog in both situations.

0 votes

Hi Markus,

this issue is fixed in our latest Wisej development build (2.1.64).

Thanks again for your feedback and help in putting us on the right track.

Best regards
Frank

0 votes

Hi Adrian,

What do you mean when you say it doesn’t work? What error does it throw?

Try this:

Application.DownloadAndOpen("_blank", Application.MapPath("abc.pdf"));

 

Your code was working for me like this:

string fn = Application.MapPath("abc.pdf");

MemoryStream ms = new MemoryStream();
 using (FileStream file = new FileStream(fn, FileMode.Open, FileAccess.Read)) file.CopyTo(ms);
 ms.Seek(0, SeekOrigin.Begin);
 Application.DownloadAndOpen("_blank", ms, fn);

Let me know how to help!
Best,

Levie

0 votes

Hi Levie,

On Premises.

Oh i see, if i want to have it in a folder instead of the root, i have to add the application setting in IIS.
It’s an IIS thing, sorry for the noise.

So great!
I’m so happy that i’ve found wisej, after VisualWebGui was gone.

The best for you guys.

 

0 votes
0 votes

Hi Huỳnh,

Application.StartupPath simply returns the root file path of the app on the server (the client can’t load that file URL)., Something like:

C:\Users\MyUserName\MyProjects\WebBrowser\WebBrowser\ReadMe_001.htm

You need to load the url from the client’s perspective (include domain and relative path from the root)., ie.:

http://localhost/ReadMe_001.htm

Try Application.Url and Application.StartupUrl instead.

Let me know if you have any questions!

Best,

Levie

0 votes

Looks like you have an unwanted script (memoize.js) which is not part of our distribution. Maybe a browser extension, or something else. Or you may have included it in your wisej project somewhere. A quick search shows that it’s a naive (and highly misguided) way to speed up javascript by caching function names and their return value.

  • Luca answered May 4, 2020 - 5:36 pm
0 votes

I understand that it is not a wisej problem, but I was hoping that someone might have stumbled upon my own problem and had the solution …

the browser freezes, but it does not do it with other online sites (eg ebay or amazon)

0 votes

Hi Davide,

It sounds like it might be a browser configuration issue, especially if it happens with a blank project. Try clearing the browser’s cache, disabling extensions, and anything else you can to free up resources. Check your antivirus for slow-downs as well.

Let me know!

Best,

Levie

0 votes

Hi Huỳnh,

This is because your <> tags are getting treated like HTML. If you put a space after the opening and closing symbol like: < CusCode: KH-001 > it will work fine. This is by design to allow the developer to choose how to format the MessageBox contents.

You could also use “<br>” in the MessageBox and it would break to a new line!

Alternatively, if you want to disable the HTML in the MessageBox, set it to false when you show the MessageBox:

MessageBox.Show(“MyMessage”, allowHtml:=False)

This should make your current code work fine.

Let me know if you have any questions about it!

Best,

Levie

0 votes

Hi Markus,

You can use something like this with Wisej, copying the NumberFormatInfo instance instead of the entire culture:

System.Globalization.NumberFormatInfo ci = (System.Globalization.NumberFormatInfo)Application.CurrentCulture.NumberFormat.Clone();
ci.CurrencySymbol = “€“;

foreach (Wisej.Web.DataGridViewColumn gc in dataGridView1.Columns)
{
if (gc.HasDefaultCellStyle)
{
gc.DefaultCellStyle.FormatProvider = ci;
}
}

dataGridView1.DataSource = tb;

 

Let me know if this works for you!

Best,

Levie

0 votes

Hi Frank,

it was more difficult to reproduce then we thought 😉

It only happens when you tab out of a NumericUpDown into another NumericUpDown, both with “SelectOnEnter = true”. And it only happened on IE so far.

See attached sample.

Thanks

Markus

0 votes

I think I found the problem. Looks like the Csla framework is firing a MetaDataChanged event every time a field of a child record changes because it’s operating in Xaml mode (WPF). Apparently it needs to reload the list when a single item changes. Wisej uses the WinForms data binding model, if you add this line to Main() it seems to work properly:

Csla.ApplicationContext.PropertyChangedMode = Csla.ApplicationContext.PropertyChangedModes.Windows;

 

  • Luca answered May 4, 2020 - 12:19 am
  • last active May 4, 2020 - 12:20 am
0 votes

Hi Benjamin,

Can you please try with the latest build and verify the issue is fixed? https://www.wisej.com/builds

Best,

Levie

Showing 4901 - 4920 of 11k results