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

cascading dropdown list in grid

3 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kien Lim
Top achievements
Rank 1
Kien Lim asked on 09 Jun 2011, 03:44 AM
Hi,

I have a grid which use popup edit mode and set the popup at the center of the screen(http://www.telerik.com/help/aspnet-ajax/grid-center-popup-edit-form.html). Inside the grid, I also included a cascading dropdown in the edit form with ajax postback.

The problem that I am facing now is as below
1) I open edit form  and the popup edit form open at the center of the screen as expected.
2) I manually align it to the right of the screen.
3) Then I selected cascading drop down list and the edit popup screen went back to center again.

How can prevent from going back to center once I align to other area?

Thanks

3 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 14 Jun 2011, 08:29 AM
Hi,

 The pop up centers again in the middle of the screen most likely because the dropdown cause post postback and fires again the PopUpShowing event. So you need to prevent this from executing the second time. You can either disable the postback for the dropdown if is on or set some flag in one of the client events for the dropdown (in case you are using RadComboBox) that you can check when you go again through the PopUpShowing event to prevent the code from executing. Another event that you might find useful is the OnCommand client-side event which indicates that edit command has fired so this might be another suitable place for setting a boolean variable that will allow the pop up to be shown only initially. There are many client-side events that you can choose from, you just need to find the one appropriate in your case.

Kind regards,
Marin
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
Kien Lim
Top achievements
Rank 1
answered on 16 Jun 2011, 03:20 AM
Hi Marin,

Thanks for your help in the first place. Can you give me some sample code to achieve option  no.2 using other client-side event?

Thanks for your help
0
Marin
Telerik team
answered on 16 Jun 2011, 11:12 AM
Hello Kien Lim,

 You can go trough the following links (containing code samples) which show how you can specify the position of the PopUp Edit form in RadGrid:
Customize RadGrid PopUp edit form position with an extender
Position PopUp edit form in RadGrid (this one shows how you can center the pop up, but the approach is the same - you can specify any coordinates for style.top and style.left that you wish).

Kind regards,
Marin
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.

Tags
Grid
Asked by
Kien Lim
Top achievements
Rank 1
Answers by
Marin
Telerik team
Kien Lim
Top achievements
Rank 1
Share this question
or