TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Balaji Palani
NA
364
63.4k
Editable Web Grid in MVC Razor View using Data Table
May 25 2016 9:30 AM
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
Reply
Answers (
2
)
How remove submit query in output?
To add watcher of jira issue in c# with jira rest api