Hi, I have a DataGrid InLine edit, and it works correctly.
When I click on the Edit button for a Row, it executes this code:
this.grid0.editRow(${data});
and it puts my row in Edit mode.
All good, now I want to have a button, that executes the same function, editRow(), but I Can pass to it a specific Row to put in Edit mode.
Is this possible? I tried passing to this function the exact copy of the ${data} object of one of my rows, but when I click this button, nothing will happen.
So how can I invoke this.grid0.editRow(${data}); for a Specific row, without clicking the Edit button on that row?
The editRow function expects the data item to be contained in the Data property of the DataGrid. This is why using a copy won't work. Usually the DataGrid is data-bound to a page property (e.g. getProductsResult). To edit say the second item you should use this.grid0.editRow(${getProductsResult[1]})
ok thank you for the answer! Is there a way to use editRow() and instead of passing the Array position of the record I want to edit, to pass somehow the PK of that row?
You don't need to pass array position. You need to pass the item of the array at the specified position. You can find it via some code (including by PK):
I was referring more on what's created by the template - you cannot use it for plain REST since it's not following known schema unlike OData for example.
No, since the operation names, parameters, etc. in REST services can vary while in OData you/we know what's the name of the operation to get collection, single object, to update/delete and add entity. OData is standardized REST service with known schema.
There are no restrictions in the UI - you just cannot use the template since we don't know the schema. You can create however quickly what you want using the designer. Again, check the template created for SQL/OData data source to know what you need to create to edit, update, delete and add with your REST service.
Sorry, that's what i meant by restrictions: that most things need to be designed (repeatedly in case of common components, right?) instead of being able to save/reuse them as templates. And also features like sorting/filtering of lookup data.
Yes, there is no support for sorting and filtering in plain REST services. This limitation again is not related to Radzen but comes directly from the service.
We have plans to add ability to mark REST operations during data source definition - what to be used for get, for getBy for update and for add. In this way Radzen CRUD templates will work for REST data sources as well.
We have plans to add ability to mark REST operations during data source definition - what to be used for get, for getBy for update and for add. In this way Radzen CRUD templates will work for REST data sources as well.
That sounds great! Thanks for the info.
Also, i guess what i meant was Authorization instead of Authentication.
User management and User/Roles based access within the app.