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

InsertItem not firing

4 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 27 Oct 2010, 01:01 AM
After enabling the insert item in GridView, clicking insert does not trigger the insert statement.

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 27 Oct 2010, 02:20 PM
Hi James,

Can you please make sure that  the CommandName property of Insert button is set as "PerformInsert"? If the problem still persists please share your code and we will do our best to help.

Kind regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 27 Oct 2010, 05:48 PM
Pardon my ignorance, I am very new to telerik. I am unable to find PerformInsert.
0
Accepted
Pavlina
Telerik team
answered on 28 Oct 2010, 04:32 PM
Hi James,

Try the code snipped below and see if it works:
<asp:Button ID="Button1" runat="server" CommandName="PerformInsert" Text="Insert" />

Additionally, please take a look at this help topic to see the correct names of the build-in commands of the grid.

I hope it helps.

Kind regards,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 29 Oct 2010, 05:57 PM
Thanks for your help. I was able to use your suggestion to modify my code to look as follows:

<des:LinkButton ID="lbUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
     runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Group="1"
     SkipPostBackEventsWhenInvalid="True">
 </des:LinkButton>

works great now.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
James
Top achievements
Rank 1
Share this question
or