Solved

Bind Checkboxes in DataGrid

Posted on 2011-03-01
3
613 Views
Last Modified: 2012-05-11
We are developing an application in WPF using MVVMLight. We are working on creating a form where multiple Roles can be assigned to a user. The roles are displayed in a grid having checkboxes so that user can select roles from Grid. During user editing, the existing roles should come preselected in the grid. We do not have any property which can be bound to checkboxes in Grid. We are not sure how to implement this. Please suggest some idea to implement the above functionality.
0
Comment
Question by:dineshwins
[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
3 Comments
 
LVL 12

Accepted Solution

by:
kumar754 earned 500 total points
ID: 35021947
there are multiple ways you can implement. if you have

you can extend your current class that you are binding to the Grid

public partial class <MyClass>
{
  // I am leving this empty here, but your shld use RaisePropertyChanged("IsAdmin"); in Set
  public bool IsAdmin { get; set; }
  public bool IsSuperUser { get; set; }
  public bool IsManager { get; set; }
  public bool IsUser { get; set; }

}

and then you can bind the class collection to the grid,

just before you save.. implement your save method to handle this properties.
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 35321647
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

707 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