This is a mirror of official site: http://jasper-net.blogspot.com/

Select / Deselect all checkbox in DataGrid In Silverlight

| Thursday, October 21, 2010
Introduction

In the previous article we have seen how to add a Checkbox Column In DataGrid and how to achieve multi select delete operation. In this article we will see how we can select all rows of DataGrid and delete all selected.

Creating Silverlight Project

Fire up Visual Studio 2008 and create a new Silverlight 3 Project. Name it as SelectAllRowsDataGrid.

As you see we have customized the Columns in the DataGrid.
Now we will add a CheckBox Control in the Header of first column.
I tried many ways to put a CheckBox over there, but the effective way is to create a style and assign the style to HeaderStyle of that Column.
Here is the Style in XAML.

Read more: Dot Net Spark

Posted via email from .NET Info