ItemEvent Event

Marked for internal usage.

Event Parameters

  • (object) sender

    • The control that fires the event
  • (GridItemEventArgs) e

    • Event arguments

      • (boolean) e.Canceled

        Set to true to cancel the default event execution, if available. The ItemCreated and ItemDataBound event cannot be cancelled.

      • (GridItemEventInfo) e.EventInfo

        Event info object. Cast to derrived classes to obtain the appropriate instance.

      • (GridItem) e.Item

        Gets the GridEditableItem which fired the event.

Attaching the event

In the Markup

<telerik:RadGrid ID="RadGrid1" runat="server" OnItemEvent="RadGrid1_ItemEvent">
</telerik:RadGrid>

In the Code behind

protected void Page_Init(object sender, EventArgs e)
{
    RadGrid1.ItemEvent += RadGrid1_ItemEvent;
}
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
    AddHandler RadGrid1.ItemEvent, AddressOf RadGrid1_ItemEvent
End Sub

The event handler

protected void RadGrid1_ItemEvent(object sender, GridItemEventArgs e)
{
    bool canceled = e.Canceled;
    GridItemEventInfo eventInfo = e.EventInfo;
    GridItem item = e.Item;
}
Protected Sub RadGrid1_ItemEvent(ByVal sender As Object, ByVal e As GridItemEventArgs)
    Dim canceled As Boolean = e.Canceled
    Dim eventInfo As GridItemEventInfo = e.EventInfo
    Dim item As GridItem = e.Item
End Sub
In this article
Not finding the help you need? Improve this article