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

ASP Panel not showing on clicking asp button in radGrid GridTemplateColumn

5 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 16 Oct 2008, 07:19 PM
I have a GridTemplateColumn that has 3 asp buttons all with CommandNames. when clicked, they fire the ItemCommand of the radGrid. I then check  CommandName to see which buttonw as pressed and call some code. In the code I call, at one point I want to show an asp panel that previsously was .Visible=False , so I do the following

Panel1.Visible = True  



but the panel never gets shown. I am using the AjaxManager and have set
<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
<rad:AjaxSetting AjaxControlID="radGrid1">
<
UpdatedControls><rad:AjaxUpdatedControl ControlID="radGrid1" LoadingPanelID="AjaxLoadingPanel"><rad:AjaxUpdatedControl ControlID="Panel1">
</UpdatedControls>
</rad:AjaxSetting>

<
/rad:RadAjaxManage>



and just on the page, i have
 
<asp:Panel ID="Panel1" runat="server" Height="230px" Width="415px" class="dialogBox">
<h4>
Do you wish to Continue?</h4><asp:Label ID="Label1" runat="server">Some Text</asp:Label>
<asp:Button 
runat="server" ID="btnContinue" Text="Continue" CssClass="button"><asp:Button runat="server" ID="btnCancel" Text="Cancel" CssClass="button">
</asp:Panel>


What am I doing wrong? Thanks...

5 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 20 Oct 2008, 12:28 PM
Hi Paul,

Please, ensure that the grid is an initiator to ajaxify the panel, in the ajax settings on the page. This will eliminate the erroneous behavior.

All the best,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Paul
Top achievements
Rank 1
answered on 20 Oct 2008, 12:58 PM
"ensure that the grid is an initiator to ajaxify the panel"

maybe i'm a little confused, but aren't the following lines of code that i previously posted, are what makes the radGrid the "initiator to ajaxify the panel" ?

<rad:AjaxSetting AjaxControlID="radGrid1"
<UpdatedControls><rad:AjaxUpdatedControl ControlID="radGrid1" LoadingPanelID="AjaxLoadingPanel"><rad:AjaxUpdatedControl ControlID="Panel1"
</UpdatedControls> 
 
I also have radGrid's attribute "EnableAJAX" set to true. I'm not sure what else I would need to "ensure the grid is an initiator to ajaxify the panel" ?  I also opened up the property builder for the AjaxManager control and verified my radGrid is checked as an initiator and that the panel is correctly checked as the control to be updated by the radGrid. Thanks.
0
Accepted
Yavor
Telerik team
answered on 20 Oct 2008, 02:24 PM
Hi Paul,

Attached to this message, is a small application, which handles a similar setup.
Give it a try and let me know how it goes.

Best wishes,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Paul
Top achievements
Rank 1
answered on 21 Oct 2008, 05:25 PM
Yavor,

thanks for your prompt response and for the sample application. I still do not know what was the problem with my page, however, I stripped out the AjaxManager's attributes and RadGrid's attributes and slowly re-added them, and also remove and re-added any Ajax ControlID's and UpdateControls, and now it seems to be working properly. I greatly appreciated how simple the attached sample app was and how legible it was.

Thanks again.
0
Yavor
Telerik team
answered on 22 Oct 2008, 06:05 AM
Hello Paul,

I am glad that the setup is working at your end now. One possible cause may have been that the panel is hidden with visible=false, in which case it cannot be properly ajaxified. At any rate, it is good that the problem is addressed, and I hope it meets your requirements well.

Sincerely yours,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Paul
Top achievements
Rank 1
Share this question
or