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

OData binding and Sorting

3 Answers 61 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
David Christensen
Top achievements
Rank 1
David Christensen asked on 23 Mar 2012, 10:42 PM
Is there a way using OData binding to sort the results or to limit the columns to only the data value and data text fields?

<telerik:RadComboBox ID="cmbApplication" runat="server" EnableLoadOnDemand="true">
    <WebServiceSettings Path="http://localhost:26022/DataService.svc/">
            <ODataSettings ResponseType="JSONP">
                    <Entities>
                            <telerik:ODataEntityType Name="Application" DataValueField="ApplicationID" DataTextField="AppName" />
                     </Entities>
                      <EntityContainer>
                              <telerik:ODataEntitySet EntityType="Application" Name="Application" />
                      </EntityContainer>
               </ODataSettings>
     </WebServiceSettings>
</telerik:RadComboBox>

3 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 27 Mar 2012, 02:28 PM
Hi,

Currently the build-in OData binding mechanism of the RadComboBox doesn't provide sorting functionality. As for your second query could you be more specific on what exactly do you mean by: limit the columns to only the data value and data text fields?

In general when you query an OData service a set of entities are being returned and you bind your control to specific fields of these entities.

All the best,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
David Christensen
Top achievements
Rank 1
answered on 27 Mar 2012, 06:03 PM
Let's say I have an entity with multiple properties. I want to bind my combobox to a set of those entities, but I'm only interested in the ID and Name properties. If I pull the entity with all it's properites, that is a lot more data than I need.

    http://services.odata.org/OData/OData.svc/Products?$format=json

    4.59KB    

I think it would be useful to specify which properties I wanted to be included in the response.

    http://services.odata.org/OData/OData.svc/Products?$format=json&$select=ID,Name

    1.33KB   
0
Dimitar Terziev
Telerik team
answered on 30 Mar 2012, 10:39 AM
Hi,

You are right that it's better from performance point of view to query only particular fields and I shall forward this request to our development team.

All the best,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
David Christensen
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
David Christensen
Top achievements
Rank 1
Share this question
or