Hi guys
Not able to display popup window from code behind(c#). My requirement is - I have a button in radgrid insert form(popup- automatic). When I click on that button, I want to popup another small window(container) with a dropdown list, ok button, and cancel button. Select an item from dropdown and click ok. Close that window and get that item into a text box in insert form.
Almost same as date picker or browse button. User wants to click select button near a textbox and select inserted value from another window and pass selected value to textbox. I would like to do this task in code behind(c#). Anybody can help me to complete this task.
Ben
Not able to display popup window from code behind(c#). My requirement is - I have a button in radgrid insert form(popup- automatic). When I click on that button, I want to popup another small window(container) with a dropdown list, ok button, and cancel button. Select an item from dropdown and click ok. Close that window and get that item into a text box in insert form.
Almost same as date picker or browse button. User wants to click select button near a textbox and select inserted value from another window and pass selected value to textbox. I would like to do this task in code behind(c#). Anybody can help me to complete this task.
Ben
5 Answers, 1 is accepted
0
Hello Ben,
I believe that the demo shown here will be of help - you can use it as a base and extend it further to fit your requirements.
All the best,
Georgi Tunev
the Telerik team
I believe that the demo shown here will be of help - you can use it as a base and extend it further to fit your requirements.
All the best,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jumpstart 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

Ben
Top achievements
Rank 1
answered on 29 Nov 2010, 06:51 PM
Thanks,
Yes, that demo is very helpful. But Now I want to create radwindows like your demo "Window / Returning Values from a Dialog " . But Radwindow open, close, and passing values between windows should be in code behind. Can you help me to create that same demo without using javascript.
Thanks
Ben
Yes, that demo is very helpful. But Now I want to create radwindows like your demo "Window / Returning Values from a Dialog " . But Radwindow open, close, and passing values between windows should be in code behind. Can you help me to create that same demo without using javascript.
Thanks
Ben
0
Hi Ben,
Such functionality can be implemented via server-side code only if you are using the RadWindow as controls container like shown in the demo that I linked in my previous reply (i.e. the content of the window comes from the same page). If you load external pages like in "Returning Values from a Dialog", you will have to use JavaScript.
Sincerely yours,
Georgi Tunev
the Telerik team
Such functionality can be implemented via server-side code only if you are using the RadWindow as controls container like shown in the demo that I linked in my previous reply (i.e. the content of the window comes from the same page). If you load external pages like in "Returning Values from a Dialog", you will have to use JavaScript.
Sincerely yours,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jumpstart 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

Charles
Top achievements
Rank 2
answered on 10 Mar 2011, 06:55 PM
Georgi,
Can you elaborate a bit on using the RadWindow as a controls container and then using server side code to open and close the RadWindow? The demo you linked to has the RadWindow open all of the time and the code behind file does not reference the RadWindow control at all.
What I'm currently doing is using javascript to open the window using the <RadWindow Control>.show() method.
This works, but the RadAjaxManager is giving me problems with the RadGrid static headers on the main page.
The page in question is a DNN module, so I'm thinking there might be a conflict between the way DNN handles Ajax postbacks and the way the RadAjaxManger handles them. I turned off the Ajax functionality in the DNN module's configuration, but that didn't resolve the issue.
Here's a link to my original post about it, which contains my markup for both the RadWindow and RadAjaxManager controls:
http://www.telerik.com/community/forums/aspnet-ajax/grid/problems-with-static-headers-not-scrolling-horizontaly.aspx
I should also note that the problem I'm having the way it is currently coded is that when I perform some action that initiates a partial postback, the column headers in my RadGrid no longer scroll horizontally with the data in the grid (screenshots attached showing the difference). This occurs whenever I select a different page of data (RadGrid has paging enabled), sort a column, or any other action that causes a partial postback to the server.
If I completely remove the RadAjaxManger from my page, the RadGrid column headers function as expected (i.e. scrolling is not disrupted), but I can no longer open the RadWindow when I click on the button in the GridButtonColumn.
Thanks,
Charlie
Can you elaborate a bit on using the RadWindow as a controls container and then using server side code to open and close the RadWindow? The demo you linked to has the RadWindow open all of the time and the code behind file does not reference the RadWindow control at all.
What I'm currently doing is using javascript to open the window using the <RadWindow Control>.show() method.
This works, but the RadAjaxManager is giving me problems with the RadGrid static headers on the main page.
The page in question is a DNN module, so I'm thinking there might be a conflict between the way DNN handles Ajax postbacks and the way the RadAjaxManger handles them. I turned off the Ajax functionality in the DNN module's configuration, but that didn't resolve the issue.
Here's a link to my original post about it, which contains my markup for both the RadWindow and RadAjaxManager controls:
http://www.telerik.com/community/forums/aspnet-ajax/grid/problems-with-static-headers-not-scrolling-horizontaly.aspx
I should also note that the problem I'm having the way it is currently coded is that when I perform some action that initiates a partial postback, the column headers in my RadGrid no longer scroll horizontally with the data in the grid (screenshots attached showing the difference). This occurs whenever I select a different page of data (RadGrid has paging enabled), sort a column, or any other action that causes a partial postback to the server.
If I completely remove the RadAjaxManger from my page, the RadGrid column headers function as expected (i.e. scrolling is not disrupted), but I can no longer open the RadWindow when I click on the button in the GridButtonColumn.
Thanks,
Charlie
0

Charles
Top achievements
Rank 2
answered on 10 Mar 2011, 07:37 PM
Ok, I solved my problem.
Yesterday I had tried using the VisibleOnPageLoad property to display the RadWindow, but I guess I probably had the RadAjaxManger control in my module.
I resolved my Grid issue by removing the RadAjaxManager and then opening and closing the RadWindow using server side code (setting the VisableOnPageLoad property to true or false).
All is working again.
Thanks,
Charlie
Yesterday I had tried using the VisibleOnPageLoad property to display the RadWindow, but I guess I probably had the RadAjaxManger control in my module.
I resolved my Grid issue by removing the RadAjaxManager and then opening and closing the RadWindow using server side code (setting the VisableOnPageLoad property to true or false).
private
void
ShowModalPopup(
string
title)
{
winPopup.Title = title;
winPopup.VisibleOnPageLoad =
true
;
}
All is working again.
Thanks,
Charlie