Everything was working but all of a sudden I am getting the following error on a radgrid in batch edit mode.
Unhandled exception at line 148, column 38 in http://aspnet-scripts.telerikstatic.com/ajaxz/2013.2.717/Grid/GridBatchEditingScripts.js
<telerik:RadGrid ID="dgCompGrid" runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False" BorderStyle="Solid" CellSpacing="0" GridLines="None" Skin="Sitefinity" Width="100%">
<ExportSettings>
<Pdf>
<PageHeader>
<LeftCell Text="" />
<MiddleCell Text="" />
<RightCell Text="" />
</PageHeader>
<PageFooter>
<LeftCell Text="" />
<MiddleCell Text="" />
<RightCell Text="" />
</PageFooter>
</Pdf>
</ExportSettings>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView AllowNaturalSort="False" EditMode="Batch" BatchEditingSettings-OpenEditingEvent ="DblClick" >
<BatchEditingSettings EditType="Row" />
</MasterTableView>
<MultiHeaderItemStyle Wrap="False" />
<ItemStyle Wrap="False" />
</telerik:RadGrid>
VB CODE BEHIND ==========================================================
Public Sub Load_Component_NonGrid(ByVal iCompID As Int32, Init As Boolean)
If iCompID > 0 Then
With dgCompNonGrid
.Columns.Clear()
.DataSource =
Nothing
.DataSource = ippService.PlanDetails(iCompID)
.MasterTableView.DataKeyNames =
New String() {"ippComponentID", "ippComponentSeq"}
End With
End If
Dim boundColumn As GridBoundColumn
boundColumn =
New GridBoundColumn()
dgCompNonGrid.MasterTableView.Columns.Add(boundColumn)
With boundColumn
.DataField =
"ippComponentSrcValue"
.UniqueName =
"dgippComponentSrcValue"
.Display =
True
.HeaderText =
"Value"
.ItemStyle.Font.Size = 8
.HeaderStyle.Font.Bold =
True
.HeaderStyle.ForeColor =
Color.Black
.HeaderStyle.BackColor =
Color.White
.ReadOnly =
False
.ItemStyle.HorizontalAlign =
HorizontalAlign.Left
End With
boundColumn =
New GridBoundColumn()
dgCompNonGrid.MasterTableView.Columns.Add(boundColumn)
With boundColumn
.DataField =
"ippComponentBonusPct"
.UniqueName =
"dgippComponentBonusPct"
.Display =
True
.HeaderText =
"Bonus %"
.ItemStyle.Font.Size = 8
.HeaderStyle.Font.Bold =
True
.HeaderStyle.ForeColor =
Color.Black
.HeaderStyle.BackColor =
Color.White
.ReadOnly =
False
.ItemStyle.HorizontalAlign =
HorizontalAlign.Left
End With
Dim oDeleteColumn As New GridButtonColumn
dgCompNonGrid.MasterTableView.Columns.Add(oDeleteColumn)
With oDeleteColumn
.UniqueName =
"DeleteColumn"
.HeaderText =
"Remove"
.ItemStyle.Font.Size = 8
.HeaderStyle.Font.Bold =
True
.ButtonType =
GridButtonColumnType.ImageButton
.ImageUrl =
"~/Images/style7/cancel.gif"
.Display =
True
.CommandName =
"Delete"
.CommandArgument =
"Delete"
.ConfirmText =
"Delete this increment?"
.ConfirmDialogType =
GridConfirmDialogType.RadWindow
.ItemStyle.HorizontalAlign =
HorizontalAlign.Left
.HeaderStyle.Font.Bold =
True
.HeaderStyle.ForeColor =
Color.Black
.HeaderStyle.BackColor =
Color.White
End With
With dgCompNonGrid.MasterTableView
.CommandItemDisplay =
GridCommandItemDisplay.Bottom
.BatchEditingSettings.EditType =
GridBatchEditingType.Row
.CommandItemSettings.ShowRefreshButton =
False
End With
End Sub
If I set the <BatchEditingSettings EditType="Cell" /> then it works but when set to row I get the error above? Soon as I doubleClick on the row to edit. All the data loads just fine and even the Delete works. The Edit and Add New causes the error. Its like it is not putting the grid into EDIT mode when I BatchEditingSettings-OpenEditingEvent ="DblClick" ?
thanks.