aspnet-devexpress-dot-web-dot-aspxgridview-dot-isgrouprow-x28-system-dot-int32-x29.md
Indicates whether the specified row is a group row.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public bool IsGroupRow(
int visibleIndex
)
Public Function IsGroupRow(
visibleIndex As Integer
) As Boolean
| Name | Type | Description |
|---|---|---|
| visibleIndex | Int32 |
The row’s visible index.
|
| Type | Description |
|---|---|
| Boolean |
true if the specified row is a group row; otherwise, false.
|
Call the IsGroupRow method to get information about the grouping state of the specified row.
For more information on grouping in the grid, refer to the following topic: ASPxGridView - Group Data.
The code sample below traverses through the visible rows on page and calls the IsGroupRow method to get a collection of group row indices.
<dx:ASPxGridView ID="grid" runat="server" OnBeforeGetCallbackResult="grid_BeforeGetCallbackResult">
<%--...--%>
<Settings ShowGroupPanel="True" />
</dx:ASPxGridView>
protected void grid_BeforeGetCallbackResult(object sender, EventArgs e) {
List<int> groupIndices = new List<int>();
for(int i = 0; i < grid.VisibleRowCount; i++) {
if(grid.IsGroupRow(i))
groupIndices.Add(i);
}
}
Protected Sub grid_BeforeGetCallbackResult(ByVal sender As Object, ByVal e As EventArgs)
Dim groupIndices As List(Of Integer) = New List(Of Integer)()
For i As Integer = 0 To grid.VisibleRowCount - 1
If grid.IsGroupRow(i) Then groupIndices.Add(i)
Next
End Sub
See Also