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

OData $select & $expand

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
redshift20
Top achievements
Rank 1
redshift20 asked on 28 Nov 2017, 11:17 PM

I'm trying to create a master/detail page for an Accounts table in our database.  Our Accounts table has a few hundred fields in it, so the master grid should only show a short summary of a few pertinent fields for the user to identify which account they want to look at in detail.  I would also like to display fields from a few joined tables in the master grid as well.

We are using an Web API & OData source.  Instead of creating new endpoints to return the summary data I need, can we utilize the OData $select & $expand options with the Grid?

I might be missing something simple here, but if you have any suggestions or tutorials, I would appreciate it.

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 01 Dec 2017, 04:26 PM

Hi,

The closest option I can offer is that you bind the grid manually after invoking the desired request: http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/programmatic/defaultcs.aspx. Perhaps this will allow you to use tools like jQuery to get the necessary URLs, parse their data and provide it to RadGrid.

If this is not an option for you, I would suggest you consider exposing endpoints that fetch the concrete data/objects you need as it is done in one of the grids here: http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/declarative/defaultcs.aspx.

Regards,

Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
redshift20
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or