@ivanpeevski

@ivanpeevski

Forum Replies Created

Viewing 2 posts - 136 through 137 (of 137 total)
  • Author
    Posts
  • in reply to: Editable #102531
    ivanpeevski
    Participant

    Hi vaishnavip,

    Thank you for the clarification. If you do not want to allow users to see or edit a field, you can simply not pass it in the columns property. The data will still be available inside the dataSource property.
    For example, please have a look at this demo. Here we pass an id property to the dataSource, but it is not displayed inside the cards. We can still get the id value using the dataSource property.

    However, if you need to show the card field, but you don’t want the users to edit it, then please see the DisableDataField() function in this demo.
    In the example above, the code disables all dataFields passed in the disabledFields Array, but the data is still displayed to the users.

    Please, let me know if any of these solutions will work for you!

    Best Regards,
    Ivan Peevski
    Smart UI Team
    https://www.htmlelements.com/

    in reply to: Editable #102515
    ivanpeevski
    Participant

    Hi vaishnavip,

    You can enable editing of the cardview fields by setting the editable property of the component.
    If editable is set to false, then the fields will be readonly.

    You can use the following code, for example, to get the current value of the editable property:

    const cardview = document.querySelector(‘smart-card-view’);
    let editable = cardview.editable;

    Please have a look at our demo page to see an example of editable cards.
    You can also read more about the editable property in our documentation:

    https://www.htmlelements.com/docs/cardview-api/#toc-editable_boolean

    I hope this will be of help!
    If you have any other questions, please do not hesitate to contact us again.
    Best Regards,
    Ivan Peevski
    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 136 through 137 (of 137 total)