@ivanpeevski
@ivanpeevski
Forum Replies Created
-
AuthorPosts
-
ivanpeevskiParticipant
Hi salasidis,
Can you please share a code example of this? Calling chart.update() after setting the new data should be enough to fully update the chart.
Here is an exampel: https://www.htmlelements.com/demos/chart/live-updates/
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Brian,
confirm is a JavaScript function, so it is not possible to invoke it directly from Blazor.
If you want to validate the changes, you can use ValidationRules as in the guide here – Grid Editing
If you need to keep track of the changes and update a remote database, you can have a look at the Grid Server Side CRUD guide
If you need to use onRowUpdate for other purposes, you should implement the function through JSInterop. The Dynamic Template guide covers the basics of how to achieve this.
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi,
I just tested the onInit property in the example here – codepen
And it is working correctly – It is fired when the editing begins for the first time.
If you require a callback, which is fired every time editing begins, you should use “onRender”
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Andy,
Please see the demo here – https://www.htmlelements.com/demos/table/server-side-crud/
It shows you how to capture the click of a button inside a row. It can be achieved with event.target.closest()
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Oliver,
With the current release, clicking on a checkbox will fire both events.
We have also resolved the issues related with the space bar in our internal build and it will be part of our next release.
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Oliver,
Please contact us at support@jqwidgets.com with your license key and we will provide with the instructions how to activate the license. It is not necessary to use the JS files from the website download.
Best Regards,
Ivan Peevski
Smart UI Team
http://www.htmlelements.comivanpeevskiParticipantHi Peter,
1) You can use the getCellValue property of the column to set a function, which will return only the value of the property you wish to display.
Here is a simple example – codepen
2) One way to implement is to set getCellValue to return a string containing both properties. So if account number is “15” and name is “John”, return “15, John”. Then set the ‘template’ of the column to display only one of the values. In this way, filtering will work for both values
Best Regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Peter,
Inside of the ‘change’ event, you can use either grid.getSelectedCells() or grid.getSelection() to get the current selection.
Here is an example: codepen
Best Regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/March 16, 2023 at 9:53 pm in reply to: Edit one cell and update another in a different row (live view with edition) #104533ivanpeevskiParticipantHi Jose,
You can prevent the grid from updating by first calling grid.beginUpdate(). For example, this will update the value(internally, but not visually) without interrupting the cell editing:
grid.beginUpdate();
grid.setCellValue(2, ‘quantity’, 15);
To update the value visually(but not internally), the only possible way is through DOM selection. For example:
grid.querySelector(‘smart-grid-row[data-id=”2″] smart-grid-cell[data-field=”quantity”] .smart-label’).textContent = “15”
However, the DOM selection will work only if the row is visible. Otherwise, the element will not exist.
Combining the two methods should achieve the desired effect.
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/- This reply was modified 1 year, 1 month ago by ivanpeevski.
ivanpeevskiParticipantHi Manikanda,
the ‘template’ property can also be set as an HTML string. For example, this will produce the exact same result as the one in the demo:
template: `<div tabindex=0 style=”padding: 0px; display:flex; justify-content: center;”><span
tabindex=1>😊</span><span tabindex=2>😐</span>
<span tabindex=3>😂</span>
</div>`Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Peter,
The full list of messages option is in the Grid API, under the ‘messages’ property – https://www.htmlelements.com/docs/grid-api/#toc-messages_any
Regarding translations – we don’t have any ready translations, since many of the ‘messages’ phrases can be translated in multiple ways depending on the context, instead providing the tools for localization gives more flexibility to developers.
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Dark Beccio,
If you’d like to disable the image zooming, you can set the following CSS rule – background-size:contain – to a carousel item.
For example, the following CSS disabled zooming only for the first item in the Carousel:
<div>
<div>smart-carousel div[item-id=”0″] .smart-carousel-item-container{</div>
<div> background-size: contain;</div>
<div>}</div>
</div>
<div></div>
<div>Here is a live demo – the first image is shown in its normal aspect ratio without zooming: stackblitz</div>
<div></div>
<div>Best Regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/</div>
ivanpeevskiParticipantHi Peter,
Can you please share the rest of the grid’s settings?
This issue doesn’t appear in the codepen my colleague sent you.
Best Regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Peter,
In the Grid API Typescript section, you can see the properties of the GridCell object.
The translation of the Grid is not automatic. Before you set the ‘locale’, you should set the translations inside the ‘messages’ property, like this:
messages: {“da”: {….}}
Then, set the locale to ‘da’ and the Grid will be translated.
We have a detailed guide on Localization here – Grid Localization
Best Regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/ivanpeevskiParticipantHi Andrea,
Thanks for reporting that!
Regarding your solution, the 200ms delay is needlessly big. You can also achieve the same effect with 0ms
Best regards,
Ivan PeevskiSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts