View Full Version : [CLOSED] How to add a commandcolumn when using GridPanelFor

Dec 18, 2019, 10:16 AM

using EXT.NET 5.0 mvc. GridPanelFor is really useful and a quick way to add a grid.

How do we add a CommandColumn to the grid when using GridPanelFor? How do we configure the commandcolumn and perform a directevent on click?


Dec 18, 2019, 8:03 PM
Hello Ian!

I am afraid you can't specify command column's inner components off model definitions.

You'd have to get in the view and define the column's components in the Razor code, similarly to how you'd do with editable columns.

Here's an old post from Vladimir suggesting a path to follow for the editor approach: Post #4 in GridPanelFor Editor field related to model (https://forums.ext.net/showthread.php?22456-2-1-GridPanelFor-Editor-field-related-to-model&p=97362&viewfull=1#post97362).

You should do the equivalent to the command column.

If that's not feasible for you, then going the declarative way should be the best alternative to follow, like in this example: GridPanel > Commands > Row Commands (https://mvc5.ext.net/#/GridPanel_Commands/Row_Command/)

Hope this helps!

Dec 18, 2019, 8:23 PM
Hi Fabricio,

can you please add the link to Vladimir's post.


Dec 18, 2019, 9:01 PM
Ops, my bad! Lucky I was with the tab still open here to build up the link. Fixed on the original post.

By the way, you can find existing answers for many questions with google if you search like site:forums.ext.net gridPanelFor.

Jan 24, 2020, 5:59 PM
Hello again, Ian!

It's been a while since we last replied you and still no news; did our answer here help at all, or do you need assistance with the issue? Unfortunately we couldn't work yet in a way to improve how command columns' inner components can be drawn to views, but we are eager to help if you are trying the approach we suggested in our first response in this thread.

We may mark this thread as closed if we receive no feedback from you in 7+ days, counting from this post; but even after that you would still be able to post here whenever you feel fit.