RadGrid for ASP.NET

RadGrid Send comments on this topic.
EditIndexes Property
See Also 
Telerik.WebControls Namespace > RadGrid Class : EditIndexes Property


Gets a collection of the indexes of the Items that are in edit mode.   

 

Namespace: Telerik.WebControls
Assembly: RadGrid (in RadGrid.dll)

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property EditIndexes As GridIndexCollection
Visual Basic (Usage)Copy Code
Dim instance As RadGrid
Dim value As GridIndexCollection
 
value = instance.EditIndexes
C# 
public GridIndexCollection EditIndexes {get;}

Return Value

returns GridIndexCollection of all data items that are in edit mode.

Example

The following example demonstrates how to hide "Add New" button in the CommandItemTemplate when Telerik RadGrid is in edit/insert mode. The easiest way to check if Telerik RadGrid is in edit mode is to check whether the GridIndexCollection (EditIndexes gives a reference to this) is empty.

            <CommandItemTemplate>
                
                <asp:LinkButton ID="LinkButton1" Visible="<# >"
                
            runat="server" CommandName="InitInsert">Add New</asp:LinkButton>
                
            </CommandItemTemplate>
                

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also