[CLOSED] [Razor] GridPanel ColumnModel Commands

  1. #1

    [CLOSED] [Razor] GridPanel ColumnModel Commands

    Hello,

    The following example doesn't work? The commands is expecting type "GridCommandBase".

    @(Html.X().GridPanel()
        ....
        .ColumnModel(models =>
        {
            models.Add(Html.X().CommandColumn()
                .Commands(commands =>
                {
                    commands.Add(new ImageCommand());
                } )
                .Width(100)
            );
        } )
    )
    Any suggestions?

    Cheers,
    Timothy
    Last edited by Daniil; May 11, 2012 at 4:34 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use ImageCommandColumn for ImageCommands instead of CommandColumn.

    By the way, a good point to use ImageCommands. It's much better in the performance (speed) aspect.

Similar Threads

  1. [CLOSED] GridPanel get Column in ColumnModel by ID
    By csharpdev in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 16, 2017, 6:15 PM
  2. [CLOSED] [Razor] Add GridView to GridPanel in razor
    By boris in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2012, 4:23 PM
  3. Selecting different columnmodel for gridpanel.
    By masudcseku in forum 1.x Help
    Replies: 5
    Last Post: May 11, 2011, 5:09 PM
  4. GridPanel with Image Commands, mulitple fires
    By rthiney in forum 1.x Help
    Replies: 1
    Last Post: Aug 11, 2009, 1:50 PM
  5. Add ColumnModel to GridPanel
    By aalkema in forum 1.x Help
    Replies: 0
    Last Post: Apr 27, 2009, 11:58 AM

Posting Permissions