All Answers

0 votes

tableLayoutPanel1.SetColumn(control, col); SetRow(), SetColumnSpan(), SetRowSpan().

https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.tablelayoutpanel.setcolumn?view=net-5.0

  • Luca answered Mar 9, 2021 - 12:54 pm
0 votes

Hi Luca.

Thank you so much for the prompt reply!

Yes, I had something similar to that in my custom DateTimePicker, but overriding the GetDisplayText is a lot better, since I was dealing with everything inside the ValueChanged. However, when the user leaves the field blank it is still setting the Value to 01/01/0001, so in order to be able to DataBind to this control I have created a ValueToBind property and setting it to 01/01/1800 whenever the ValueChange brings a value <= 01/01/1800 and then I bind to this new property in the forms. Hope it makes sense. 🙂

Cheers.

Ivan

 

 

0 votes

Hi again!

I integrated JS particles library visual effect (my first integration) so basically Wisej.Web.Widget integration is OK on my site.

But I have a problem with Blockly integration – .InitScript. Why what works in HTML page do not works for Wisej.Web.Widget . Is Wisej.Web.Widget like web page browser wiever or it is something differnt.

Here is my InitScript and it dont works, please help:

this.init = function() {

this.container.id = “widget1″;
<xml id=”toolbox” style=”display: none”>
<block type=”controls_if”></block>
<block type=”controls_repeat_ext”></block>
<block type=”logic_compare”></block>
<block type=”math_number”></block>
<block type=”math_arithmetic”></block>
<block type=”text”></block>
<block type=”text_print”></block>
</xml>

var workspace = Blockly.inject(‘widget1’,{toolbox: document.getElementById(‘toolbox’)});
}

 

 

  • mgmst answered Mar 9, 2021 - 7:14 am
  • last active Mar 9, 2021 - 7:16 am
0 votes

Now fixed by Luca

0 votes

Luca (ITG)
Thank you.

Not recommended
understood.

0 votes

If yes, try this:

 

 public class MyDateTimePicker : DateTimePicker
 {
    private static readonly DateTime NULL_DATE = new DateTime(1800, 1, 1);

    protected override string GetDisplayText(DateTime? value)
    {
      if (value == NULL_DATE)
        return "";

      return base.GetDisplayText(value);
   }
 }

You can display anything you want for any value and parse anything you need if you also override

protected override bool ParseEditText(string text, out DateTime value)
  • Luca answered Mar 8, 2021 - 11:51 pm
0 votes

IIUC the database has no nulls and 1800-1-1 is considered by the app to be null so when the user leaves the field blank you want to write 1800-1-1 instead of null and when 1800-1-1 coming from the database you want to display an empty datetimepicker?

  • Luca answered Mar 8, 2021 - 11:47 pm
0 votes
In reply to: Super cool Login form

This is one of the coolest login in the world. 🙂

  • keep it centered: use form/dialog, set the border to none, set KeepCentered = true. If you use a panel, the Anchor to none. KeepCentered is better since it’s done on the client.
  • transparent: simply set the transparency on the background color.
  • Luca answered Mar 8, 2021 - 9:10 pm
0 votes

It is technically possible but not advisable since Wisej is at the application level while angular and react are just templating frameworks that only work on the client side. Wisej controls are server side .NET controls wired bi-directionally with their javascript widgets counterpart, with session management, theming, etc. etc.

Angular and react and the rest mix javascript into html (Angular) or html into javascript (React), apply a model to the template and render html on the client. I don’t think they mix well with each other either (it’s possible too, but I don’t see the point). However, since they don’t include real controls, the best widget libraries to use for angular and react are probably Syncfusion or DevExtreme (the JavaScript one since Angular and React cannot use the DevExpress ASP.NET controls), there are also many javascript free libraries you can use.

If you want to include a Wisej button in a <div> you can do it using am inline host widget (http://qooxdoo.org/qxl.apiviewer/#qx.application.Inline). But it can get complicate to manage the updates and overcome the dom rewrites from the templating frameworks. Since without the Wisej communication and theming infrastructure at the end it’s just a <div> plus some css, it’s much easier to just use html + css.

 

  • Luca answered Mar 8, 2021 - 1:27 pm
0 votes

There was an error in the question.
It was a Web Widget, not a Web Api.
Because it wasn’t the answer I intended
Chew again and ask a question.
For example, Wisej’s own button control
Create and other frameworks
(React, Angular, Vue, etc.) html
Create a library that can be embedded in <div>
It is possible, but please let me know.

0 votes

Hi Dino,

The error gets thrown specifically because of the “#” character that’s present in your tables, because when you automatically bind the DataGridView, the dataset would try to prepend “col” to the column name and it’s an invalid character for an identifier.

The workaround would be to ultimately map the tables manually to a new binding source, or to just rename the table columns.
I guess setting everything manually won’t be an issue since the queries work fine.

Here’s a small example of what you can potentially do :

SqlConnection cn = new SqlConnection("\\your_connection_string");
SqlDataAdapter cmd = new SqlDataAdapter();
DataTable dt = new DataTable("your_test_table");
cmd.SelectCommand = new SqlCommand();
cmd.SelectCommand.Connection = cn;
cmd.SelectCommand.CommandText = "your_select_query";
cmd.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();

Best regards,
Alaa
0 votes

You can include it in an iframe.

Usually a WebApis cannot be controls since it’s a URL call.

  • Luca answered Mar 5, 2021 - 7:11 pm
0 votes

Use Wisej.Web.Widget to load the libraries and put the same code you would put in a plain javascript app in the InitScript property of the Wisej.Web.Widget. There are several examples here: https://github.com/iceteagroup/wisej-examples.

If you upload a functional javascript application that uses the widget we can include it in a wisej sample.

  • Luca answered Mar 5, 2021 - 7:08 pm
0 votes

Will do but why the hell i don`t get the same error in Visual Studio ?

When i start the app there everything is working great. Same Browser etc………

If one of them would return null wouldn`t i get the same error in VS ?

 

0 votes

Will do but why the hell i don`t get the same error in Visual Studio ?

When i start the app there everything is working great. Same Browser etc………

If one of them would return null wouldn`t i get the same error in VS ?

 

0 votes

So now you know that  the NullReference is in lblDragSource_MouseDown, which you already knew. Looking at your code, these are the only possible places, since NullReferenceException is not caused by Wisej:

 

Label clickedLabel = sender as Label;
movingRoom = (SplitterPanel)clickedLabel.Parent; <-- clickedLabel can be null if the cast above is wrong. Change to a cast or check what the sender is.

If clickedLabel is not null, then:

SplitterPanel splitterPanel = clickedLabel.Parent as SplitterPanel;
GroupBox currentRoom = splitterPanel.Parent.Parent as GroupBox; <-- if the parent of clickedLabel is not a SplitterPanel you get null. Change to a cast or check.

DatabaseRoom currentDbRoom = rooms.Where(r => r.name == currentRoom.Text).FirstOrDefault(); <-- Same as above.



Basically looks like one of the “as” conditional casts fails returning null. Change it to a cast and it will generate an InvalidCastException.

 

  • Luca answered Mar 5, 2021 - 2:12 pm
0 votes

Ok this time with Debug Mode enalbeld. Please see attachment

  • Tom Oeben answered Mar 5, 2021 - 1:48 pm
  • last active Mar 5, 2021 - 1:50 pm
0 votes

Enable debug mode in web.config to show the stack trace in the error dialog.

  • Luca answered Mar 5, 2021 - 12:34 pm
0 votes

Hi Luca

The framework DLL you sent me has fixed the issue

Thanks for your help

0 votes
In reply to: RibbonBarItemButton

Hi Angelo,

Tag property is present for control but RibbonBarItemButton  is a component. And Tag is for store user data like winform do but we have UserData proprerty for store data.

You can use like that:

this.ribbonBarItemButton1.UserData.whatever = 12;
this.ribbonBarItemButton1.UserData.SomeString = “Hello”;
this.ribbonBarItemButton1.UserData[“weird-name”] = DateTime.Now;

etc..

Tag is not available for component Editor Designer

PS. you can use this.ribbonBarItemButton1.HasUserData to detect if there have any user data stored

Best,

Kevin(ITG)

  • Kevin answered Mar 4, 2021 - 6:11 pm
  • last active Mar 4, 2021 - 6:11 pm
Showing 3981 - 4000 of 11k results