JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Data Grid When a Cell is edited it does not update back-end model

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #109809

    Hi,

    If my DataSource is a simple List<T> and I edit a cell, is it supposed to automatically update the item at the existing List<T>, or should I modify it inside an OnChange event code?

    My row objects have {get; set;} and I see that get; is called when the grid is initially rendered, but set; is not called when I edit a cell.

    I’m new to Blazor, thanks for your help.

     

     

     

    #109812
    Markov
    Keymaster

    Hi Cesar,

    As a frontend UI component, it does not automatically update the backend. This requires custom code to synchronize the front-end with the backend. You can read how to do this here: https://www.htmlelements.com/docs/blazor-grid-server-side-crud/

    Regards,
    Markov

    #109813

    Thanks Markov,

    Just for curiosity, when I edit a cell I see that the change is sent through SignalR. If I don’t intercept the event, is that change lost?

    #109814
    Markov
    Keymaster

    Hi Cesar,

    The important thing here is that OnEndEdit handler should be there in order to get what’s edited by the user. Then you can use different options to send this information to the backend. In our help tutorial, we demonstrated a popular one.

    Regards,
    Markov

    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.