Introduction
This article describes how to sort data in a Search Data Screen using LightSwitch 2011.
Step 1
Open Microsoft Visual Studio LightSwitch 2011 and click the "Ok" button.
Step 2
As you can see, there are two links, one to create a new database table and the second to attach to an external data source. Let's click on "Attach to external Data Source".
Step 3
Now click on "Database" and click "Next >".
Step 4
Select the server name and select the database, I am using the Rahul database in this article. Click OK.
Step 5
Select tables and click the "Finish" button.
Step 6
The table look like this.
Step 7
Add a new screen now. Right-click on "Screens" and click "Add Screen".
Step 8
Here you can select a search data screen template and click "Ok".
Step 9
Now let's run the application to see the output.
Step 10
The output of the appllication.
Step 11
We can perform the sorting operation in the Data screen. It is automatic. We only must click on the particular column for performing the sort. In the figure below, we are sorting based on the Salary field.