How to have multiple Action Links in a single column

Apr 15, 2016 at 10:39 AM
Hi,
is it possible to have multiple actions links in a single row.

For example:
Action links like Add, Edit, Delete in column called Actions..

Regards,

Shrivardhan BS Rao
Apr 15, 2016 at 10:41 AM
shriphoenix wrote:
Hi,
is it possible to have multiple actions links in a single row.

For example:
Action links like Add, Edit, Delete in column called Actions..

Regards,

Shrivardhan BS Rao
for the time being i am using 1 action link like below:
I want to have 2 more actions like Delete and Add.
@Html.Grid(Model).Columns(columns =>
           {
               columns.Add(foo => foo.Title).Titled("Title").SetWidth(110).Sortable(true).Filterable(true);
               columns.Add(foo => foo.Description).Sortable(true);

               columns.Add(foo => foo.FooId)
                               .Titled("Edit")
                               .Sanitized(false)
                               .Encoded(false)
                            .RenderValueAs(foo => Html.ActionLink("Edit", "Edit", new { id = foo.FooId }));
           }).WithPaging(20)
Apr 29, 2016 at 2:43 PM
Hi!

I'm not sure if i get what you're trying to do, but hope it helps.

Collumn with 1 element:
columns.Add().Encoded(false).Sanitized(false).SetWidth(30)
    .RenderValueAs(o => 
                        @<b>
                            @Html.ActionLink("Edit", "Edit", "Home", new { id = o.Id}, new { @class = "btn btn-default" })
                        </b>);
Collumn with 2 elements:
columns.Add().Encoded(false).Sanitized(false).SetWidth(30)
    .RenderValueAs(o =>
        @<b>
            @Html.ActionLink("Edit", "Edit", "Home", new {id = o.Id}, new {@class = "btn btn-default"})
            @Html.ActionLink("Delete", "Delete", "Home", new { id = o.Id}, new { @class = "btn btn-default" })
        </b>);
if you have more than one, wrap all inside another html tag.
Mar 14 at 1:09 PM
Thanks a lot man!