@svetoslav_borislavov
@svetoslav_borislavov
Forum Replies Created
-
AuthorPosts
-
svetoslav_borislavovParticipant
Hi,
Here is a demo in which a DataAdapter is used for the dataSource property: codepen demo
In the demo, you can see that after the window`s loading we are making a request via jQuery and setting the dataSource to a Data Adapter.Here is a link for the documentation of the DataAdapter: Data Adapter documentation.
The DataAdapter supports different data types including CSV and JSON.Unfortunately, we do not support raw binary float32 data.
If you need further assistance, do not hesitate to contact us!
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/- This reply was modified 2 years, 4 months ago by svetoslav_borislavov.
svetoslav_borislavovParticipantHi,
Thank you for the response! We will fix that. Meanwhile, if you have any additional questions, feel free to ask!
Best regards,
Svetoslav BorislavovSmart UI Team
- This reply was modified 2 years, 4 months ago by svetoslav_borislavov.
- This reply was modified 2 years, 4 months ago by svetoslav_borislavov.
svetoslav_borislavovParticipantHi Robert,
To do that you can use the fourth – callback argument off the exportData method. You can pass a callback which accepts the data as an argument and from there you can loop through the objects and change the property name then export the data manually.
Here is an example of exporting the data to a JSON file:
https://codepen.io/svetoslavb04/pen/QWmLoMqIf you need any further information, feel free to contact us.
Best regards,
Svetoslav BorislavovSmart UI Team
svetoslav_borislavovParticipantHi Joko,
You can pass a callback function to the onInit property as the toolbar HTML Element is passed as an argument. OnInit belongs to the header property of the grid. When you have the toolbar HTML Element you can select any button you want and customize it.
Here is a simple example:
header: {
visible: true,
onInit: (toolbar) => {
const sortButton = toolbar.querySelector(‘div[smart-id=”sortButton”]’);
sortButton.classList.add(‘custom-button’);
}
},Best regards,
Svetoslav Borislavov
Smart UI Team
- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
svetoslav_borislavovParticipantHi Joko,
Please remove the pageIndex property. Define only pageSize. It is 0 by default. I hope this helps!
Best Regards,
Svetoslav Borislavov
Smart HTMLElements Team
https://www.htmlelements.com/svetoslav_borislavovParticipantHi, Joko
Here is an example with the pagination feature of grid: https://codepen.io/svetoslavb04/pen/XWZQWMj
Best Regards,
Svetoslav BorislavovSmart HTMLElements Team
https://www.htmlelements.com/- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
svetoslav_borislavovParticipantHi Joko,
I have copied your code and there is no problem with the pagination. Please check your version and update if available
Best Regards,
Svetoslav BorislavovSmart HTMLElements Team
https://www.htmlelements.com/svetoslav_borislavovParticipantHi Joko,
I have tried your code and it worked for me. The button is displayed in the header without error with the following header setting:
header: {
visible: true,
buttons: [“search”],
template: “< button > Add</button >”
}Please check your version and update if available
Best Regards,
Svetoslav BorislavovSmart HTMLElements Team
https://www.htmlelements.com/- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
- This reply was modified 2 years, 5 months ago by svetoslav_borislavov.
-
AuthorPosts