I am having trouble getting the collapsible panels to work within my foreach loop. When an item is clicked, all of the items expand/retract, which isn\'t what I want. I wa
Basically you are creating panel with loop and assigning the same id to all the panel-group and that's what causing the problem here! So you can try working as below and please note ids should be unique in DOM
@{int i=0;}
foreach (var item in groupItem)
{
@Html.DisplayFor(modelItem => item.IdNumber)
i++;
}