Hi , I have a doubt, can we add webgrid and other Html helpers or controls in an autogenerated(CRUD) Create.cshtml file?I have tried to add a webgrid in my create .cshtml file.But it is giving some error.
Thanks in advance.
Hi , I have a doubt, can we add webgrid and other Html helpers or controls in an autogenerated(CRUD) Create.cshtml file?I have tried to add a webgrid in my create .cshtml file.But it is giving some error.
Thanks in advance.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Dec 29, 2013, 7:39 PM EST
What is the error message? where?
Can you post the code?
Jaima Joseph93 reputationPosted Dec 30, 2013, 8:21 PM EST
Hi Jaganathan,
I am facing problem while I am trying to use webgrid in Create.cshtml file
When I add the following line of code it is showing error(red underline) when I point mouse over it,"The best overloaded method has some invalid arguments" message is showing
WebGrid grid = new WebGrid(Model, canPage: true, rowsPerPage: 10, selectionFieldName: "SelectedRow");
I think this is because of the first code line in this file:
@model Pharmacy.Models.QuoteMaster
If we put
@model IEnumerable QuoteMaster>
instead of the first code,then it is showing all the db table column related code as error
and the error message shows "does not contain a definition" for each and every table column fields
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Dec 30, 2013, 11:37 PM EST