ASPxGridView.GetRowLevel(Int32) Method
In This Article
Returns the level at which the specified row resides.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
visible |
Int32 | An integer value that specifies the row’s visible index. |
#Returns
Type | Description |
---|---|
Int32 | An integer value that specifies the level at which the specified row resides. |
#Remarks
Use the GetRowLevel method to identify at which level a group or data row resides.
#Example
protected void ASPxGridView1_SummaryDisplayText(object sender, ASPxGridViewSummaryDisplayTextEventArgs e) {
if (e.IsGroupSummary) {
int level = ASPxGridView1.GetRowLevel(e.VisibleIndex);
switch (level) {
case 0:
e.Text = String.Format("<span style='color:red'>{0}</span>", e.Value);
break;
case 1:
e.Text = String.Format("<span style='color:green'>{0}</span>", e.Value);
break;
case 2:
e.Text = String.Format("<span style='color:blue'>{0}</span>", e.Value);
break;
default:
break;
}
}
}
See Also