Hello,
I'm wondering if is it possible to use different model on CRUD operations?
My current situation:
I'm using grid to display vehicle statistic and I using statistics model, but performing CRUD operations I need to use different model, because I need to have different data about vehicle.
Right now all I able to achieve is use different Url's as you can see below:
<EjsGrid AllowPaging="true" AllowSorting="true" AllowSelection="true" TValue="VehicleListModel" Toolbar="@(new List<string>() { "Search", "Add", "Edit", "Delete" })">
<EjsDataManager Url="https://localhost:25012/api/VehicleStats" CrudUrl="https://localhost:25012/api/Vehicle" CrossDomain="true" Adaptor="Adaptors.ODataV4Adaptor" Offline="true"></EjsDataManager>
<GridSearchSettings Fields="@(new string[] { "Number" })" Operator="@Operator.Contains" IgnoreCase="true"></GridSearchSettings>
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="@EditMode.Dialog" ShowDeleteConfirmDialog="true"></GridEditSettings>
<GridPageSettings PageCount="5"></GridPageSettings>
<GridColumns>
<GridColumn Field="@nameof(VehicleListModel.Id)" HeaderText="ID" IsPrimaryKey="true" TextAlign="@TextAlign.Left"></GridColumn>
<GridColumn Field="@nameof(VehicleListModel.Number)" HeaderText="Name" TextAlign="@TextAlign.Justify"></GridColumn>
<GridColumn Field="@nameof(VehicleListModel.FilesCount)" HeaderText="Files" TextAlign="@TextAlign.Center"></GridColumn>
<GridColumn Field="@nameof(VehicleListModel.ActiveScheduleCount)" HeaderText="Schedules" TextAlign="@TextAlign.Right"></GridColumn>
</GridColumns>
</EjsGrid>