| function ClientTabSelecting(sender, eventArgs) |
| { |
| var tabStrip = sender; |
| var tab = eventArgs.Tab; |
| return confirm("Are you sure you want to navigate away from this page?"); |
| } |
<
telerik:RadTabStrip ID="RadTabStrip1" Width="100%" runat="server" Skin="Hay" OnClientTabSelecting="ClientTabSelecting" multipageid="RadMultiPage1" AutoPostBack="false" PerTabScrolling="true" ScrollButtonsPosition="Middle" />
| protected override void OnInit(EventArgs e) |
| { |
| base.OnInit(e); |
| RadTabStrip1.TabClick += new RadTabStripEventHandler(TabClicked); |
| } |
<telerik:GridTemplateColumn
UniqueName="TemplateEditColumn"
HeaderText="View/Edit"
HeaderStyle-Width="100">
<ItemTemplate>
<asp:ImageButton ID="EditButton" OnClientClick='<%# Eval("ID", "openEditCommentWindow({0}); return false;" ) %>' runat="server" ImageUrl="./images/edit.gif"></asp:ImageButton>
</ItemTemplate></telerik:GridTemplateColumn>
this is the jascript that it calls:
function openEditCommentWindow(CommentID)
{
var oWnd = radopen("CommentDetail.aspx?CommentID=" + CommentID, "Edit Comment");
oWnd.set_modal(
true);
oWnd.Center();
}
So my issue is that I am trying to build an application to minimize mouse use and generally use the keyboard support of the grid to place the grid into edit mode by setting
ClientSettings-AllowKeyboardNavigation="true"
whihc is a relly nice feature.
The problem is that pressing the enter key while having a row selected causes a postback to the radGridComments_ItemCommand rather than opening a client side radwindow.
How can I hook up the enter key to the openEditCommentWindow javascript function?
Thanks much
Jonathan