RadGrid for ASP.NET

RadGrid Send comments on this topic.
GridButtonColumn Class
See Also  Members  
Telerik.WebControls Namespace : GridButtonColumn Class


It displays a button for each item in the column.

Object Model


 

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

Syntax

Visual Basic (Declaration) 
Public Class GridButtonColumn 
   Inherits GridColumn
Visual Basic (Usage)Copy Code
Dim instance As GridButtonColumn
C# 
public class GridButtonColumn : GridColumn 

Example

                <rad:GridButtonColumn FooterText="PushButtonColumn<br/>footer" DataTextFormatString="Select {0}"
ButtonType="PushButton" UniqueName="column" HeaderText="PushButton<br/>Column"
CommandName="Select" DataTextField="CustomerID">
</rad:GridButtonColumn>

Remarks

This column renderes a button of the specified ButtonType in each corresponding cell of the items of type GridDataItem and GridEditFormItem. You can use this buttons to fire command events that can be handeled in RadGrid.ItemCommand event handler. This, in combination with the event bubbling mechanism in Telerik RadGrid, allows you to create a column of custom button controls, such as Add, Remove, Select or Edit buttons.

The available buttons types are: PushButton,LinkButton and ImageButton. Telerik RadGrid comes with two types of button columns:

  • Select - when a button in this column is pressed, it will select the whole row. The Select column below uses a PushButton.
  • Remove selection - when a button in this column is pressed, it will delete the row. The Remove selection column below uses a LinkButton.

Inheritance Hierarchy

System.Object
   Telerik.WebControls.GridColumn
      Telerik.WebControls.GridButtonColumn
         Telerik.WebControls.GridClientDeleteColumn
         Telerik.WebControls.GridClientSelectColumn

Requirements

Namespace: Telerik.WebControls

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

Assembly: RadGrid (in RadGrid.dll)

See Also