Hello,
I've got a detail template and if you click on it, it adds the key to the selectedKeys arrray, so it gets highlighted (selected).
But after that I press shift and click on another row (2 rows down for example. Not the detail) and it selects all the records from the first one until the clicked row. Not from the row I selected via the detail row.
It's like the grid doesn't know I've already selected a row.
Do you have an example when clicking the detail template, selects the parent row and also keeps the shift from working?
This is my detail template:
<ng-template kendoGridDetailTemplate let-dataItem>
<ng-container>
<div
*ngIf="dataItem['COMMENTS']"
(click)="childRowOnClicked($event, dataItem["ORDERID"])"
>
<div>
{{ dataItem['COMMENTS'] }}
</div>
</div>
</ng-container>
Regards,
Hi Bram,
I am not sure what is your specific Grid configuration and I will provide some information when using the Binding Directive. Generally, the developer would need to handle a click event as your provided code and add the selected key to the array. From there with the directive it seems that the selection with shift works properly:
https://stackblitz.com/edit/angular-g4xhbv-vw55jn?file=app%2Fapp.component.ts,app%2Fproducts.ts
When the detail template child is selected it will select the parent and shift select also selects other parents depending on the range.
If your scenario is different could you provide more context, example, steps, and the desired end result of the interaction? That will help me better suggest a solution if one is available.
Thank you in advance for your cooperation.
Regards,
Yanmario
Progress Telerik
Hi Yanmario,
The demo you've created has the same issue as I described.
What you do is click on the child row for example 17 from the chang row. (see first click.png)
After that you press shift and click on the parent row Chef Anton's Cajun Seasoning. (see shift click.png)
This will select all the rows until Chef Anton's Cajun Seasoning (first until 4th row) instead of chang until Chef anton's (2nd until 4th row).(see sample.gif)
Regards,
Bram