Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #102509
    VAISHNAVI P
    Participant

    Hi,

    I wanted to know how to get editable (readonly) for cardview fields, Please let me know.

    #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/

    #102524
    VAISHNAVI P
    Participant

    Dear Ivan,

    Thank you for your reply. I want the user to not change some fields like id and date which are system generated .  I want only some fields to be disabled or not 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/

    #113715
    Gabe Mallow
    Participant

    I used to think that after a long day, I’d always want to watch a film or play a game on the console, but lately I’ve been mixing things up a bit. One evening I was reading a discussion about online gaming and took a look at boho casino . I was interested in the range of poker and other games, since some days I feel like concentrating and other days I’d rather keep things simple. The selection seemed varied enough to hold my attention for a while, and I was happy with what I found. I still make a point of setting a time limit, because it’s easy to lose track of an evening when you’re comfortable and have nowhere to be.

    • This reply was modified 1 day, 21 hours ago by Gabe Mallow.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.