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

RadButton doesn't work

10 Answers 649 Views
Button
This is a migrated thread and some comments may be shown as answers.
Gary Meagher
Top achievements
Rank 1
Gary Meagher asked on 10 Nov 2010, 11:22 PM
1 ) Switching from:
<asp:Button ID="btnLookup" runat="server" Text="Lookup"  onclientclick="ShowLookupForm();" />
to RadButton:
<telerik:RadButton ID="Button1" runat="server" Text="Lookup"  AutoPostBack="false"
                     onclientclick="ShowLookupForm();"  >
                     <Icon PrimaryIconCssClass="rbSearch" PrimaryIconLeft="4" PrimaryIconTop="4"/>
                     </telerik:RadButton>
doesn't do anything when you click.
2) RadButton  doesn't work as Page.Form.DefaultButton when you press the enter key.

10 Answers, 1 is accepted

Sort by
0
Gary Meagher
Top achievements
Rank 1
answered on 10 Nov 2010, 11:56 PM
The issue was RadButton is using OnClientClicked instead of OnClientClick. Very annoying.
0
Gary Meagher
Top achievements
Rank 1
answered on 11 Nov 2010, 12:21 AM
Problem No. 2 is still valid
RadButton  doesn't work as Page.Form.DefaultButton when you press the enter key.
0
Cori
Top achievements
Rank 2
answered on 12 Nov 2010, 03:17 PM
Hello Gary,

I've noticed that you set AutoPostback to false, meaning it's working like a client-side button. So I would assume it doesn't mark the button as a submit button.

Try and turn it to true and see if works correctly.
0
Georgi Tunev
Telerik team
answered on 12 Nov 2010, 03:45 PM
Hello guys,

We recognize this as a bug in RadButton and it will be fixed for the next Service Pack. I attached a sample page with the fix that you can use with the current version.

Gary, thank you for bringing this problem to our attention - your points were updated.

Kind regards,
Georgi Tunev
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
Adriano
Top achievements
Rank 1
answered on 15 Nov 2010, 09:21 PM
Hello everyone!

I´m having a problem with an ajaxfied RadButton and TextBox

The RadButton ajax server-side event click is not updating a TextBox´s Text property.

A sample code is below.

ASPX
Default.aspx

<%@ Page Language="C#" ValidateRequest="false" EnableEventValidation="false" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head id="Head1" runat="server"><title></title>
     
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="radScriptManager" runat="server">
    </telerik:RadScriptManager>      
     
    <telerik:RadAjaxManager ID="radAjaxManager" runat="server" >
        <AjaxSettings>
          
            <telerik:AjaxSetting AjaxControlID="button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="textBox1" />                   
                </UpdatedControls>
            </telerik:AjaxSetting>           
          
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    <div>
        <asp:TextBox ID="textBox1" runat="server"></asp:TextBox>
        <telerik:RadButton ID="button1" runat="server" OnClick="ClickTest"></telerik:RadButton>
    </div>   
     
    </form>
</body>
</html>


-----------------------------------------------------------------------------------------------------------------------------

C#
Default.aspx.cs

using System;
 
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void ClickTest(object sender, EventArgs e)
    {
        textBox1.Text = "Sample string";       
    }
}


Kind regards,


Adrian
0
Stuart Hemming
Top achievements
Rank 2
answered on 16 Nov 2010, 01:14 AM
That is odd. 

I added a regular button to the page and ajaxified that and noticed (although it could be a red herring) that when the cursor is over the asp:Button IE's statusbar is blank but when it's over the RadButton the status bar displays "default.aspx".

-- 
Stuart
0
Pero
Telerik team
answered on 16 Nov 2010, 06:15 PM
Hello,

@Adrian
We know about this issue, and it will be fixed for the upcoming release. More information and solution can be found here: http://www.telerik.com/community/forums/aspnet-ajax/button/problem-with-radajaxmanager-and-radbutton.aspx.

@Stuart
This is expected, because the RadButton control is rendered as input type="submit" by default. If you create ASP.NET Button with UseSubmitBehavior="true" you will observe the same behavior.

Sincerely yours,
Pero
the Telerik team
Browse the vast support resources we have to jumpstart 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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 16 Nov 2010, 06:59 PM
Pero,

Thanks for the update.

-- 
Stuart
0
Gary Meagher
Top achievements
Rank 1
answered on 16 Nov 2010, 07:18 PM
Hi Georgi,

Thanks. the solution did not work in IE6. I replied in another thread with a video and source.
0
Georgi Tunev
Telerik team
answered on 18 Nov 2010, 12:42 PM
Hi Gary,

I just answered in your other forum thread:
http://www.telerik.com/community/forums/aspnet-ajax/button/radbutton-doesn-t-work-as-page-form-defaultbutton.aspx


Sincerely yours,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jumpstart 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.
Tags
Button
Asked by
Gary Meagher
Top achievements
Rank 1
Answers by
Gary Meagher
Top achievements
Rank 1
Cori
Top achievements
Rank 2
Georgi Tunev
Telerik team
Adriano
Top achievements
Rank 1
Stuart Hemming
Top achievements
Rank 2
Pero
Telerik team
Share this question
or