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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Dec 31, 2013, 4:37 AM
Jaima JosephPosted Dec 31, 2013, 1:21 AM
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 BantheswaranPosted Dec 30, 2013, 12:39 AM
What is the error message? where?
Can you post the code?