Migrating from EXT.Net 4.7 to 7.2 Classic (for Core) - Syntax question

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Migrating from EXT.Net 4.7 to 7.2 Classic (for Core) - Syntax question

    Hi, my team is migrating from EXT.Net 4.7 (.Net Framework) into EXT.NET 7.2 Classic for Core. We have been using the MVC/Razor syntax for views for years and hoped we would find the same syntax available here. Is that something that still exists? Knowing that 7.2 is still very new, I haven't found any similar questions.

    Thanks so much!

    Example of what I'm looking for

    @{
        ViewBag.Title = "Default Button - Ext.NET MVC Examples";
        Layout = "~/Views/Shared/_BaseLayout.cshtml";
        var X = Html.X();
    }
    
    @section example
    {
        @(X.Container()
            .Layout(LayoutType.VBox)
            .Height(650)
            .Items(
                X.FormPanel()
                    .Title("Last Button by default")
                    .BodyPadding(5)
                    .Width(350)
                    .Items(
                        X.TextField()
                            .FieldLabel("Item 1"),
                        X.TextField()
                            .FieldLabel("Item 2")
                    )
                    .Buttons(
                        X.Button().
                            Text("Button 1"),
                        X.Button()
                            .Text("Button 2")
                            .OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');")
                    ),
    
                X.FormPanel()
                    .Title("Button by Index")
                    .DefaultButton("1")
                    .BodyPadding(5)
                    .Width(350)
                    .Items(
                        X.TextField()
                            .FieldLabel("Item 1"),
                        X.TextField()
                            .FieldLabel("Item 2")
                    )
                    .Buttons(
                        X.Button().
                            Text("Button 1"),
                        X.Button()
                            .Text("Button 2")
                            .OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
                        X.Button().
                            Text("Button 3"),
                        X.Button().
                            Text("Button 4")
                    ),
    
                X.FormPanel()
                    .Title("Button by ID")
                    .DefaultButton("Button2")
                    .BodyPadding(5)
                    .Width(350)
                    .Items(
                        X.TextField()
                            .FieldLabel("Item 1"),
                        X.TextField()
                            .FieldLabel("Item 2")
                    )
                    .Buttons(
                        X.Button().
                            Text("Button 1"),
                        X.Button()
                            .Text("Button 2")
                            .ID("Button2")
                            .OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
                        X.Button().
                            Text("Button 3"),
                        X.Button().
                            Text("Button 4")
                    ),
    
                X.FormPanel()
                    .Title("Button by Selector")
                    .DefaultButton("button[text=Button 2]")
                    .BodyPadding(5)
                    .Width(350)
                    .Items(
                        X.TextField()
                            .FieldLabel("Item 1"),
                        X.TextField()
                            .FieldLabel("Item 2")
                    )
                    .Buttons(
                        X.Button().
                            Text("Button 1"),
                        X.Button()
                            .Text("Button 2")
                            .OnClientClick("Ext.Msg.alert('ENTER', 'ENTER is intercepted by Button2');"),
                        X.Button().
                            Text("Button 3"),
                        X.Button().
                            Text("Button 4")
                    )
            )
        )
    }
    Last edited by craigthames; Dec 03, 2020 at 4:51 PM.

Similar Threads

  1. Ext.Net.Classic Example not working
    By mtsig in forum 7.x Classic Premium Help
    Replies: 6
    Last Post: Oct 15, 2020, 5:00 PM
  2. Ext.NET 7.0 Classic for ASP.NET Core Now Available
    By geoffrey.mcgill in forum 7.x Classic Premium Help
    Replies: 0
    Last Post: Oct 08, 2020, 4:37 PM
  3. Ext.NET 7.0 Classic for ASP.NET Core Now Available
    By geoffrey.mcgill in forum Open Discussions
    Replies: 0
    Last Post: Oct 08, 2020, 4:36 PM
  4. Icons summary Ext.Net 7.0 Classic
    By lu7jm in forum 7.x Classic Help
    Replies: 1
    Last Post: Jun 20, 2020, 1:53 AM
  5. Replies: 4
    Last Post: Apr 10, 2020, 1:42 AM

Posting Permissions