kor TürkçeGitHub

OData V2 and V4

Connect the grid and lookup field to OData list bindings.

V4 list binding

Supply a collection path on rows. Request $count when your service supports it so the grid can show the known total. Sort and filter through the UI5 binding. For a directly submitted edit, UI5 sends PATCH. The grid restores the old cell value on rejection.

<k:DataGrid xmlns:k="kor.ui" rows="{path: '/Orders', parameters: {$count: true}}">
  <k:columns><k:Column label="Amount" path="Amount" type="number" editable="true"/></k:columns>
</k:DataGrid>

V2 list binding

Use a TwoWay model for editing and submit deferred changes with submitChanges. defaultCountMode: "Inline" is recommended when supported by the service. Decimal values that come from OData as strings remain strings after editing. V2 Edm.DateTime values used as dates are read and written as UTC days.

Search and hierarchy

LookupField uses a list binding for suggestions and another for the dialog. Text filters use OData contains or substringof, with case sensitivity determined by the server. JSON and OData V2 client-mode hierarchies work with TreeGrid. OData V4 hierarchies are unsupported.

Mock-server tests cover paging, counts, sorting, filtering, selection and editing in Chrome. A real SAP Gateway or RAP service is not tested.