In this article you will learn how to select more than one row in a grid using LightSwitch 2012.
Getting Started
Use the following to create the project:
- Open Visual Studio 2012.
- Goto "File" => "New" => "Project..."
- Select "LightSwitch" in installed templates.
- Select "LightSwitch Application (Visual C#)".
- Enter the Name and choose the location.
- Click "OK".
First of all attach a data source, or you can create a new table; this is my table data:

Image 1.
Now add a new screen and add EditableGrid and select a data source.

Image 2.
Now hit F5 to run the application and select a grid row.

Image 3.
You will see you are unable to select multiple rows, so let's work on how to select multiple rows.
First of all spread the write code events and click IntializeDataWorkspace event.

Image 4.
Now write the code.
Add the namespace first:
using System.Windows.Controls;
private const string _CONTROL = "grid";
private DataGrid _ItemsList = null;
private int _SelectedRowsCount = 0;


Comments
Join the conversation! Your thoughts help the community grow.