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

Unanle to use MVC6 grid inside my asp.net mvc core. Error "'IHtmlHelper' does not contain a definition for 'Grid' ...

$
0
0

I want to use MVC6 grid from this link https://mvc6-grid.azurewebsites.net/ so i install the

Install-Package NonFactors.Grid.Mvc6

but inside my view when i write the following :-

@model IEnumerable<LandingPageFinal3.Models.Doctor>
@(Html .Grid(Model) .Build(columns => { columns.Add(model => model.Name).Titled("Name"); columns.Add(model => model.Surname).Titled("Surname"); columns.Add(model => model.Age).Titled("Age"); columns.Add(model => model.Birthday).Titled("Birth date"); columns.Add(model => model.IsWorking).Titled("Employed"); //popup part columns.Add(model => $"<a data-modal='' data-id=\"{model.Id}\" href='PasswordRestUser/{model.Id}' id=\"ss\" asp- action=\"PR\" asp-route-id=\"@item.Id\" class=\"btn btn-info\" '> PR <span class='glyphicon glyphicon-user'> </span> </a>").Encoded(false); }) .Filterable() .Sortable() .Pageable() ) <div id='myModal' class='modal fade in'><div class="modal-dialog"><div class="modal-content"><div id='myModalContent'></div></div></div></div>

i got this error:-

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS1061	'IHtmlHelper<IEnumerable<Doctor>>' does not contain a definition for 'Grid' and no accessible extension method 'Grid' accepting a first argument of type 'IHtmlHelper<IEnumerable<Doctor>>' could be found (are you missing a using directive or an assembly reference?)	

any advice on this?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



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