resources

hi, 
i have e-resource - and on mobile devices I- have to select them via a menu.. but when I change the Date - the selected resource get lost - and I'm always back on the first resource - is there a way to remember the selected and get back to this one?

thank you!

isabelle

14 Replies 1 reply marked as answer

VD Vinitha Devi Murugan Syncfusion Team October 28, 2020 10:10 AM UTC

Hi Isabelle, 
 
Greetings from Syncfusion Support. 
 
We have validated the reported issueWhen I change the Date - the selected resource get lost in mobile device” at our end in a resource sample. But we were not able to replicate the mentioned issue. The resource selection was maintain properly when we change the date. Please find the below sample and video demo for your reference. 
 
 
Kindly try the above sample and if you still face the mentioned issue, could you please share the replication sample(if possible) or share your schedule rendering code to serve you better. 
 
Regards, 
Vinitha 



IF Isabelle Fuchs November 30, 2020 10:47 AM UTC

we have an extern refresh as well and would like to keep the information of the selected ressource in local storage - 

can you tell me which event sets the selected ressource?

thnaks



BS Balasubramanian Sattanathan Syncfusion Team December 1, 2020 11:03 AM UTC

Hi Isabelle, 

Thanks for the update. 

We have validated your requirement at our end and let you know that we can retrieve the resource details by using getResourcesByIndex like below. 

onDataBound: function (args) { 
  let scheduleObj = this.$refs.ScheduleObj; 
  console.log(scheduleObj.ej2Instances.getResourcesByIndex(1))          
} 


Kindly try the above solution and let us know if you need further assistance. 

Regards, 
Balasubramanian S


IF Isabelle Fuchs December 1, 2020 11:55 AM UTC

it helped already but i still have a problem: 

how do i get the selceted GroupID  - with this :
const resource = schedule.ej2Instances.getResourcesByIndex(1);

i always get the second one - but not the selected...


thanks


IF Isabelle Fuchs December 1, 2020 01:40 PM UTC

and - i would also need the "set Event". that i can set der Resource after refreshing...

thnaks


BS Balasubramanian Sattanathan Syncfusion Team December 2, 2020 01:58 PM UTC

Hi Isabelle, 

Thanks for your reply. 

We have validated your reported scenario at our end and let you know that currently, we don't have the option to retain the selected resource. So we have considered this as bug at our end and it will be implemented in the Volume 4 main release which is expected to roll out by end of December 2020. You can track the status through the below feedback link. 


Regards, 
Balasubramanian S 


Marked as answer

IF Isabelle Fuchs February 22, 2021 02:10 PM UTC

thanks for the solution - but how can i find the selected resource item?


IF Isabelle Fuchs February 22, 2021 02:36 PM UTC

and how can i set the Resource after reloading? so i need to geht the selected - remember it locally and after refrehing the data - set the resource again

thnaks


NR Nevitha Ravi Syncfusion Team February 23, 2021 08:43 AM UTC

Hi Isabelle, 

When you set enablePersistence as true you don’t need to set the resource after the scheduler refresh. Please refer to the following sample. 


Also you can find the selected resource in uiStateValues which is printed in the console of the above sample. 
 onButtonClick(): void { 
    this.scheduleObj.refresh(); 
    console.log(this.scheduleObj.uiStateValues.groupIndex); 
  } 
  
Please try the above solution, if it doesn’t meet your requirement share the details of your scenario and requirement to help you out. 

Regards, 
Nevitha 



IF Isabelle Fuchs February 23, 2021 09:49 AM UTC

the example is in angular - but i use VUE!


enable Persistence - is a good beginning - but it just safes the current View! the selceted resource is missing - important - my problem is only on mobile devices when i use "enableCompactView: 

this.group = {
enableCompactView: true,
resources: ["GroupData", "Employee"]
};


  1. currentView: "Month", selectedDate: "2021-02-28T23:00:00.000Z"}
    1. currentView"Month"
    2. selectedDate"2021-02-28T23:00:00.000Z"



BS Balasubramanian Sattanathan Syncfusion Team February 24, 2021 11:07 AM UTC

Hi Isabelle, 

Thanks for the reply. 

We have analyzed your reported scenario at our end and prepared a sample in the Vue which can be available from the below link. And let you know that we can get the group Index by making use of the uiStateValues of groupIndex property. Using this code, we can save the current groupIndex in the DB before refreshing and can restore the saved groupIndex after refreshing. 


// We can maintain these in DB 
let savedGroupIndex; 
let currentGroupIndex; 
getGroupIndex: function () { 
  let scheduleObj = this.$refs.ScheduleObj; 
  // Store the current groupIndex in the global variable 
  savedGroupIndex = scheduleObj.ej2Instances.uiStateValues.groupIndex; 
  console.log(savedGroupIndex); 
}, 
setGroupIndex: function () { 
  let scheduleObj = this.$refs.ScheduleObj; 
  currentGroupIndex = scheduleObj.ej2Instances.uiStateValues.groupIndex; 
  if (savedGroupIndex != currentGroupIndex) { 
    // Restore the persisted groupIndex to the Schedule from global variable 
    scheduleObj.ej2Instances.uiStateValues.groupIndex = savedGroupIndex; 
    scheduleObj.ej2Instances.refresh(); 
  } 

Kindly try the above solution and let us know if this comes close to your requirement. 

Regards, 
Balasubramanian S


IF Isabelle Fuchs February 26, 2021 09:09 AM UTC

your example helped - it is now working, that he is remembering the last selected Resource
but - the compactView ist gone - when i set the parameter "enablePersistance"

this.group = {
enableCompactView: true,
resources: ["employee"]
};

Attachment: Archiv_30843573.zip


IF Isabelle Fuchs February 26, 2021 09:41 AM UTC

now i testet it on the device and not on the simulator - now it is working!!


NR Nevitha Ravi Syncfusion Team February 26, 2021 10:23 AM UTC

Hi Isabelle, 
  
Thanks for your update.

We are happy that your issue has been resolved at your end. Please get back to us if you need any further assistance.

Regards, 
Nevitha 


Loader.
Up arrow icon