All Answers

0 votes

Hi Luca,

Here you have a project to reproduce the sorting problem.

  1. load data (must put exportData.txt file in c:\temp or change the location)
  2. push search (will remains just rows with “email” on them.
  3. sort using column header (first column) and you’ll see very different lines 🙂

Thank you for helping,

Adrian

0 votes

You are not on winforms, the browser is on the client machine. When the KeyDown event is fired on the server it has already happened. It is impossible with any technology to control the user’s keyboard from the server. The only way would be a synchronous event (which is deprecated) making the browser unusable. Setting e.Handled = true can only be used by the server code.

If you want to change the keyboard behavior of the client browser you have to do it on a client event or by using a regexp filter:

Client Event

In the designer add a ClientEvent “keydown” and in the event code put:

if (isNaN(e.getKeyIdentifier()))
  e.preventDefault();

There are a million ways in JavaScript to check the typed character.

Or in code use

this.textBox1.AddClientEventListener(“keydown”, “if (isNaN(e.getKeyIdentifier())) e.preventDefault();”);

 

Filter

Set the Filter property to “[0-9]”. It’s a regular expression. You can test it with this https://regex101.com/

InputType

Cannot reproduce. I set it to Number and attached KeyPress, worked fine. Can you send a text case? Also note that InputType is a native feature of the browser and not something implemented in Wisej: https://www.w3schools.com/html/html_form_input_types.asp

  • Luca answered Oct 8, 2020 - 3:07 pm
0 votes

Cannot reproduce the hidden rows issue.

Tried this with 2.2.14. Sorting with the hidden rows preserves the correct hidden rows and when making them visible again they are in the correct sorted position.

 var bs = new List<Person>();
 this.dataGridView1.Columns.Clear();
 this.dataGridView1.AutoGenerateColumns = true;
 bs.AddRange(new Person[] {
 new Person{Name="A"},
 new Person{Name="B"},
 new Person{Name="C"},
 new Person{Name="D"},
 new Person{Name="E"},
 new Person{Name="F"},
 new Person{Name="G"},
 new Person{Name="H"},
 new Person{Name="I"},
 new Person{Name="J"},
 new Person{Name="K"},
 new Person{Name="L"},
 });
 this.dataGridView1.DataSource = bs;
 this.dataGridView1.Rows[1].Visible = false;
 this.dataGridView1.Rows[3].Visible = false;

 

  • Luca answered Oct 8, 2020 - 2:49 pm
0 votes

Responsive profile are configurable in the ClientProfiles.js file. Click Add -> New Item -> Wisej 2 and pick Client Profiles. It will add ClientProfiles.js to the project with the default entries. You can delete, add, change them.

The SessionTimeout set in Default.json is the timeout until the SessionTimeout event is fired (https://wisej.com/docs/2.2/html/Configuration.htm) which gives your app a chance to inform the user (built-in) or do anything else by handling the SessionTimeout event. By default the session is destroyed timeout * 2 when the tab is closed. If the user is starting at the browser the session will stay alive. Switching tabs in a browser doesn’t make the session invalid.

You can change the behavior however you need it by handling Application.SessionTimeout and/or Application.BrowserTabActivated and BrowserTabDeactivated events.

The DGV sorting problem does indeed looks like a regression since 2.2 implemented virtual rows.

  • Luca answered Oct 8, 2020 - 2:35 pm
0 votes

It’s called when the widget is created on the client the first time or on a page refresh and when InitScript changes. I tried on a Page and a Button using console.log(this, “init”); and also added debugger; to make sure but it’s always executed only once correctly. Can you attach a test case?

  • Luca answered Oct 8, 2020 - 2:25 pm
0 votes

I also had these errors.

In my case I removed the “WiseJ.Framework” dll from my project and re-add the dll from the local (!) (c => Program Files) folder.

Then it should work.

I got this effect when installing extensions from NuGet and the extensions load the WiseJ.Framework dll from NuGet.

 

0 votes

Forgot to add that you can also set the DataGridViewComboBox column in the designer and assign the data source in code. No need to remove and re-add a different column. And you you may use the attached mixin to make all combobox cell display a drop down image mimicking the combobox. See image attached.

Put this in Themes/App.mixin.theme

{
 "appearances": {
 "table-combobox-cell": {
 "inherit": "table-cell",
 "states": {
   "default": {
     "styles": {
       "backgroundImage": "combo-arrow",
       "backgroundSize": "20px",
       "backgroundPosition": [ "center", "right" ]
     }
   }
  }
 }
}
}
  • Luca answered Oct 7, 2020 - 6:09 pm
0 votes

Luca, it works, gracias!

0 votes

Thank you and sorry I forgot to post a sample. In any case your code works well after you set the DataPropertyName:

cc.DataPropertyName = “Country”

Without that it cannot bind to a data source field.

 

  • Luca answered Oct 7, 2020 - 5:56 pm
0 votes

The PdfViewer loads the pdf in the browser using either: 1) native viewer shown in your screen shot 2) mozilla pdf.js, 3) google documents pdf viewer, 4) custom viewer. If you have installed a pdf control that can handle signature fields it will work automatically.

  • Luca answered Oct 7, 2020 - 5:49 pm
0 votes

Hi Luca,

Here is an example from what I am trying to achieve….

Regards,

Wim

 

 

0 votes

Cannot reproduce with 2.2.14. Please attach a small test case.

  • Luca answered Oct 6, 2020 - 3:06 pm
0 votes

this bug still is not fixed until 2.2.14 (newest version)

0 votes
In reply to: PWA Print

you can’t bypass the print dialogue box without modify the policy of the local browser, also if it is pwa

0 votes

Here is the example.
For explanation:
(1) I use the framework “FluentValidation”.
(2) I have written a PersonValidator.
(3) I use the BindingSource.

The code is only an example and should be refactored in any case!

Every hint and suggestion for improvement is welcome.

0 votes

I have found an approach. This one is certainly not perfect, but it works at first.
I will translate it into english and then put it here. Maybe there will be suggestions for improvement from members of the forum.

0 votes

Modal dialogs are a bit trickier because they are reusable and not automatically disposed.

A non-modal form gets disposed when closed, so the animation extender can “inject” itself into the destroy() method on the client and run the animation before destroying the form. Forms can also be hidden instead of closed, and in that case you can animate the “disappear” event: the  animation extender “injects” itself into the hide() method and runs the animation before hiding.

A modal dialog is not disposed, so when closed it’s hidden since the code may show it again. In that case you have to attach the animation to the “disappear” event not “close”. But… if you use the using() pattern or dispose the dialog when closed it triggers both events, first the dialog is hidden (disappear event) and then destroyed (close event).

I don’t know if we can change the animation extender to do both without breaking animated panels. But if you add a third animation extender and animate both “disappear” and “close” it works well also for modal dialog whether they are disposed or not.

 

  • Luca answered Oct 3, 2020 - 5:14 pm
0 votes

Hi Frank.

Would it be possible to make it work for Dialog (.ShowDialog) forms too?
The same thing happens, it works for the “appear” event, but not for the “close”.

Cheers.

Ivan

0 votes

Hi Ivan,

#2433 is fixed in Wisej release 2.2.14.

Best regards
Frank

 

0 votes

Floating windows are managed inside a window manager which is either the root or a Desktop. The Desktop can be a main desktop, basically like a page, or a child of a page. When it’s the child of a page everything at the same level is outside and independent from the desktop. It’s done by design.

You can place the NavBar inside the Desktop and it will dock on top of the taskbar the use Application.Desktop = new MyDesktop(); You can place any control on the desktop. Can even move them around setting Movable = true.

You can also attach to Application.EnterThreadModal and LeaveThreadModal. They are fired every time the app enters a modal thread state (be it a dialog or a messagebox). In the handlers you can decide what to do with the controls that are not part of the child desktop. For multiple modal levels you can keep a counter.

HTH

 

 

  • Luca answered Oct 2, 2020 - 5:10 pm
  • last active Oct 2, 2020 - 5:26 pm
Showing 4441 - 4460 of 11k results