Timeline view grouped scheduler - get row object (or id) on empty cell double click

Hello,

I need to get the row object or id (in your example "Nancy", "Steven", etc) when I double click on a empty cell. 

I see I get the GroupId but not anything else about the row. Is this possible?

Thank you,
Fabrizio

3 Replies 1 reply marked as answer

AK Alagumeena Kalaiselvan Syncfusion Team August 5, 2020 03:20 PM UTC

Hi Fabrizio, 

Greetings from Syncfusion support. 

We have checked your reported issue and you can access resource details while double click a cell by following below steps 
Step1: Get the GroupIndex of cell using CellDoubleClick event 
Step 2: Pass the GroupIndex as a parameter to the GetResourceByIndex public method which reruns the resource details 
Step 3: Deserialize the resource object to get result and refer the below code for that 

        <SfSchedule @ref="ScheduleObj" TValue="AppointmentData" Width="100%" Height="650px" SelectedDate="@(new DateTime(2020, 1, 8))" CurrentView="View.TimelineWeek"> 
            ... 
            <ScheduleEvents TValue="AppointmentData" OnCellDoubleClick="CellDoubleClick"></ScheduleEvents> 
        </SfSchedule> 
    </div> 
</div> 
@code{ 
    public async void CellDoubleClick(CellClickEventArgs args) 
    { 
        var SelectedResource = await ScheduleObj.GetResourcesByIndex(args.GroupIndex);     // To get the resource details 
        var groupData = JsonConvert.DeserializeObject<AppointmentData>(JsonConvert.SerializeObject(SelectedResource.GroupData)); 
    } 
... 
} 

Also, we have prepared a sample based on your requirement which can be get by the below link. 

Please let us know, if you need further assistance. 

Regards 
Alagumeena.K 


Marked as answer

FA Fabrizio Alessandro August 10, 2020 02:28 PM UTC

Thank you Alagumeena, it works.



VM Vengatesh Maniraj Syncfusion Team August 11, 2020 06:01 AM UTC

Hi Fabrizio, 

You are most welcome.  

We are happy that our solution has fulfilled your requirement. 

Regards, 
Vengatesh  


Loader.
Up arrow icon