I'm trying to implement the radgrid keyboard navigation controls to a grid, but an unexpected error in firefox stopped releasing it.
i have a grid which is editable with keyboard controls. When you hit enter you enter edit mode and focus gets put on the proper field. If the user tabs over to the next field which is a combobox, it leaves that row in edit mode, and puts the row cursor on the row above the one you're on.
This does not happen in IE or Chrome. In another browser, it just does not update, and stays in edit mode.
I would like to have the row update, if not, then do nothing.
Any Ideas?
i have a grid which is editable with keyboard controls. When you hit enter you enter edit mode and focus gets put on the proper field. If the user tabs over to the next field which is a combobox, it leaves that row in edit mode, and puts the row cursor on the row above the one you're on.
This does not happen in IE or Chrome. In another browser, it just does not update, and stays in edit mode.
I would like to have the row update, if not, then do nothing.
Any Ideas?
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AutoGenerateColumns
=
"False"
GridLines
=
"None"
AutoGenerateEditColumn
=
"True"
OnInsertCommand
=
"RadGrid1_InsertCommand"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
OnEditCommand
=
"RadGrid1_EditCommand"
ShowFooter
=
"True"
OnItemCommand
=
"RadGrid1_ItemCommand"
DataMember
=
"DefaultView"
>
<
ClientSettings
AllowKeyboardNavigation
=
"True"
>
<
KeyboardNavigationSettings
AllowSubmitOnEnter
=
"True"
/>
</
ClientSettings
>
<
GroupPanel
Enabled
=
"False"
>
</
GroupPanel
>
<
MasterTableView
EditMode
=
"InPlace"
DataMember
=
"DefaultView"
ShowHeadersWhenNoRecords
=
"true"
CommandItemDisplay
=
"TopAndBottom"
DataKeyNames
=
"ID"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
></
CommandItemSettings
>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ItemID"
FilterControlAltText
=
"Filter ItemID column"
HeaderText
=
"ItemID"
ReadOnly
=
"True"
UniqueName
=
"ItemID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
DataField
=
"ItemDescription"
FilterControlAltText
=
"Filter ItemDescription column"
HeaderText
=
"ItemDescription"
SortExpression
=
"ItemDescription"
UniqueName
=
"ItemDescription"
>
<
EditItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblItemDescription"
Text='<%# Bind("ItemDescription") %>'></
asp:Label
>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblItemDescription"
Text='<%# Bind("ItemDescription") %>'></
asp:Label
>
</
ItemTemplate
>
<
InsertItemTemplate
>
<
telerik:RadComboBox
ID
=
"cboItem"
runat
=
"server"
DataSourceID
=
"ODSItems"
DataTextField
=
"Description"
DataValueField
=
"InventoryItemID"
SelectedValue='<%# Bind("ItemID") %>' OnSelectedIndexChanged="cboItem_SelectedIndexChanged" />
</
InsertItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"Collection"
FilterControlAltText
=
"Filter Collection column"
HeaderText
=
"Collection"
SortExpression
=
"Collection"
UniqueName
=
"Collection"
>
<
EditItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblCollection"
Text='<%# Bind("Collection") %>'></
asp:Label
>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblCollection"
Text='<%# Bind("Collection") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
DataField
=
"Location"
FilterControlAltText
=
"Filter Location column"
HeaderText
=
"Location"
SortExpression
=
"Location"
UniqueName
=
"Location"
>
<
EditItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblLocation"
Text='<%# Bind("Location") %>'></
asp:Label
>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblLocation"
Text='<%# Bind("Location") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter Quantity column"
HeaderText
=
"Quantity"
UniqueName
=
"Quantity"
DataField
=
"Quantity"
DefaultInsertValue
=
"0"
>
<
EditItemTemplate
>
<
telerik:RadNumericTextBox
runat
=
"server"
ID
=
"txtQuantity"
Text='<%# Bind("Quantity") %>' />
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator2"
runat
=
"server"
ErrorMessage
=
"*"
ControlToValidate
=
"txtQuantity"
ForeColor
=
"Red"
/>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblQuantity"
Text='<%# Bind("Quantity") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Unit"
SortExpression
=
"Unit"
UniqueName
=
"Unit"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblUnit"
Text='<%# Bind("Unit") %>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
ID
=
"cboUnit"
runat
=
"server"
DataSourceID
=
"ODSUnitList"
DataTextField
=
"UnitDescription"
DataValueField
=
"UnitValue"
SelectedValue='<%# Bind("UnitID") %>' />
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator1"
runat
=
"server"
ErrorMessage
=
"*"
ControlToValidate
=
"cboUnit"
ForeColor
=
"Red"
SetFocusOnError
=
"true"
Display
=
"Dynamic"
/>
</
EditItemTemplate
>
<
InsertItemTemplate
>
<
telerik:RadComboBox
ID
=
"cboUnit"
runat
=
"server"
DataSourceID
=
"ODSUnitList"
DataTextField
=
"UnitDescription"
DataValueField
=
"UnitValue"
/>
</
InsertItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Total"
SortExpression
=
"Total"
UniqueName
=
"Total"
DefaultInsertValue
=
"0"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblTotal"
Text='<%# Bind("Total") %>'></
asp:Label
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblTotal"
Text='<%# Bind("Total") %>'></
asp:Label
>
</
EditItemTemplate
>
<
FooterTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblOverallTotal"
Text='Total = <%= OverallTotal %>'></
asp:Label
>
</
FooterTemplate
>
</
telerik:GridTemplateColumn
>
<%-- <
telerik:GridBoundColumn
FilterControlAltText
=
"Filter CollectionID column"
HeaderText
=
"CollectionID"
UniqueName
=
"CollectionID"
DataField
=
"CollectionID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter LocationID column"
HeaderText
=
"LocationID"
UniqueName
=
"LocationID"
DataField
=
"LocationID"
>
</
telerik:GridBoundColumn
>--%>
<%--<
telerik:GridBoundColumn
FilterControlAltText
=
"Filter UnitID column"
HeaderText
=
"UnitID"
UniqueName
=
"UnitID"
DataField
=
"UnitID"
>
</
telerik:GridBoundColumn
>--%>
</
Columns
>
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"ItemID"
/>
</
SortExpressions
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>