@boikom
@boikom
Forum Replies Created
-
AuthorPosts
-
admin
KeymasterHi,
There are several things wrong in the provided code:
objRow.cells[0].value=arrData[0]; within the addRow callback function.
objGrid.dataSource.dataSource=_data; – dataSource.dataSource is incorrect way to update a data adapter.For adding & updating rows we have an online example: https://www.htmlelements.com/demos/grid/dynamic-rows/.
To add a row to the first position, simply modify it to use splice instead of push:
rows.splice(0,0,createRow());
or addRow method like that:
document.querySelector('smart-grid').addRow(createRow(), false);
. The second parameter instructs the datagrid to add the new row to the top.Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi Dark Beccio,
To select multiple values at once, the selectedValues or selectedIndexes properties should be used.
Example:
<smart-combo-box selected-values=["1","2"] selection-mode="checkBox"> <smart-list-item value="1">Affogato</smart-list-item> <smart-list-item value="2">Americano</smart-list-item> <smart-list-item value="3">Bicerin</smart-list-item> <smart-list-item value="4">Breve</smart-list-item> <smart-list-item value="5">Cappuccino</smart-list-item> <smart-list-item value="6">Cafe Crema</smart-list-item> <smart-list-item value="7">Cafe Corretto</smart-list-item> <smart-list-item value="8">Cafe macchiato</smart-list-item> <smart-list-item value="9">Cafe mocha</smart-list-item> <smart-list-item value="10">Cortado</smart-list-item> <smart-list-item value="11">Cuban espresso</smart-list-item> <smart-list-item value="12">Espresso</smart-list-item> <smart-list-item value="13">Eiskaffee</smart-list-item> <smart-list-item value="14">Frappuccino</smart-list-item> <smart-list-item value="15">Galao</smart-list-item> <smart-list-item value="16">Greek frappe coffee</smart-list-item> <smart-list-item value="17">Iced Coffee</smart-list-item> <smart-list-item value="18">Instant Coffee</smart-list-item> <smart-list-item value="19">Latte</smart-list-item> <smart-list-item value="20">Liqueur coffee</smart-list-item> </smart-combo-box>
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi Oleg Ilin,
The fix for that item is scheduled for Q1 2022.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi,
Thanks for the feedback. Could you please elaborate on this? Which props are not described well compared to our other product. We are improving the docs and working on that every day.
Regards,
PeterSmart UI
Htmlelements.comadmin
KeymasterHi Joko,
If you set the value programmatically then you will probably know when in your code you set it. Each value change results in ‘change’ event trigger. We do not have API which tells whether the value is set by programmatic setting. That can be achieved in your code where you set the Slider’s value. I would suggest you to use a boolean variable to add such logic.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi,
By using const tree = document.querySelector(“smart-tree”) you can get the Tree’s HTML Element instance. Then you get all tree items or tree item groups, you can use tree.querySelectorAll(“smart-tree-item”); or tree.querySelectorAll(“smart-tree-items-group”); You can also query select by ID or CSS class if you set such to your tree items or groups. By having the HTML Elements stored in a variable, you can then use Smart.Tree’s API to add or remove items. I would like to suggest you to look at https://www.htmlelements.com/demos/tree/context-menu/. This example shows how to add or remove tree items dynamically depending on user selection through a context menu.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi Giovanni,
Could you please provide a full example which shows your use case? I would like to suggest you to look at the Form Events online example, too. You can use Form Properties and/or Events to get the Form’s value, if you use Smart.Form. For example: https://www.htmlelements.com/demos/form/events/. The example shows how to get the value of a form dynamically.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi Joko,
The sample code below shows how to set the columns height and rows height in our Datagrid component. Note that the minimum row height is 30px.
smart-grid { width: 100%; width: 100%; height: 600px; --smart-grid-column-header-height: 30px; --smart-grid-row-height: 30px; }
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi,
Unfortunately, with the provided information we are unable to replicate that behavior. We will further investigate with different versions of firefox and apache.
Regards,
Peteradmin
KeymasterHi,
We export the cell values i.e the data. We do not export templates as a template could be any html element or a combination of different types of content.
Regards
Peteradmin
KeymasterHi,
The demos should be run on a web server or localhost as es6 modules cannot run by just double clicking on index.htm. They work in all browsers except internet explorer
Regards
Peteradmin
KeymasterHi Christophe,
The last param – 5th is a callback function. If you name it “confirm”, then you can use confirm(true) to commit the changes or commit(false) to cancel the changes.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi,
onRowUpdate has more parameters. The new values object are the 4th param. In addition, the last param should be added, too as it is the confirm callback which should be called to finish the editing process and confirm it.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi,
This example shows how to set Form’s value: https://www.htmlelements.com/demos/form/template/. The ‘value’ property and setValue method expect a JSON object which matches the form’s structure. The patchValue method can be used for updating an individual component of a form. In the provided code, the ‘group’ control should have a dataField property set, too.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/admin
KeymasterHi Joko,
The router does not still support this functionality. We will consider implementing it.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts