HI Infragistics team :
I am Javier Carreño, from Bogota, Colombia. I am developing a silverlight application with wcf services and I am using xamcalculationmanager and calculationfunctions... Inside CalculationFunction evaluate method I need to get data from database... but, I can get data from wcf in an asynchronous way... so, my question is : How to do that the evaluate-method's thread wait for asynchronous method ends and to retrieve data from database to can use this data on evaluation process ?? I tried so many ways without sucess... Can you help me ?
Thanks a lot,
Javier Carreño
Hello Javier,
After looking into this and doing some research, "CalculationFunction to include async WCF Support" has been determined to be a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
There are many benefits to submitting an product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Also you can contact with our consulting team here:
http://d3.infragistics.com/services/
if you want us to make a custom implementation for you for the Calculation Manager.
Stefan : Thanks a lot for your response...
However, My question was not answered... I know about how to call a wcfservice in a asynchronous way and I use this in all my silverlightr applications... but, I need now perform some calculations that include to read data from database INSIDE the calculation... My formula not looks as [a] + [b] where [a] and [b] are single named references... my formula loks as : GetDataSavedInDBUsingA([a]) + [b]... I built a CalculationFunction named GetDataSavedInDBUsingA and inside the Evaluate Method I need to throw the async request to DB and RECEIVE the completed event from my wcf service... BUT the completed event returns on a separate Thread, and the behavior that I am got is that the Evaluate method ends before the completed event returns from wcf service and my evaluate function just return a empty (or zero) result...
So, I need a full WCF support INSIDE the calculation function or I will have to rewrite all my formulas without use CalculationFunctions... and I hope that the Infragistics team experts can help me...
Best regards,
Javier
Thank you for your post. I have been looking into it and I can suggest you see this links:
http://stackoverflow.com/questions/4047132/how-can-i-wait-for-an-async-wcf-service-to-complete
and
http://msdn.microsoft.com/en-us/library/ms730059.aspx
http://msdn.microsoft.com/en-us/library/ms731177.aspx
where it is explained how to call a WCF asynchronous and add a “completed”/ “ended” event to indicate that the operation is completed. Once you did this you can call the CalcualtionFunction’s Evaluate method this event’s handler. Also, if you have further questions related with WCF I can suggest you ask them in the MSDN forums, since there you can get an answer from and MS expert.