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

[Solved] RadWindow help needed

5 Answers 189 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 02 May 2008, 09:00 PM
Hi all,

My first attempt using the RadWindow.  I am using the latest 2008 Telerik version.  When I click a button, I call a method that will return a boolean value.  If False, I want to display "Record Not Deleted" in my popup window.  If True, "Record had been deleted."  in my popup window.  Not sure how to do this.  I know how to return True or False from the method.  It is how to make this popup radwindow appear is where I need help.  I tried a few things but nothing appeared.  Here is the html I use in my web page:

<

Telerik:RadWindowManager

ID="RadWindowManager1"

runat="server">

<Windows>

<telerik:RadWindow ID="RadWindowError"

runat="server"

Visible="false"

Modal="true">

<asp:Label ID="labelResult" runat="server"></asp:Label>

</telerik:RadWindow>

</Windows>

</Telerik:RadWindowManager>



Thanks,
Bob



5 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 06 May 2008, 02:03 PM
Hi Bob,

I am not quite sure about your exact scenario - do you want to go server-side, delete the record if needed and then show the RadWindow or you want to display the RadWindow first and then go server-side if needed?

Therefore I will suggest you the following:

  1. If you want to open a RadWindow on the client, you can find more information about this here.
  2. To open a RadWindow from server-side, please examine this KB article and use the described approach.

In case this does not help or you need further assistance, please, open a new support ticket and send us a small, working project with a detailed explanation of the experienced problem.

Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 06 May 2008, 04:53 PM
Svetlina,

I am not sure how to answer your question.  I was hoping you could tell me the best way to do this.  Here is what I have now.  I am trying use the radAlert but nothing appears:

Protected

Sub rgPolicyValue_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgPolicyValue.ItemCommand

Select Case e.CommandName

Case "Delete"

If LifePolicy.LifePolicyAccountValueIsDeletable((Convert.ToInt32((e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("PolicyAccountValueId")))), CInt(Request.QueryString("OpportunityID"))) Then

LifePolicy.DeleteLifePolicyAccountValue(Convert.ToInt32((e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)(

"PolicyAccountValueId"))))

Dim radalertscript As String = "<script language='javascript'> Sys.Application.add_load(function(){radalert('Row deleted', 330, 210);})</script>"

Page.ClientScript.RegisterStartupScript(

Me.[GetType](), "radalert", radalertscript)

End

If

End Select

End Sub

So what am I doing wrong?

Thanks,
Bob

0
Georgi Tunev
Telerik team
answered on 09 May 2008, 10:23 AM
Hi Bob,

The code that you used seems fine, but for the time being we cannot tell what the reason for the problem might be because we are missing information. That is why I would like to repeat Svetlina's request to open a support ticket and send us your project or a small sample one which reproduces your setup and the problem itself. Once we have a better view over your exact case, we will get back to you with a solution right away.

Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 14 May 2008, 07:23 PM
Ok thanks.  I have most of this working.  I do have another question:  After I close the pop-up window, I want to return a value from the pop-up.  How do I do this in the main page?  I want to return a value and display this value in a <asp:label> control.  Not sure how to get this value into my label.

Thanks,
Bob
0
Georgi Tunev
Telerik team
answered on 15 May 2008, 03:17 PM
Hello Bob,

I recommend to check the Controls / Programming / Programming / Using RadWindow as a Dialog topic in the RadControl's documentation for more details on how to return a value from the dialog.

Once the value is returned, you can insert it in the label by using its innerHTML client-side property:

var lbl = document.getElementById("<%= label1.ClientID %>"); 
lbl.innerHTML = "<strong>HTML</strong> content"


Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Bob
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Bob
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or