[CLOSED] ImageCommand missing in Razor syntax

  1. #1

    [CLOSED] ImageCommand missing in Razor syntax

    I'm trying to replicate something like the following example in Razor Syntax:
    <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                        <ext:Column ID="Column1" runat="server" Text="Company" DataIndex="company" Flex="1">
                            <Commands>
                                <ext:ImageCommand CommandName="Edit" Icon="NoteEdit" Text="Edit">
                                    <ToolTip Text="Edit" />
                                </ext:ImageCommand>
                            </Commands>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
    but I am unable to add a ImageCommand to the Commands collection - the closest thing I can see is commands.Add(Html.X().ImageCommandColumn()
    Last edited by Daniil; Apr 16, 2012 at 12:06 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Confirmed, ImageCommand is missed in Html.X(). We will fix. Thanks for the report.

    For now you can create ImageCommand via its constructor.

    Example
    .ColumnModel(cm =>
        cm.Add(Html.X().Column()
            .DataIndex("test")
            .Commands(commands =>
                commands.Add(new ImageCommand() 
                { 
                    Icon = Icon.Accept
                })
            )
        )
    )
  3. #3
    Is there any way I can add a tooltip to the imagecommand in this way? It gives me a message saying the tooltip property is read-only...
  4. #4
    This way:
    commands.Add(new ImageCommand()
    {
        Icon = Icon.Accept,
        ToolTip =
        {
            Text = "Hello!"
        }
    })
  5. #5
    Quote Originally Posted by Daniil View Post
    Confirmed, ImageCommand is missed in Html.X(). We will fix. Thanks for the report.
    It has been fixed in SVN. Thanks again for the report.

Similar Threads

  1. [CLOSED] Razor syntax inside Ext Controls
    By mcfromero in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 08, 2012, 7:29 PM
  2. [CLOSED] DropTarget Not working in razor syntax
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 30, 2012, 11:08 AM
  3. Replies: 6
    Last Post: Apr 09, 2012, 3:33 PM
  4. [CLOSED] Razor Syntax for ListConfig on a combobox
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 27, 2012, 2:31 PM
  5. [CLOSED] Razor syntax for adding a partial view to a Panel
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 23, 2012, 9:55 AM

Posting Permissions