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

RadGrid EditForms PopUp edit - Prevent dialog movement

7 Answers 168 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 23 Nov 2015, 05:36 PM

I currently have a RadGrid with an EditForm section where I am defining the layout of edit mode. The mode is being set to PopUp, so the editing is done in the pop-up windows.

 

However, the pop-up will move back to it's original position on a postback, since it contains dependent dropdowns and requires database queries. As I understand from other posts, this behavior can't really be fixed. Either way - I would like to lock the position of the edit pop-up to prevent movement and other behaviors as is done in a RadWindow with the "Behaviors" tag. Is this possible to do with the edit pop-up in a radgrid? I do not see an option that would allow this in the EditForm PopUpSettings tag.

 

Thanks,

James

7 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 26 Nov 2015, 02:28 PM
Hi James,

Which EditMode do you use? Could you please wrap the entire form or just the postback controls within an RadAjaxPanel and let me know about the result?

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 22 Dec 2015, 04:20 PM

Hey Eyup,

 

The EditMode is set to "PopUp". The template is then defined in a "FormTemplate" inside of the "EditFormSettings" tag of the grid.

 

The pop-up is being generated by the grid, but the AJAX calls from the pop-up always move it back to the original position. Currently it is wrapped in an asp:Panel that is set as both an ajax control and the control it updates in a RadAjaxManagerProxy. Changing this setup to use a RadAjaxPanel results in the same issue.

 

Thanks,

James

0
Eyup
Telerik team
answered on 25 Dec 2015, 12:18 PM
Hi James,

In this case you will have to use a custom script to save the position of the PopUp container and re-apply it after the combo query to the database or any other postback.

For your convenience, I can prepare a sample RadGrid web site and send it to you if you prefer.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 26 Dec 2015, 05:39 PM

Hey Eyup,

If you could provide a sample, that would be great. I am not sure how to access the pop-up container via JavaScript since it is generated by the grid.

 Thanks,

James

0
Eyup
Telerik team
answered on 30 Dec 2015, 11:22 AM
Hello James,

I've created a sample RadGrid web site as you requested to demonstrate specifically you can achieve this requirement. Please run the attached application and let me know if it helps you.

Regards,
Eyup
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 1
answered on 30 Dec 2015, 05:33 PM

Thanks Eyup, this code does help keep the pop-up in it's position. 

I had to modify the code to apply to the "rgEditForm" class instead of the "rgEditPopUp" class, since my Pop-up from the grid did not contain that class (it only contained rgEditForm).

Also, I noticed the setTimeout causes the pop-up to be visible briefly before being moved. Without this timeout, the pop-up moves slightly downwards after each postback. Do you know what causes this or why the timeout fixes the issue? It would be nice if the pop-up was not visible before being moved back to it's saved position.

Thanks,

James

0
Pavlina
Telerik team
answered on 04 Jan 2016, 05:09 PM
Hi,

The timeout is needed for the row to be fully created and prevent the behavior you observed when it is not set. Do not hesitate to let us know If other questions related to the provided code arise.

Regards,
Pavlina
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Eyup
Telerik team
James
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or