This is a migrated thread and some comments may be shown as answers.

Accessing edit mode in RadGrid1_ItemCreated

2 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard M
Top achievements
Rank 1
Richard M asked on 15 Jun 2010, 10:21 PM
How do I access Edit mode in RadGrid1_ItemCreated.

(Example)
    Private Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated
        If (something here) Then
                          'my code here
        End If
End Sub



2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Jun 2010, 05:22 AM
Hello Richard,

You can try the following code snippet to access EditMode in ItemCreated event.

VB.NET:
Protected Sub RadGrid1_ItemCreated(sender As Object, e As GridItemEventArgs) 
    'if you are using EditForms or PopUp EditMode 
    If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then 
             'your code 
    End If 
 
    'if you are using InPlace EditMode 
    If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then 
              'your code 
    End If 
End Sub 
 

You can also refer the following documentation which describes how to access Edit forms.
Edit forms
In place





Thanks,
Princy.



0
Richard M
Top achievements
Rank 1
answered on 16 Jun 2010, 04:56 PM
That worked!  Thank you very much.
Tags
Grid
Asked by
Richard M
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Richard M
Top achievements
Rank 1
Share this question
or