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

[Solved] Inserting Item through stored procedures

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Terence Pae
Top achievements
Rank 1
Terence Pae asked on 11 Aug 2009, 10:53 AM
Hello,

I've been trying to add the grid item through stored procedures, and I am having hard time getting the user input from RadGrid.

    Protected Sub MyConditions_ItemInserted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) 
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem) 
        Dim test As GridEditableItem = editedItem.OwnerTableView.GetInsertItem() 
 
        Dim test2 As String = test.GetDataKeyValue("Condition").ToString 
 
    End Sub 
This is giving me this error: Index was out of range. Must be nonnegative and less than the size of the collection. Parameter name: index 

I am trying to get the dataKeyValue called "Condition", which was given by user input during onItemInserted event..

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 12 Aug 2009, 02:11 PM
Hi Terence Pae,

Do you have Condition in the grid DataKeyNames?

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Terence Pae
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or