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
AnilKumar Murarishetti
NA
54
8.5k
How to get dynamic data into grid with dropdown using mvc
Aug 14 2019 12:32 AM
Can anyone tell me ? how to get data from database and bind dropdown to grid.
WebGrid grid = new WebGrid(ViewBag.room);
<div class="box box-primary" style="width:99.5%">
<div Style="Overflow:Auto ;max-height:200px;">
@grid.GetHtml(tableStyle: "table table-bordered",
mode: WebGridPagerModes.All,
columns: grid.Columns(
grid.Column("Room Type", format:@item=>Html.DropDownList("TypeID", new SelectList(ViewBag.room, "TypeID", "TypeID"), new { @class = "form-control", id = "TypeID" }))
Reply
Answers (
1
)
How to updateDeleteinsert row after retrieving data in GV?
How to show all Lined-up in DataTable?