Andy Green
Top achievements
Rank 1
Andy Green
asked on 26 Apr 2010, 08:39 AM
Hi
I have a pop up modal Radwindow, the page has a button control on in a panel, with a label. The panel is hidden until the users make a selection.
Then they are asked to confirm by clicking the button. I'm using RadAjaxManager to show the panel but the click event does not appear to fire.
What should happen is a block of code runs on the server and then runs this:
to close the radwindow and refresh the main grid.
It all works fine if I remove the AJAX.
UPDATE
The button event does fire, but its the
Andy
I have a pop up modal Radwindow, the page has a button control on in a panel, with a label. The panel is hidden until the users make a selection.
Then they are asked to confirm by clicking the button. I'm using RadAjaxManager to show the panel but the click event does not appear to fire.
What should happen is a block of code runs on the server and then runs this:
ClientScript.RegisterStartupScript(Page.GetType(),
"mykey", "CloseAndReload();", True)
to close the radwindow and refresh the main grid.
It all works fine if I remove the AJAX.
UPDATE
The button event does fire, but its the
ClientScript.RegisterStartupScript(Page.GetType(),
"mykey", "CloseAndReload();", True) that does not.
Andy
7 Answers, 1 is accepted
0
Hello Andy,
Please note that adding hidden controls to the RadAjaxManager settings is unsupported scenario. In order to have the application works properly you should wrap the hidden controls into always visible panel.
I hope this helps.
Greetings,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please note that adding hidden controls to the RadAjaxManager settings is unsupported scenario. In order to have the application works properly you should wrap the hidden controls into always visible panel.
I hope this helps.
Greetings,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy Green
Top achievements
Rank 1
answered on 27 Apr 2010, 08:04 AM
I've tried that and it still wont run the ClientScript.Register ... code.
Here is my new markup:
Andy
Here is my new markup:
<asp:Panel ID="pnlHiddenContainer" runat="server"> |
<asp:Panel ID="pnlDetails" runat="server" CssClass="PatientDetails" Visible="false"> |
<asp:Literal ID="ltlDetails" runat="server"></asp:Literal> |
<asp:Button ID="btnConfirm" runat="server" Text="Confirm" TabIndex="12" CssClass="formbtnL"/> |
</asp:Panel> |
</asp:Panel> |
Andy
0
Hi Andy,
Sincerely yours,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please confirm that you have also changed the RadAjaxSettings, so the always visible pnlHiddenContainer is added as target control.
Sincerely yours,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy Green
Top achievements
Rank 1
answered on 27 Apr 2010, 01:42 PM
Hi
Yes it is, the panel updates from the grid (as before the hidden panel updated from the grid ok)
Its the :
Here is my Rad Ajax markup.
And here is the portion of my btnConfirm_Click:
ANdy
Yes it is, the panel updates from the grid (as before the hidden panel updated from the grid ok)
Its the :
ClientScript.RegisterStartupScript(Page.GetType(),
"mykey", "CloseAndReload();", True) that wont run from the btnConfirm_click event. The btnConfirm is inside the hidden panel inside the container panel.
Here is my Rad Ajax markup.
<telerik:RadAjaxManager ID="AjaxManager" runat="server"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="btnLookup"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="pnlHiddenContainer" /> |
<telerik:AjaxUpdatedControl ControlID="lblStatus" /> |
<telerik:AjaxUpdatedControl ControlID="lblGridStatus" /> |
<telerik:AjaxUpdatedControl ControlID="gridResults" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="gridResults"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="pnlHiddenContainer" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
And here is the portion of my btnConfirm_Click:
Protected Sub btnConfirm_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnConfirm.Click |
Try |
Dim c As New Referral |
Dim OKt = c.ConfirmReferral(...Params...) |
If OKt Then |
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndReload();", True) |
Else |
Me.lblStatus.Visible = True |
Me.lblStatus.Text = "Save Failed" |
End If |
Catch ex As Exception |
lblStatus.Text = "Save failed " & ex.Message |
End Try |
End Sub |
ANdy
0
Hi Andy,
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please review the following help topic which elaborates on executing java script after ajax request. Test the provided solution and let us know if this helps.
Greetings,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rafaga2k
Top achievements
Rank 1
answered on 15 Dec 2010, 09:49 PM
i have the same problem (1st post) and tried to make a panel to group a raddock that is closed but no success
which is the rigth ajax setting?
my problem with hidden fields and buttons was onClientClick event was returning true
<
asp:Panel
ID
=
"usrdockpanel"
runat
=
"server"
>
<
telerik:RadDock
ID
=
"RadDock1"
runat
=
"server"
Width
=
"400px"
Closed
=
"True"
Style
=
"z-index: 2410;"
>
<
ContentTemplate
>
<!-- here is the Form Code (really not relevant) -->
<
div
class
=
"footer"
>
<
asp:Button
runat
=
"server"
ID
=
"cbtnGuardar"
Text
=
"Guardar"
OnClick
=
"SubmitButton_Click"
OnClientClick
=
"return hideForm()"
/>
<!-- This is the button that i want to capture the click -->
<
button
onclick
=
"javascript:hideForm();"
type
=
"button"
>
Cancelar</
button
>
</
div
>
</
ContentTemplate
>
</
telerik:RadDock
>
</
asp:Panel
>
Me
.RadAjaxManager1.AjaxSettings.AddAjaxSetting(
Me
.grd,
Me
.grd)
Me
.RadAjaxManager1.AjaxSettings.AddAjaxSetting(
Me
.grd,
Me
.usrdockpanel)
Me
.RadAjaxManager1.AjaxSettings.AddAjaxSetting(
Me
.usrdockpanel,
Me
.usrdockpanel)
Me
.RadAjaxManager1.AjaxSettings.AddAjaxSetting(
Me
.usrdockpanel,
Me
.grd)
which is the rigth ajax setting?
- i want that when a command button is pressed a raddock appears (i already did this)
- modify asp hidden fields via manager (Edit: I have solved this iusse)
- when button in raddock is pressed then the grid is updated
my problem with hidden fields and buttons was onClientClick event was returning true
0
Hi,
The setting in which the RadDock wrapper updates itself should handle the required functionality. As the described explanation is not enough to isolate the root cause of the issue you are facing , please open a regular support ticket and send us fully runnable application. Thus we will be able to debug it locally and advise you further.
Kind regards,
Maria Ilieva
the Telerik team
The setting in which the RadDock wrapper updates itself should handle the required functionality. As the described explanation is not enough to isolate the root cause of the issue you are facing , please open a regular support ticket and send us fully runnable application. Thus we will be able to debug it locally and advise you further.
Kind regards,
Maria Ilieva
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.