Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

add static html links inside MVC6 webgrid will make them UN-clickable

$
0
0

I have the following asp.net core MVC6 web grid https://mvc6-grid.azurewebsites.net/ :-

@(Html
    .Grid(Model)
    .Build(columns =>
    {
        columns.Add(model => model.PhysicianFirstName).Titled("Name");
        columns.Add(model => model.PhysicianLastName).Titled("Surname");
        columns.Add(model => model.Phone).Titled("Phone");
        columns.Add(model => $" <a asp-action='Edit' asp-route-id=\"{model.Id}\">Edit</a> |<a asp-action='Details' asp-route-id=\"{model.Id}\">Details</a> |<a asp-action='Delete' asp-route-id=\"{model.Id}\">Delete</a>").Encoded(false);
    })
    .Using(GridFilterMode.Header)
    .Empty("No data found")
    .Filterable()
    .Sortable()
    .Pageable(pager =>
    {

        pager.RowsPerPage = 250;
    })

where inside the last column i specify to add 3 links (Edit,Details & Delete), where the links will be shown but they will be UN-clickable, so not sure why?

here is a screen shot of the results and the markup that got generated:-

alinks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>