JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Kanban Blazor – OnOpening contains no ID

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #109181
    Lukas Xaver
    Participant

    Hej!

     

    I wanted to overwrite the default Item-Editor and in case to do that I had to figure out a way to get the id of the task that should be edited.

    I read on the forums that you can use

    private void OnKanbanChange(Event ev)
    {
    KanbanChangeEventDetail detail = ev[“Detail”];

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

    KanbanData record = new KanbanData();
    record.text = value.text;
    record.status = value.status;
    record.priority = value.priority;

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

    This works when I move a task.

     

    If I use the same principle for OnOpening with this function

    void KanbanOpen(Event ev)
    {
    KanbanOpeningEventDetail e = ev[“Detail”];
    }

    e has the following values:
    comment: null
    Purpose: ‘edit’
    Task: {\n”id”:””\}

    Any hint what I am doing wrong?

     

    Best regards

    Lukas

    #109200
    Markov
    Keymaster

    Hi Lukas,

    Could you provide a full sample which we can try?

    Best regards,
    Markov

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

    #109201
    Lukas Xaver
    Participant

    Hi Markov,

    I simply added
    public void OnOpening(Event e)
    {
    KanbanOpeningEventDetail ed = e[“Detail”];
    }

    on your SmartUI.Demos (KanbanEditablePage.razor).

    On Line 27 append
    OnOpening=”OnOpening”
    to the <Kanban> tag.

    Place a breakpoint on “ed” and in “Item” you’ll see its empty, regardless which kanbanitem your editing.

    Best regards,
    Lukas

    #109204
    ivanpeevski
    Participant

    Hi Lukas,

    Thank you for the feedback! I have opened a work item for that and we will resolve this in our next releases.

    For now, you can attach the event through JavaScript. You can get the task id with “event.detail.task.data.id” and use JSInterop to call back a .Net method to handle the id in the way you need.

     

    Best regards,
    Ivan Peevski

    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.