Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Adding WebGrid Checkbox Column checked by default

Posted on 2016-10-18
3
Medium Priority
?
112 Views
Last Modified: 2016-10-18
I have added a checkbox column to my grid and seems to work. But how can I have the all checkbox checked by default?
@DGrid.GetHtml(columns: DGrid.Columns(
        DGrid.Column(header: "Update?", format: @<text><input name="chkbox"
                                                                  type="checkbox" value="SLID" /></text>),
        DGrid.Column("Item"),
        DGrid.Column("Serial"),
        DGrid.Column("Asset")
            )

Open in new window


Using VS 2015 MVC
0
Comment
Question by:KDog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 2000 total points
ID: 41848884
Does this work?

@DGrid.GetHtml(columns: DGrid.Columns(
        DGrid.Column(header: "Update?", format: @<text><input name="chkbox"
                                                                  type="checkbox" value="SLID" checked /></text>),
        DGrid.Column("Item"),
        DGrid.Column("Serial"),
        DGrid.Column("Asset")
            )

Open in new window

0
 

Author Closing Comment

by:KDog
ID: 41848922
Yes that worked. Thank you. Can't believe it was that simple. I feel like I've wasted time.
0
 
LVL 20

Expert Comment

by:Daniel Van Der Werken
ID: 41848930
Glad to help!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question