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

RadTextBox on Hitting Enter key

1 Answer 335 Views
Input
This is a migrated thread and some comments may be shown as answers.
mn moule
Top achievements
Rank 1
mn moule asked on 08 Jul 2010, 01:44 PM
Hi friends,

i have two user controls in a page. in usercontrol1 i have binded an image and onclick of that image it will call an JS function which is used for deleting.
In usercontrol2 i have a search textbox whenever i type a string and hit enter it should undergo a search.
but a weird thing is happening and i dont know why it is happening.

when i enter a text and hit enter, the control flow calls the binding in the usercontrol1 which in turn calls the jS function.

Does anyone have any clue on this? please give me a clear picture on this.

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 08 Jul 2010, 04:11 PM
Hello Mn moule,

The easiest way to turn this behavior off is to add a hidden button and set it as a default button for your form:

Copy Code
<body>
    <form id="mainForm" runat="server" defaultbutton="MyDefaultButton">
    ...
    <asp:Button ID="MyDefaultButton" runat="server" Style="display: none;" OnClientClick="return false;" />
    ...
    </form>
</body>

I hope this helps

Greetings,
Martin
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
Input
Asked by
mn moule
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or