Announcement

Collapse
No announcement yet.

Syncfusion Example ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Syncfusion Example ?

    Hi,

    Thank you for the sweetalert example, any chance of a quick demo for the Syncfusion (ej.web.all) retyped library ?

    Some thing simple like a button, which opens a dialog, returns a value ? That should be enough to then figure out Grids and other controls.

    Thanks
    Andrew

  • #2
    Hi CastleSoft ,

    Please find a simple demo project for Syncfusion by the link below:
    https://github.com/Retyped/Demos/tre...SyncfusionDemo

    Let us know if you have other questions.

    Comment


    • #3
      Hi,

      The Syncfusion wrapper is working well. I have another question regarding param's:

      object Dialog.Model.position {get; set; } - Displays the Dialog widget at a given X, Y position.

      In the example below. I can create the dialog, title, height, width etc.

      When it comes to the position ? How do I define it ?? class Retyped.dom.Position is available ? But the property is just an Object

      jQuery.ej("#dialog1").ejDialog(new Dialog.Model
      {
         title = "Info",
         height = 600,
         width = 800,
         position = ????.
         showOnInit = false
      });
      Still working out when to use what method for object/class/interface etc in the Retyped stuff.

      Thanks
      Last edited by geoffrey.mcgill; 2017-10-19 @ 02:30 AM.

      Comment


      • #4
        A quick test of JSON -> Object works ok (which I could wrap etc in an object/extension etc).

        Just thinking there must be an easier way ??

        var pos = JsonConvert.DeserializeObject<object>("{\"X\":0, \"Y\":100}");
        
        jQuery.ej("#dialog1").ejDialog(new Dialog.Model
        {
           title = "Info",
           height = 600,
           width = 800,
           position = pos,
            showOnInit = false
        });
        Last edited by geoffrey.mcgill; 2017-10-19 @ 02:29 AM.

        Comment


        • #5
          Does an anonymous object work?

          jQuery.ej("#dialog1").ejDialog(new Dialog.Model
          {
              title = "Info",
              height = 600,
              width = 800,
              position = new
              {
                  X = 0,
                  Y = 100
              },
              showOnInit = false
          });

          Comment


          • #6
            Hi CastleSoft,

            The solution with an anonymous object suggested by geoffrey.mcgill should work well here, unless you want to create your own implementation of Position class:
            [ObjectLiteral]
            public class Position
            {
               public double X { get; set; }
               public double Y { get; set; }
            }
            I've looked through Syncfusion API - all position properties are declared as the following:
            /** Displays the Dialog widget at the given X and Y position.
            */
            position?: any;
            Retyped converted any into C# object type, so it's not an issue of Retyped.

            I'm also curious why Syncfusion didn't provide a real type for setting coordinates, you may contact them and ask to fix that. We can regenerate Retyped.ej.web.all package, once they update their declaration files.

            Comment


            • #7
              Thanks Geoffrey and Andrey.

              Totally slipped my mind (anonymous object), and ahh yes ObjectLiteral.

              I'll contact Syncfusion and see if they can modify the position?: any as suggested.

              Thanks again..

              Greatly appreciated.

              Comment

              Working...
              X