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

How to Create new hotkey to access ItemCommand on RadGrid

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
hongnguyenx
Top achievements
Rank 1
hongnguyenx asked on 15 Sep 2010, 11:23 AM
HI all,
I'm using RadGid control (Q3 2009), I see RadGrid have support Keyboard mode for Insert, Update, Delete... comand. But in my project I don't want to use it,
I want to create new hotkey to access custom itemcommand  on Radgird, example:

......
<
telerik:GridTemplateColumn HeaderText="View">
     <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
     <ItemStyle Font-Bold="True" HorizontalAlign="Center"></ItemStyle>
     <ItemTemplate>
          <asp:ImageButton ID="imgView" runat="server" ImageUrl="~/Images/Edit.gif" CommandName="View" />
      </ItemTemplate>
</telerik:GridTemplateColumn>
.....

Follow  above code block example, How to create a hotkey that when I press it, RadGrid will call corresponding method with CommandName.
Please give me any idea for my problem...
Thnks so much for any help.

hongnguyenx

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 20 Sep 2010, 09:13 AM
Hello hongnguyenx,

RadGrid does not have such functionality. You can attach keypress/keydown handler on RadGrid element and handle manually the event. Inside that handler upon your custom logic you can trigger server command by calling fireCommand.

All the best,
Nikolay
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
Grid
Asked by
hongnguyenx
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or