aspnet-devexpress-dot-web-dot-aspxgridcommandbuttoneventargs.md
Gets the visible index of a data item (row, card or record) which contains the processed command button.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public int VisibleIndex { get; }
Public ReadOnly Property VisibleIndex As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value that identifies the data item by its visible index.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the VisibleIndex property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
aspxgridview-customize-command-buttons-in-rows/CS/HideCommandButtons/Default.aspx.cs#L29
protected void ASPxGridView1_CommandButtonInitialize(object sender, DevExpress.Web.ASPxGridViewCommandButtonEventArgs e) {
bool isOddRow = e.VisibleIndex % 2 == 0;
if(isOddRow) { // some condition
aspxgridview-customize-command-buttons-in-rows/VB/HideCommandButtons/Default.aspx.vb#L29
Protected Sub ASPxGridView1_CommandButtonInitialize(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridViewCommandButtonEventArgs)
Dim isOddRow As Boolean = e.VisibleIndex Mod 2 = 0
If isOddRow Then ' some condition
See Also
ASPxGridCommandButtonEventArgs Class