This article describes how to create a ComboBox filtered screen in LightSwitch using Visual Studio 2012.
The following is the procedure for creating a ComboBox search screen in LightSwitch 2012.
Open the Solution Explorer.
In the Solution Explorer, right-click on the data source and choose "Add Table".
The table appears. In this way we create two tables (Customer and Item).
The Item Table is shown below.
Right-click on the Customer Table and select "Add Query".
The Query Designer appears.
In the Query Designer, click on the "Add Parameter" button and add a parameter named "Id" of the "Integer" data type.
Now click on the "Add filter" button. Under the Filter condition, next to the where condition from the drop-down list, select "Id". From the next drop-down list select the "Equal" condition. From the next dropdown list select the "parameter" and from the last drop down list, select "Id".
Right-click on the Screens and choose "Add Screen".
Select the Editable Grid Screen from the Screen Template. Under Screen Information we provide the Screen Name and choose CustomerByItem in the Screen Data and then click OK.
The Screen Designer appears.
Select "Add Data Item" from the Menu bar of the Screen Designer.
The Add Data Item dialog box appear on the screen. Select the Local Property radio button. From the Type option, select the Item (Entity) and name the property "propitem".
Again click on the "Add Data Item". Select the Query radio button and choose "Items" and click "OK".
Drag "propitem" onto the screen designer above the Data Grid. The screen designer should look like this.
After dragging the "propitem" onto the screen designer, go to the property window of the "propitem" and set the choices to "Items".
Mapping the "Id" parameter of the "CustomersByItem" to the "propitem" value.
Now go to the "Id" property window and in the Parameter Binding TextBox, enter "propitem.Id".
Press F5 to run the application.