This question is locked. New answers and comments are not allowed.
Hello,
I base my question on the following help entry to illustrate my problem:
http://www.telerik.com/help/silverlight/radgridview-columns-column-types-combobox-column.html
I'm using RIA WCF Services in case it helps...
You got the following grid:
Country, wth the combobox, FirstName, LastName, Origin.
What I want is display in the Origin column the result of a computed value.
For exemple, I would display "Fernando Alonso is from Spain" once I selected spain in the first column using the combobox.
This should work local, no server roundtrip...
I'm using Presentation Model. My Class on the server is for example:
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Web; |
| using System.ServiceModel.DomainServices.Server; |
| using System.ComponentModel.DataAnnotations; |
| namespace MyWeb |
| { |
| public class MyPresentationModel |
| { |
| [Key] |
| public int MyID { get; set; } |
| public string FirstName { get; set; } |
| public string LastName { get; set; } |
| } |
| } |
And on my local silverlight project I add the calculated field:
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.ServiceModel.DomainServices.Client; |
| namespace MyWeb |
| { |
| public partial class MyPresentationModel : Entity |
| { |
| public string Origin |
| { |
| get |
| { |
| string country = ???; //how to get the country from the country ID??? |
| string origin = String.Format("{0} {1} is from {2}.", this.FirstName, this.LastName, country); |
| return origin; |
| } |
| } |
| } |
| } |
Of course this is just a simple sample to illustrate my problem. My object is much more complicated.
But short said, this is my problem. How to access to those values... Hoppefully there is a simple solution as I've been struggling with this for a couple of days now...
Thank you for your help...
John.