This is a migrated thread and some comments may be shown as answers.

Derived Fields

1 Answer 93 Views
OQL (OQL specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sathish
Top achievements
Rank 1
Sathish asked on 03 Mar 2009, 06:38 PM
Hi,

How do I add a derived field to a class. For example, I have a ClientShippingAddress table, with id, name, address, city, state, country etc.

I'm going to allow the user to select one using radcombobox, so I need to display the text in this format ("Name, address, city, state, country")

How do I bind this way to radcombobox? Since radcombobox takes only the field name, I thought of deriving it from the OQL query, or manually add a property to the class to retrieve this. If add it to the class, then if I recreate the persistent classes then it may be destroyed.

Out of topic question: when is the next release scheduled? On your website it says beginning this month, do you have the exact date?

1 Answer, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 05 Mar 2009, 12:27 PM
Hi Sathish,
you can display multiple items in your rad combo box by retrieving them with LINQ and creating anonymous class. Here is an example of how you can implement this using the Order table from Northwind.
var result = from c in scope.Extent<OpenAccessData.Order>() select new { MyOrderDate = c.OrderDate, MyOrderID= c.OrderID }; 
                RadComboBox1.DataSource = result; 
                RadComboBox1.DataBind(); 
In the select new{} you can select all the fields that you need thus filtering those that are unneeded.
As for your second question our release is targeted at 10th of March.

Regards,
PetarP
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
OQL (OQL specific questions)
Asked by
Sathish
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Share this question
or