hi all,
I want to open a new default.aspx with a radgrid in it, can somebody help me?
I open the window with a click in my panelbar, with this code :
string url = "Default2.aspx";
string testurl = "window.open(' "+url+" ','_blank','height=800,width=1000,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", testurl, true);
Is it possible to define a radgrid with datasource in this code?
thanks in advance,
esmyy
I want to open a new default.aspx with a radgrid in it, can somebody help me?
I open the window with a click in my panelbar, with this code :
string url = "Default2.aspx";
string testurl = "window.open(' "+url+" ','_blank','height=800,width=1000,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,titlebar=no');";
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", testurl, true);
Is it possible to define a radgrid with datasource in this code?
thanks in advance,
esmyy
5 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 02 Feb 2012, 05:16 AM
Hello,
Try the following javascript.
JS:
Note: default.aspx is the page with RadGrid.
Thanks,
Princy.
Try the following javascript.
JS:
function
OnClientClick(sender, args)
{
var
oWindow = window.radopen(
"default.aspx"
,
"RadWindow1"
);
}
Thanks,
Princy.
0
esmyy
Top achievements
Rank 1
answered on 02 Feb 2012, 08:31 AM
No, you didn't understand what I wanted to say..
I already have a "default.aspx" and with this code I posted I can open a second "default.aspx" - file. It's already working, but I don't know how to define a radgrid in it with various datasources, depending on which panelbar item I click, the second file should be showing a diffrent radgrid.
Do you know how to do this?
I already have a "default.aspx" and with this code I posted I can open a second "default.aspx" - file. It's already working, but I don't know how to define a radgrid in it with various datasources, depending on which panelbar item I click, the second file should be showing a diffrent radgrid.
Do you know how to do this?
0
Accepted
Richard
Top achievements
Rank 1
answered on 02 Feb 2012, 02:48 PM
esmyy:
You have a couple of options for doing this.
1) Create your RadGrid in a User Control and add the control to your default.aspx. You can reference the RadGrid inside UserControl with Events forum thread which includes a Telerik support demo project for you to reference.
2) You can open your default.aspx page that uses a RadWindow popup. Then, create your RadGrid in the window, programmatically on the PageLoad() and display it in the window. Take a look at the Window / Using the URL for Server Arguments online demo to see this in action. Click on the "details" link in a row to open the RadWindow featuring the RadGrid.
Regards,
You have a couple of options for doing this.
1) Create your RadGrid in a User Control and add the control to your default.aspx. You can reference the RadGrid inside UserControl with Events forum thread which includes a Telerik support demo project for you to reference.
2) You can open your default.aspx page that uses a RadWindow popup. Then, create your RadGrid in the window, programmatically on the PageLoad() and display it in the window. Take a look at the Window / Using the URL for Server Arguments online demo to see this in action. Click on the "details" link in a row to open the RadWindow featuring the RadGrid.
Regards,
0
esmyy
Top achievements
Rank 1
answered on 02 Feb 2012, 04:20 PM
hi jumpstart,
thank you for your reply, it's working with the UserControl.
I want to implement an additional function: depending on which panelbar item I click, for example "supplier adresses" the RadGrid in the UserControl should change the datasource, and if the clicked item is "employee adresses", it should open the radgrid with the employee adresses. I don't want to make a new UserControl for every radgrid, because if I have to change something, I have to change it in 10 diffrent UserControls.. I only want one, but with diffrent datasources for the radgrid.
I hope you understand what I mean, it's a bit complicated to explain. :)
Regards,
esmyy
thank you for your reply, it's working with the UserControl.
I want to implement an additional function: depending on which panelbar item I click, for example "supplier adresses" the RadGrid in the UserControl should change the datasource, and if the clicked item is "employee adresses", it should open the radgrid with the employee adresses. I don't want to make a new UserControl for every radgrid, because if I have to change something, I have to change it in 10 diffrent UserControls.. I only want one, but with diffrent datasources for the radgrid.
I hope you understand what I mean, it's a bit complicated to explain. :)
Regards,
esmyy
0
Richard
Top achievements
Rank 1
answered on 02 Feb 2012, 06:34 PM
esmyy:
I've never done this myself, but it looks like it can be done using AJAX and javascript to set the data source for the popup grid dynamically, See the Call SQL Data Source Insert based on a session variable from RadWindow forum thread for insights.
Hope this helps!
I've never done this myself, but it looks like it can be done using AJAX and javascript to set the data source for the popup grid dynamically, See the Call SQL Data Source Insert based on a session variable from RadWindow forum thread for insights.
Hope this helps!