Hi Gerhard,
You’ll have to add an alias to System.Windows.Forms.
Simply go to References>Assemblies> Select System.Windows.Forms
In the properties window, you’ll see an Alias property, you’ll have to assign some alias to it, you can change it to “swf” for example.
I have attached a screenshot!
HTH,
Alaa
Hi Alaa
Great. Works as expected,
I set the minimumSize of the DropDownControl, not the UserComboBox.
Regards
Hello again,
As Alaa pointed out, it was the order of the handlers. The publishing process had added the uncommented aspNetCore handler at the end.
<add name=”aspNetCore” path=”*” verb=”*” modules=”AspNetCoreModuleV2″ resourceType=”Unspecified” />
whereas the commented-out aspNetCore handler from the original wisej-provided web.config was on top. After I mover the uncommented handler on top, it worked.
A side effect I’m seeing now is the following. I have three wisej applications under my default web site. The test6 one runs ok. However, the other two show a popup message (attached) with the message:
“Wisej failed to initialize for the following reason: Access to the path ‘C:\Windows\TEMP\Wisej 3\Applications\5.189.149.167-80\ Wisej.Platform.QXDesktop.json’ is denied..”
If I go to the temporary folder indicated by the message, I see several files, which I suppose are extracted automatically by the application. From the path to the folder, I suppose there is one folder created for each website-port combination. This one was probably created by the “test6” application, since in the security of the folder I see a “test6” user (the Application Pool I suppose). It sounds like the other two applications do not have permissions to do any work in that folder. I suppose that the right behaviour would be that each application created its own temporary folder.
Best,
Alex
Nope, does not work …
Hi Andrew,
To achieve your goal, you’ll have to move the script from the “PageSource” HTML file to the application’s Default.html file, or add it to the HtmlPanel’s InitScript property.
You can think of the HtmlPanel as a sandbox, even if you call the “this.App.Window1.HelloWorldFromHTMLSource()” method from firing the click event you’ll get “this.App” is not defined on the Console.
It’s a security measure, so you’ll have to define all the scripts from the beginning in Default.html.
You can check out these forum posts for more details:
https://wisej.com/support/question/firedataevent-from-innerhtml-of-htmlpanel
https://wisej.com/support/question/get-filled-html
https://wisej.com/support/question/topaz-wisej-integration
Or better yet, you can actually integrate your javascript library as a widget!
You can check out the documentation for more info through this link: Wisej.NET | Widget
I have also attached a modified version of your sample for you to try!
HTH,
Alaa
Hello Frank. Thank you for helping with this question. I have attached a short example project to show the problem I am having. When you run the project if you click on the ‘Call javascript in Initscript’ button it will call a javascript function which is defined in the InitScript attribute of the aspNetPanel and that javascript function will show an alert and then call a method in the Form class that will show a MessageBox. This all works.
But the next button ‘This is PageSource javascript – Call a C# method’ doesn’t work as I expect. It calls a javascript function which is defined in the page linked to the PageSource attribute of the aspNetPanel. The javascript function shows an alert (which we see) and then calls a method in the Form class – but the call doesn’t happen, the javascript fails silently. This is my problem – I would like to be able to call a C# method from javascript in the PageSource file. (I am using the PageSource file because in my real project I have to include a 3rd party javascript library which provides some functionality that returns a value and I need to get that value back to my C# code, the 3rd party javascript library works with a PageSource file so I thought that was the best way to go, if there is another way of doing this (not with an aspNetPanel, not in PageSource etc.) then I am open to any ideas).
Also in the example project there is an HTMLPanel which has some javascript in the html file that is in the HtmlSource attribute. I can’t get the button in that panel to call the javascript function – maybe this is a different problem ? If you click the ‘Call Method’ button it doesn’t seem to call the MakeCall javascript function (maybe this a problem with my limited knowledge of html/javascript).
Thanks for your help
Andrew
Hi Marcelo,
You’ll have to define the MinimumSize of the DropDownControl of your choice.
You can copy the Size value of the UserControl and assign it to the MinimumSize property.
HTH,
Alaa
Hi Pedro,
There’s a forum post about a similar question that you can find here: Wisej.NET | Forum
HTH,
Alaa
Hi Gerhard,
This issue is fixed now in our latest release.
Please download the latest VSIX installer from here:
Visual Studio 2022: Wisej.NET 3 VS 2022
Visual Studio 2019: Wisej.NET 3 VS 2019
This is required for the new templates to be installed.
Best,
Alaa
Hi Ruben,
It looks like WebSocket is disabled in your environment,
You can check its state in Wisej using “Application.IsWebSocket”, in a click event, if you’re doing it in the Main call you’ll always get False!
If it’s indeed disabled, then you’ll have to enable it and check the results!
HTH,
Alaa
Hi Ruben,
please provide us with a full compilable test case showing what you try to achieve.
Best regards
Frank
Hi Jesus,
I have attached the same project with the workaround.
The “unexpected tocken” error you got is due to the different quote marks when you copy/paste code from the forum.
HTH,
Alaa
Hi Edmundo,
I have removed the attachment due to privacy reasons. Please contact us at SalesATWisej.com and we will follow up on this.
Best regards
Frank
Hi Alex,
can you please send your web.config to supportATwisej.com and we´ll take a closer look?
Thanks in advance,
Frank
Hi Alaa!
Thanks for your quick reply.
I have inserted the code you have sent me in the program, but when I run it, it returns the following error: Invalid or unexpected token
Any more suggestions?
Regards
Hi Andrew,
is the function declared as public static? Please also note the last paragraph in our docs about RemoteMethods
https://docs.wisej.com/docs/concepts/javascript-object-model#remote-methods
If it still fails after using the mechanism described there, please wrap up a small repro case that we can use to inspect that issue.
Thanks in advance.
Best regards
Frank
Hi Jesus,
Thank you for reporting this issue.
As a workaround, you can add these few lines of code:
Private Sub DataRepeater1_ItemCloned(sender As Object, e As DataRepeaterItemEventArgs) Handles DataRepeater1.ItemCloned
e.DataRepeaterItem.Eval(“this.removeListener(‘click’, this._onItemClick);this.addListener(‘pointerdown’, this._onItemClick);”)
End Sub
We will notify you when a fix is issued in a future build!
HTH,
Alaa
Hi Gerhard,
to give you a quick update:
This is currently being worked on and in QA. If it´s okay, it will be included in the next release.
Best regards
Frank
Hi Vincent,
maybe that’s what you want:
Search here https://docs.wisej.com/docs/controls/lists/combobox for “Custom Item Filtering”.
Works for me.
Cheers, Gerhard
Thanks, Alaa. It works.
Alex