Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
Editable Web Grid in MVC Razor View using Data Table
balaji palani
8y
833
1
Reply
Hi,
I need to bind editable web grid using data table in mvc razor view engine.i attached my code for reference, Please advise me how to modify the code.
View:
@model System.Data.DataTable
@using System.Data;
@{
List<dynamic> obj1 = new List<dynamic>();
obj1= ViewBag.Total;
var grid = new WebGrid(obj1);
}
@grid.GetHtml(tableStyle: "table", footerStyle: "foot")
Controller:
var ListData = (DataTable)Session["dtResult"]; //data table from session
dns = ConvertDtToList(ListData); //Converted into list
ViewBag.Total = dns; //pass data table to view
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How remove submit query in output?
how to pass the value from one webform to other