JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Kanban Kanban Blazor app – persisting to database

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #107460
    Jamie Cunningham
    Participant

    Hello!

    I’m trying to work out a kanban application in Blazor, and I’m having some trouble writing my data BACK to the database – I can read my database tasks just fine (but maybe I didn’t do that right already)

    I basically loaded my tasks, iterated through them creating the cards…

    My first thought was to put something in the OnChange of the kanban component, but the data doesn’t seem to be actually altered?

    Does anyone have a good example of writing the changed data back to the database?

    Thanks,

    Jamie

    #107488
    Markov
    Keymaster

    You can get the task this way:
    private void OnKanbanChange(Event ev)
    {

    KanbanChangeEventDetail detail = ev[“Detail”];

    var oldValue = detail.OldValue;
    var value = detail.Value;

    KanbanDataRecord record = new KanbanDataRecord();
    record.Text = value.text;
    record.Status = value.status;
    record.Priority = value.priority;

    string task = detail.Task.ToString();
    string valueToString = detail.Value.ToString();

    }

    When you have the new properties, you can modify the record in the database.
    I hope this helps!

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