?
Solved

Bind Checkboxes in DataGrid

Posted on 2011-03-01
3
Medium Priority
?
614 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 2000 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

Industry Leaders: 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.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

800 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