I'm working off of the following example to implement editing of a cell in my grid when the cell is clicked:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx
I'd like it to work just like in the example, but based on a single-click. I can't get it to work as I keep getting the following error buried away in Telerik.Web.UI.WebResource:
0x800a139e - Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The string was not recognized as a valid format.
If anyone can lend any assistance, I will you owe you my first-born, as I am pulling my hair out trying to get this to work.
Thank you
My markup is below:
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<!-- content start -->
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
var hasChanges, inputs, dropdowns, editedRow;
function RowClick(sender, eventArgs) {
if (editedRow && hasChanges) {
hasChanges = false;
if (confirm("Update changes?")) {
$find("<%= detailsGrid.ClientID %>").get_masterTableView().updateItem(editedRow);
}
}
}
function RowDblClick(sender, eventArgs) {
editedRow = eventArgs.get_itemIndexHierarchical();
$find("<%= detailsGrid.ClientID %>").get_masterTableView().editItem(editedRow);
}
function GridCommand(sender, args) {
if (args.get_commandName() != "Edit") {
editedRow = null;
}
}
function GridCreated(sender, eventArgs) {
var gridElement = sender.get_element();
var elementsToUse = [];
inputs = gridElement.getElementsByTagName("input");
for (var i = 0; i <
inputs.length
; i++) {
var
lowerType
=
inputs
[i].type.toLowerCase();
if (lowerType == "hidden" || lowerType == "button" || lowerType == "checkbox") {
continue;
}
if (inputs[i].id.indexOf("PageSizeComboBox") == -1) {
Array.add(elementsToUse, inputs[i]);
}
inputs[i]
.onchange
=
TrackChanges
;
}
setTimeout(function () { if (elementsToUse[0]) elementsToUse[0].focus(); }, 100);
}
function TrackChanges(e) {
hasChanges
=
true
;
}
</script>
</
telerik:RadCodeBlock
>
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
Skin
=
"Office2010Blue"
MultiPageID
=
"radPageViews"
SelectedIndex
=
"0"
Align
=
"Justify"
Width
=
"220px"
ReorderTabsOnSelect
=
"true"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"Details"
/>
<
telerik:RadTab
Text
=
"Summary"
/>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
runat
=
"server"
ID
=
"radPageViews"
SelectedIndex
=
"0"
CssClass
=
"multiPage"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"detailsGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"detailsGrid"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadGrid
ID
=
"detailsGrid"
runat
=
"server"
CellSpacing
=
"0"
Skin
=
"Office2007"
GridLines
=
"Vertical"
AllowSorting
=
"true"
AllowPaging
=
"true"
PageSize
=
"10"
AllowMultiRowSelection
=
"true"
OnNeedDataSource
=
"detailsGrid_NeedDataSource"
OnItemDataBound
=
"detailsGrid_ItemDataBound"
OnItemCreated
=
"detailsGrid_ItemCreated"
OnItemUpdated
=
"detailsGrid_ItemUpdated"
AllowAutomaticUpdates
=
"true"
>
<
ClientSettings
ReorderColumnsOnClient
=
"true"
Selecting-CellSelectionMode
=
"SingleCell"
>
<
Resizing
AllowColumnResize
=
"true"
EnableRealTimeResize
=
"true"
ShowRowIndicatorColumn
=
"true"
AllowResizeToFit
=
"true"
/>
<
ClientEvents
OnRowClick
=
"RowClick"
OnRowDblClick
=
"RowDblClick"
OnGridCreated
=
"GridCreated"
OnCommand
=
"GridCommand"
/>
</
ClientSettings
>
<
MasterTableView
TableLayout
=
"Fixed"
AutoGenerateColumns
=
"false"
DataKeyNames
=
"actualid"
ShowFooter
=
"true"
EditMode
=
"InPlace"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"135px"
Font-Bold
=
"true"
/>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"Exclude"
ItemStyle-HorizontalAlign
=
"Center"
HeaderStyle-Width
=
"80px"
>
<
ItemTemplate
>
<
asp:CheckBox
runat
=
"server"
ID
=
"ExcludeCheckBox"
AutoPostBack
=
"true"
Checked='<%# bool.Parse(Eval("Exclude").ToString()) %>'
OnCheckedChanged="ExcludeCheckBox_CheckedChanged" />
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridCheckBoxColumn
UniqueName
=
"detailsGridDeltaOppCol"
HeaderText
=
"Delta Opp"
DataField
=
"DeltaOpp"
ItemStyle-HorizontalAlign
=
"Center"
ItemStyle-Wrap
=
"false"
HeaderStyle-Width
=
"80px"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"detailsGridOppManagerCol"
HeaderText
=
"Opp Manager"
DataField
=
"FullName"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"detailsGridVerticalTeamCol"
HeaderText
=
"Vertical Team"
DataField
=
"VerticalTeam"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"detailsGridIndustryCol"
HeaderText
=
"Industry"
DataField
=
"Industry"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"detailsGridAccountCol"
HeaderText
=
"Account"
DataField
=
"Account"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"detailsGridOpportunityCol"
HeaderText
=
"Opportunity"
DataField
=
"OpportunityName"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridBoundColumn
UniqueName
=
"detailsGridSKUCol"
HeaderText
=
"SKU"
DataField
=
"ActualID"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridDateTimeColumn
UniqueName
=
"detailsGridFirstShipDateCol"
HeaderText
=
"First Ship Date"
DataField
=
"FirstShipDate"
DataFormatString
=
"{0:MM/dd/yyyy}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridQuantityCol"
HeaderText
=
"Quantity"
DataField
=
"Quantity"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridUnitPriceCol"
HeaderText
=
"Unit Price"
DataField
=
"UnitPrice"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridTotalCol"
HeaderText
=
"Total"
DataField
=
"Total"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridProbabilityCol"
HeaderText
=
"Probability"
DataField
=
"Probability"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0}%"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridDealerCol"
HeaderText
=
"Dealer"
DataField
=
"Dealer"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridScreenTypeCol"
HeaderText
=
"Screen Type"
DataField
=
"ScreenType"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridCompanyCol"
HeaderText
=
"Company"
DataField
=
"Company"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridFactoryCol"
HeaderText
=
"Factory"
DataField
=
"Factory"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridProductDescCol"
HeaderText
=
"Prod. Description"
DataField
=
"ProductDescription"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridProductFamilyCol"
HeaderText
=
"Product Family"
DataField
=
"ProductFamily"
ItemStyle-Wrap
=
"false"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthOneCol"
DataField
=
"MonthOne"
ItemStyle-HorizontalAlign
=
"Right"
ColumnEditorID
=
"numericColumnEditor"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthOneCostCol"
DataField
=
"MonthOneCost"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthTwoCol"
DataField
=
"MonthTwo"
ItemStyle-HorizontalAlign
=
"Right"
ColumnEditorID
=
"numericColumnEditor"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthTwoCostCol"
DataField
=
"MonthTwoCost"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthThreeCol"
DataField
=
"MonthThree"
ItemStyle-HorizontalAlign
=
"Right"
ColumnEditorID
=
"numericColumnEditor"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthThreeCostCol"
DataField
=
"MonthThreeCost"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthFourCol"
DataField
=
"MonthFour"
ItemStyle-HorizontalAlign
=
"Right"
ColumnEditorID
=
"numericColumnEditor"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthFourCostCol"
DataField
=
"MonthFourCost"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthFiveCol"
DataField
=
"MonthFive"
ItemStyle-HorizontalAlign
=
"Right"
ColumnEditorID
=
"numericColumnEditor"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthFiveCostCol"
DataField
=
"MonthFiveCost"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthSixCol"
DataField
=
"MonthSix"
ItemStyle-HorizontalAlign
=
"Right"
ColumnEditorID
=
"numericColumnEditor"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridMonthSixCostCol"
DataField
=
"MonthSixCost"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridTotalQtyCol"
HeaderText
=
"Total Qty."
DataField
=
"TotalQuantity"
ItemStyle-HorizontalAlign
=
"Right"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridTotalRevCol"
HeaderText
=
"Total Rev."
DataField
=
"TotalRevenue"
ItemStyle-HorizontalAlign
=
"Right"
DataFormatString
=
"{0:C2}"
ReadOnly
=
"true"
/>
<
telerik:GridNumericColumn
UniqueName
=
"detailsGridNextUserCol"
HeaderText
=
"Next User"
DataField
=
"NextUser"
ReadOnly
=
"true"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
telerik:GridNumericColumnEditor
ID
=
"numericColumnEditor"
runat
=
"server"
NumericTextBox-Width
=
"20px"
/>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageView2"
runat
=
"server"
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>