I had this problem before and never got and answer to it when i submitted a help ticket and now I am back to it becuase I have another case where I need to impliment it in a radgrid and cannot go back to a asp grid. What is happening is that I need a link button or hyperlink button on a radgrid that when they click on it it opens in a new window a page to email personnel. problem is when I do this it forwards the page to the email name or site in this case, need it to stay at grid and open a the email page and pass a variable to it.
<telerik:GridTemplateColumn HeaderText="MAC #">
<asp:LinkButton ID="lnkEmail" runat="server" CommandName="Email" CommandArgument='<% #Bind("intUserId") %>' text='<% #Bind("strMacNum") %>'
ToolTip="Email the IMO"></asp:LinkButton>
Right now its redirecting but i cannot have this, just needs to open the email page in another window while staying on grid page.
If (e.CommandName = "Email") Then
Dim RecordId As Integer = e.CommandArgument
Response.Redirect("Email.aspx?Email=" & RecordId)
also tried this but no go, forwards the grid to email page.
ClientScript.RegisterStartupScript(Me.GetType(), "OpenWin", "<script>openNewWin('" & url & "')</script>")
8 Answers, 1 is accepted
Another approach is to access the LinkButton in the ItemDataBound event and attaching an 'OnClick' event to open the RadWindow.
Thanks for the response, i am getting the following error on code behind for line 264
s for the response. In my code behind I am getting the following error.
Ok got past error by just makeing the integer a string, but now its run ita javscript error in that it says an object is expected. its like its not finding the aspx page that I am calling. I have it in my Admin folder under my directory which happens to be where the page is that a person is working on when they click the button, i though it would find it but I get object expected error.
calls out this line
varoWnd = radopen("~/Admin/Email.aspx?Email=" + RecordID, null);
even has as this
varoWnd = radopen("Email.aspx?Email=" + RecordID, null);
I think you are not able to get windowmanager in your JS function.
Please check examples in below links.
thanks for the help, so far i have gotten to this point, it is opening in window but I still get error of object doe snot support this property or method for this line. Instead of radwin I am using the regular window.open which works but i would like in center of the page.
varoWnd = window.open("Email.aspx?Email=" + RecordID, null);
Set popup in center position
Get browser window size
Not : window.center(); : it is the radwindow's method
and you are open simple window so it is gives error/not working.
If you want to open radwindow then please check below link.
Ok I got it working, using the radwindow, the problem now is that before my submit command or cancel command would close the window. now they do not. FYI i am using the aspx page in this rad window and they are link buttons, my send button still sends and email but it will not close the window.