- Home
- Forum
- Angular - EJ 2
- Get column data of grouping with quickInfo
Get column data of grouping with quickInfo
I have this scheduler set up with have multiple groups , each of them with unique keys as rows.
My question is, when i click a date in the scheduler to trigger the QuickInfo Event, how can i get the row info?
like in this case the '201'?
Hi Arturo,
To access the row information of the selected date in the QuickInfo popup in the Syncfusion Scheduler component, you can use the args parameter in the onPopupOpen method. This parameter provides details about the selected cell or event, including the groupIndex, which can be used to determine the specific row or group that was clicked.
Here’s
how you can modify your onPopupOpen method to get the row (group) information
[app.component.ts]
|
public onPopupOpen(args): void { if (args.type === 'QuickInfo') { const groupIndex = args.data.groupIndex; if (groupIndex !== undefined && groupIndex !== null) { // Access the specific row/group information here using groupIndex const project = this.projectDataSource.find(project => project.id === args.data.ProjectId); const category = this.categoryDataSource.find(category => category.id === args.data.TaskId);
console.log('Group Index:', groupIndex); console.log('Selected Project:', project ? project.text : 'Not found'); console.log('Selected Category:', category ? category.text : 'Not found'); }
// You can also access other information like StartTime and EndTime as needed if (args.data.StartTime && args.data.EndTime) { const startTime = new Date(args.data.StartTime); const endTime = new Date(args.data.EndTime); console.log('Start Time:', startTime); console.log('End Time:', endTime); } } } |
Sample link: Qiu7pb
(forked) - StackBlitz
Regards,
Vijay
- 1 Reply
- 2 Participants
- Marked answer
-
AM Arturo Martinez
- Oct 9, 2024 04:31 AM UTC
- Oct 9, 2024 01:55 PM UTC