JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Data Grid make some grid columns editable and others readonly

Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #103478
    edwardsmarkff
    Participant

    hello –

    editing: {
    enabled: true,
    mode: 'cell'
    },
    

    this appears to make the entire row editable.  is there any way to make specific cells read-only and others editable?  i tried (guessed) this to no avail:
    label: 'First Name', dataField: 'firstName', editable: false, readonly: true

    #103482

    Hi,

    To disable editing of a column you can set the allowEdit property to false!
    Look at this demo: https://codepen.io/svetoslavb04/pen/JjLaoeV
    The first three columns are disabled for editing

    If you need further help, do not hesitate to contact us!

     

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #104494
    Ronak Patel
    Participant

    Hello,

    I have used Smart.Grid for angular project.

    I want something that only a few cells or rows are editable based on a few conditions.

    How can i do that any property because i checked the doc but didn’t get anything like that.

    Thanks

    #104495

    Hi,

    The only option to do this is to use the beginEdit event.
    In the handler, you have access to the currently edited row or cell.
    Having an access to it, you can determine whether to cancel the editing or not.
    If you want to cancel it invoke the ‘cancelEdit’ method.

    Here is an example of the following behaviour: https://codepen.io/svetoslavjqwidgets/pen/mdGqOrX

    I hope this helps resolve the problem!

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.