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

RadGrid with WebUserControl Edit Form - updates close edit form, inserts do not

3 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 13 Jun 2011, 01:23 AM
Hi, we have a .net user control that works very well as an edit form within the grid, with one exception. We have an Insert button, an Update button and finally a Cancel button, with CommandNames set to Insert, Update, and Cancel respectively. Depending on whether a primary key value exists from the database, we either hide the insert button or show it. 

If we are updating, the form performs as expected and the edit form disappears and the grid updates with the new values.

But inserts fail to make the edit form disappear. If we click cancel, the edit form disappears and we see the newly inserted value in the grid. 

We were under the assumption that setting the Command Name to Insert would be what we need, but apparently this is not the case. Does anyone have any ideas on either, a) what we are doing wrong or b) a way to force the edit form to close... from within the edit form control as that is where the post back and processing takes place. Many thanks.

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 15 Jun 2011, 12:54 PM
Hi Karl,

Try setting the CommandName for the insert button to "PerformInsert" and see if it makes any difference. If the issue persists, please share your grid declaration and the related server-side code for further check.

Best wishes,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
MVP
Top achievements
Rank 1
answered on 18 Nov 2013, 09:39 AM
I have already set the CommandName for the insert button as "PerformInsert".
Grid is getting updated with the inserted row but editable control with blank values remains opened.
Only on click of Cancel, it is getting closed. This is working fine in case of Update.
0
Viktor Tachev
Telerik team
answered on 21 Nov 2013, 09:28 AM
Hi,

Would you try disabling Ajax on the page by commenting out RadAjaxManager or setting its EnableAjax property to false and see if this makes any difference? If you do not have Ajax on the page or the issue persists could you share the full source code for the page with the code-behind? This way we could try replicating the problem locally and investigate for possible solutions.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
MVP
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or