.Net core command equivalent code

  1. #1

    .Net core command equivalent code

    I am not able to find an example equivalent to below code in Ext.net 7.
    <ext:Column ID="AddTestData" runat="server" Text="Enter Test Data" Flex="2" MinWidth="60"
                                Filterable="false">
                                <Commands>
                                    <ext:ImageCommand  CommandName="Show Test Data Entry" Icon="Add" ToolTip-Text="Show Test Data Entry" Disabled="true" />
                                </Commands>
                                <Listeners>
                                    <Command Fn="onCommand" />
                                </Listeners>
                                 <PrepareCommand Fn="toggleEnterTestData" />
                            </ext:Column>
  2. #2
    Hello, @Fahd!

    A corresponding code in Ext.NET 7 Razor Pages should look like:

    <ext-column id="AddTestData" text="Enter Test Data" flex="2" minWidth="60">
        <customConfig>
            <ext-add key="filterable" valueModel="false" />
            <ext-add key="isCellCommand" valueModel="true" />
            <ext-add key="commands" valueModel="testDataCommand" />
            <ext-add key="prepareCommand" value="toggleEnterTestData" mode="Raw" />
            <ext-add key="listeners">
                <ext-add key="command">
                    <ext-add key="fn" value="onCommand" mode="Raw" />
                </ext-add>
            </ext-add>
        </customConfig>
    </ext-column>
    Being testDataCommand defined in the model (or in a code @{ } block within the page), like this:

    var testDataCommand = new []
    {
        new
        {
            command = "Show Test Data Entry",
            iconCls = "x-md md-icon-add",
            tooltip = new
            {
                text = "Show test Data Entry"
            }
        }
    };
    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 0
    Last Post: Dec 05, 2017, 6:54 PM
  2. Show/Hide Image Command from Code behind
    By Nagaraj K Hebbar in forum 1.x Help
    Replies: 2
    Last Post: Nov 26, 2013, 7:22 PM
  3. Replies: 2
    Last Post: Mar 01, 2012, 5:49 PM
  4. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  5. Javascript equivalent to C# code.
    By lukasw in forum 1.x Help
    Replies: 3
    Last Post: Jul 29, 2010, 9:29 AM

Posting Permissions