Does anyone know how to expand a single group based on a condition during itemdatabound?
I have tried multiple ways but nothing works.
Thanks
I have tried multiple ways but nothing works.
Thanks
Private Sub grdReadiness_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles grdReadiness.ItemDataBound
If TypeOf e.Item Is GridDataItem Then
Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
Dim imgStageStatus As Image = TryCast(e.Item.FindControl("imgStageStatus"), Image)
If Not imgStageStatus Is Nothing Then
If item("StageStatus").Text = "GREEN" Then
imgStageStatus.ImageUrl = "~/Images/Green24.png"
Else
imgStageStatus.ImageUrl = "~/Images/Red24.png"
'grdReadiness.Items(e.Item.RowIndex).Expanded = True
'e.Item.OwnerTableView.ParentItem.Expanded = True
'e.Item.OwnerTableView.GroupsDefaultExpanded = True
'grdReadiness.Items(e.Item.GroupIndex).Expanded = True
End If
End If
End If
End Sub