Answered by:
How fill values in parameters of questions?

Question
-
Title says all.
Case:
When Country Combobox changes selected item, to put Country ID in parameter of state combo. (to show only state of this country)
TKS.
- Edited by EdMul Friday, September 17, 2010 8:30 PM
Thursday, September 16, 2010 4:02 PM
Answers
-
The Solution:
- Create a query with a parameter.
- Create a screen of entity.
- Add query to screen by clicking Add Data Item and choosing query.
- Add property to screen by clicking Add Data Item and choosing local property
- Create an union between the property and the query.
- By code asing value on the property.
The problem.... Je!je!je!
When combobox change selection dont execute mycolection_selectionchanged() event.
Now, can anybody help with this please????
TKS!
Ed
- Marked as answer by EdMul Saturday, September 18, 2010 1:45 PM
Friday, September 17, 2010 8:43 PM
All replies
-
This might get you started:
If you believe that I've answered your question, please remember to mark it as answered.
MicroApplications, Inc. -- Information Systems Integration and Custom Software DevelopmentThursday, September 16, 2010 4:27 PM -
Yes, It´s my need. But, in LightSwitch.Thursday, September 16, 2010 4:42 PM
-
You're right. Sorry about that. I just assumed anything blogged about by Beth was LightSwitch related, expecially since I included LightSwitch in my search. Sorry, Beth as well.
I remember there being a thread about this here, but I cannot find it.
Update: take a look at this: not quite the use case you're after, but some techniques used may spark your creativity:
If you believe that I've answered your question, please remember to mark it as answered.
MicroApplications, Inc. -- Information Systems Integration and Custom Software DevelopmentThursday, September 16, 2010 5:13 PM -
I was view this link. Buy There, not say how put value to parameters.
I have created the parametrized queries, but can´t use them. :(
TKS
Edgard
PD: Sory, if my english is poor.
Thursday, September 16, 2010 9:19 PM -
This is what I tried:
* Create Address, State, Country entities
* Create Country (1) to State (many) relationship
* Create Country (1) to Address (many) relationship
* Create State (1) to Address (many) relationshiop
* Create a parameterized query on State called StateByCountry (Where Country.Id = CountryParam)
* Create a screen on Address entity using New Data Screen template
* Change Country and State from Modal Window Picker to ComboBox
* Add StateByCountry query to the screen via "Add Data Item..." button
* Select the CountryParam query parameter, in the property sheet, set "Parameter Binding" to AddressProperty.Country.Id
* Select State ComboBox, in the property sheet, set the "Choices" property to use the StateByCountry query
* F5
Basically doing the steps described in this article, but with a query parameter with binding.
http://blogs.msdn.com/b/lightswitch/archive/2010/09/08/how-do-i-filter-items-in-a-combobox-or-modal-window-picker-in-lightswitch-eric-erhardt.aspxLet me know if that works!
- Proposed as answer by bbakermai Friday, September 17, 2010 3:43 AM
Thursday, September 16, 2010 10:35 PM -
Thanks, Andy for another LightSwitch AHA moment!
If you believe that I've answered your question, please remember to mark it as answered.
MicroApplications, Inc. -- Information Systems Integration and Custom Software DevelopmentFriday, September 17, 2010 3:42 AM -
The Solution:
- Create a query with a parameter.
- Create a screen of entity.
- Add query to screen by clicking Add Data Item and choosing query.
- Add property to screen by clicking Add Data Item and choosing local property
- Create an union between the property and the query.
- By code asing value on the property.
The problem.... Je!je!je!
When combobox change selection dont execute mycolection_selectionchanged() event.
Now, can anybody help with this please????
TKS!
Ed
- Marked as answer by EdMul Saturday, September 18, 2010 1:45 PM
Friday, September 17, 2010 8:43 PM