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

Default Button for asp:panel

4 Answers 123 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
kiran
Top achievements
Rank 1
kiran asked on 29 May 2009, 03:04 PM
Hi Friends,

i have 2 asp:Panel in the RadAjaxPanel with default buttons set for each panels
i just want know how to make the default button work when i focus to its appropriate textbox and press enter.
plzz help aspd

<telerik:RadScriptManager id="RadScriptManager1" runat="server" EnableTheming="True"></telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel id="RadAjaxLoadingPanel1" Runat="server" Transparency="30" style="background:url('../Images/LoadingTitle.gif') center center no-repeat #f3f3e2;"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="CMSRadAPan" runat="server" EnableHistory="True" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
<asp:Panel ID="pnl1" runat="server" defaultbutton="Button1" style="border:1px outset #abcdef;background-color:#abcdef">
 <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
 <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
 <asp:Button ID="Button1" runat="server" Text="Button1" OnClick="Button1_Click" />
</asp:Panel>

<asp:Panel ID="Panel1" runat="server" defaultbutton="Button2" style="border:1px outset #fedcba;background-color:#fedcba">   
 <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
 <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>    
 <asp:Button ID="Button2" runat="server" Text="Button2" OnClick="Button2_Click" />
</asp:Panel>

</telerik:RadAjaxPanel>


Thanks

 

 

 

 

4 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 01 Jun 2009, 09:04 AM
Hello kiran,

Indeed, when you want to set a DefaultButton to an ajaxified page, you could do it same way as you would without having ajax.
Could you confirm that the desired functionality works if you set the EnableAjax property of the RadAjaxPanel to false?

Sincerely yours,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Stephen
Top achievements
Rank 1
answered on 11 Aug 2010, 02:40 PM
Was there ever a solution for this?  I want to do something similar where I have a default button in one panel after a button has been selected in another, but focus is retained on the newly selected button. 
0
Maria Ilieva
Telerik team
answered on 12 Aug 2010, 04:06 PM
Hello Stephen,

 Could you please elaborate if you are using Ajax on the page. note that this scenario should be implemented the same way with or without Ajax.
If Ajax is used on the page you could suggest using the RadAjax Focus() method as described here.

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
Maria Ilieva
Telerik team
answered on 12 Aug 2010, 04:06 PM
Hello Stephen,

 Could you please elaborate if you are using Ajax on the page. Note that this scenario should be implemented the same way with or without Ajax.
If Ajax is used on the page you could suggest using the RadAjax Focus() method as described here.

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
Tags
Ajax
Asked by
kiran
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Stephen
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or