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

Telerik Data Grid Button Issue with enter key press from the keyboard

1 Answer 167 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ankammarao
Top achievements
Rank 1
ankammarao asked on 10 Jan 2011, 05:27 PM
Hi,

I am using telerik <telerik:GridButtonColumn UniqueName="Remove" ImageUrl="Images/delete.gif" ButtonType="ImageButton" CommandName="Delete" ItemStyle-Width="10%" HeaderStyle-Width="10%" HeaderText="Remove">inside the my RadGrid and also using <telerik:RadTextBox ....> <ClientEvents OnButtonClick="checkBEEmail" /></telerik:RadTextBox>

I have entered some text into Rad textbox and when try to press enter key from keyboard , by deafult my datagrid Delete button is firing

I have tried to put some default button in side the my Radgrid, but its not working. Can you please sugget any ideas

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jan 2011, 07:37 AM
Hello Ankammarao,

I was unable to recreate the issue at my end and one suggestion is canceling the event by attaching the client event OnKeyPress to the RadTextBox. Here is the sample code.

Javascript:
function OnKeyPress(sender, args)
     {
        if (args.get_keyCode() == '13')
            args.set_cancel(true);
    }

Shinu.
Tags
General Discussions
Asked by
ankammarao
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or