In my previous article I described how to create a table and establish relationships among the tables (see http://www.c-sharpcorner.com/UploadFile/18ddf7/nested-autocomplete-box-in-lightswitch-2012-part-1/).There I added a new screen.Now here we are going to add an AutoCompleteBox.In my previous article I added the screen on the basis of the customer table.Step 1In the Menu bar click on the "Add Data Item" button.Step 2The "Add Data Item" dialog box will appear on screen. Select the query radio button and add the "Countries - Countries(All)" query and provide a name and click the "OK" button.As we click OK the Screen Designer will look as in the following: Step 3Once again we will click on the "Add Data Item" button and select the "Local Property" radio button and provide a name to the local property and click "OK". Under the Type select "Country(entity)".Step 4The Screen designer will appear as in the following:Drag the propertySelectedCountry node onto the screen designer above the City node from the left side and put it onto the screen to create an AutoCompleteBox.Step 5Go to the PropertySelectedCountry property window and set the "Choices" property to "Countries".Step 6Once again click on "Add Data Item" and select the "Query" radio button and add the CityByCountry query and provide a name and click the "OK" button.The screen designer will appear as in the following:Click on the City field in the Screen Designer and go to the property window and set the Choices property to "CityByCountry".
Step 7Now click on the "CountryId" parameter of the "CityByCountry" query. Go to the property window and enter "propertySelectedCounty.ID" for the "Parameter Binding". Step 8Press F5 to run the application.Here I have not provided any kind of data so it will be empty.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: