JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Scheduler Update date from server do not refresh the data

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #104453
    Andrea Durando
    Participant

    Hi all,

    I have an issue about the CRUD operation for the events .

    When the user do a CRUD operation i’ll send an API request and after the ok e redo a search to abtainthe list of calendar event updated.

    To update the datasource a copied parto of the code prsent the example
    https://www.htmlelements.com/angular/demos/scheduler/server-side-crud/

    Here the part of the code that i use tu update it :

    //response is the list of elements that i save in a locla varaible this.listEvents
    <div>
    <div>  this.listEvents = response.body??[];</div>
    </div>
    <div>//After do that i update the datasource</div>
    <div></div>
    <div>
    <div>
    <div>this.scheduler.dataSource = new window.Smart.DataAdapter({</div>
    <div>              dataSource:  this.listEvents ,</div>
    <div>              dataSourceType: ‘array’,</div>
    <div>              dataFields: [</div>
    <div>                { name: ‘id’, map: “id”, dataType: ‘string’ },</div>
    <div>                { name: ‘label’, map: “description”, dataType: ‘string’ },</div>
    <div>                { name: ‘dateStart’, map: ‘start_date’, dataType: ‘string’ },</div>
    <div>                { name: ‘dateEnd’, map: ‘end_date’, dataType: ‘string’ },</div>
    <div>                { name: ‘description’, map: ‘description’, dataType: ‘string’ }</div>
    <div>              ]</div>
    <div>            });</div>
    </div>
    </div>
    <div></div>
    <div>I noticed that  that work not always sometimes it update the data and sometime not.</div>
    <div>What could be the cause?</div>
    <div></div>

    #104459
    Markov
    Keymaster

    Hi Andrea,

    I’d suggest you to check whether this is cache related. I would also suggest you to console.log the this.listEvents as it could be also Async related i.e you set the dataSource to the old value, not to the new value.

     

    #104482
    Andrea Durando
    Participant

    Hi i do a check for the cache but seems not a problema about it,

    and I try to pass directly the response from the API to the dataSource, but the problem still remain.

    Any other suggestion?

    #104490

    Hi,

    Can you please share your code, so that we can work on it?
    You may send it here but the preferred way is to send it to support@jqwidgets.com

    Best Regards,
    Svetoslav Borislavov

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

    #104493
    Andrea Durando
    Participant

    Yestarday I forward to you an E-Mail with the code that i wrote.

    Regards

    Andrea

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