Hi,
I have a radgrid with a custom command bar (commanditemtemplate) with a few linkbuttons on it.
Also I have the radgrid ClientSettings AllowKeyboardNavigation="true" and KeyboardNavigationSettings AllowSubmitOnEnter="true"
When I move to the command bar with the TAB key and select a linkbutton (or use the associated AccessKey to select it immedeately), then use the ENTER key to fire the button, instead the selected record is opened for editing.
How can I skip the SubmitOnEnter when I have the linkbutton selected?
I tried the code below, it gets fired when the enter key is pressed, but still the record is selected instead of the command fired.
Any ideas?
Thanx in advance,
Regards,
Frank
I have a radgrid with a custom command bar (commanditemtemplate) with a few linkbuttons on it.
Also I have the radgrid ClientSettings AllowKeyboardNavigation="true" and KeyboardNavigationSettings AllowSubmitOnEnter="true"
When I move to the command bar with the TAB key and select a linkbutton (or use the associated AccessKey to select it immedeately), then use the ENTER key to fire the button, instead the selected record is opened for editing.
How can I skip the SubmitOnEnter when I have the linkbutton selected?
I tried the code below, it gets fired when the enter key is pressed, but still the record is selected instead of the command fired.
Any ideas?
Thanx in advance,
Regards,
Frank
Telerik.Web.UI.RadGrid.prototype._canHandleKeyboardAction = function (e) {
var keyCode = e.keyCode || e.charCode;
if ((keyCode == 32 || keyCode == 13)
&& this.ClientSettings.KeyboardNavigationSettings.EnableKeyboardShortcuts) {
var target = Telerik.Web.UI.Grid.GetCurrentElement(e);
if (target.tagName.toLowerCase() == "a") {
return false;
}
}
return true;
}