I'm trying to use ExpressionEditor (Silverlight) to build in my application a screen that allows users to define Where clauses to be used in the database.
For that, the list of Fields available in the ExpressionEditor control should have the list of database columns that can be used in the Where clause. Because this list can change (for example, based on the table being used), the ideal solution for me is to send those columns from the database. Is it possible to change, at runtime, the Fields that can be used in ExpressionEditor?
Thanks,
7 Answers, 1 is accepted
RadExpressionEditor has a property called Item. This Item is the context against which the expression is evaluated and the result is calculated. The list of available fields is automatically populated by based on the properties that the object assigned to Item has. So in order to change the list of available fields, you need to assign an object to RadExpressionEditor.Item and the list of fields will be based on the properties that this object has. You can't simply assign random fields names to the list of available fields.
Rossen Hristov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
If I need to bind an object to the Item property so RadExpressionEditor can understand the Fields that are available, can I bind it to an object that implements ICustomTypeProvider interface? That way, I can at runtime extend my object to have the additional properties I need.
Best regards,
Yes, we have recently added support for ICustomTypeProvider and we will scan its properties and show them in the fields list. You may need to rebind the Item after you change some properties so that the editor can refresh.
Rossen Hristov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
thk. a lot.
What kind of link do you need? Tiago asked a question and we answered him, so we are not really sure what kind of reference you are having in mind.
Regards,Rossen Hristov
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
i have a object list, and now i need to use that objects like fields. but.. i dont understand how bind the name of my object property to the name of field, may the was so.. useful work all in object type..or i need to create a template for the item .. please enlighten me thk.. :D
I am afraid that based on this description of the issue, I really could not understand anything from your question.
Could you please open a new support ticket, prepare a runnable sample project that clearly demonstrates the problem that you are facing and explain in great detail what exactly are you trying to achieve and what the exact problem is which is preventing you from achieving it.
This will be the fastest way to resolve your issue.
Thank you.
Rossen Hristov
Telerik
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.