Link to home
Start Free TrialLog in
Avatar of KDog
KDog

asked on

Adding WebGrid Checkbox Column checked by default

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
ASKER CERTIFIED SOLUTION
Avatar of Daniel Van Der Werken
Daniel Van Der Werken
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KDog
KDog

ASKER

Yes that worked. Thank you. Can't believe it was that simple. I feel like I've wasted time.
Glad to help!