This is a migrated thread and some comments may be shown as answers.

Javascript error that I am confused about.

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ekjot
Top achievements
Rank 1
Ekjot asked on 20 Apr 2012, 07:07 PM
Hello I have the Grid from this example on my page: 

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

It was working fine but now everytime it loads it gives me a javascript error saying "RadGrid1_Command" is undefined and it shows me this line of code:




Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadGrid, {"ClientID":"ctl00_ContentPlaceHolder1_GridQtyDeduction","ClientSettings":{"AllowAutoScrollOnDragDrop":true,"ShouldCreateRows":true,"DataBinding":{},"Selecting":{"CellSelectionMode":0},"Scrolling":{},"Resizing":{},"ClientMessages":{},"KeyboardNavigationSettings":{"AllowActiveRowCycle":false,"EnableKeyboardShortcuts":true,"FocusKey":89,"InitInsertKey":73,"RebindKey":82,"ExitEditInsertModeKey":27,"UpdateInsertItemKey":13,"DeleteActiveRow":127,"ExpandDetailTableKey":39,"CollapseDetailTableKey":37},"Animation":{}},"Skin":"Hay","UniqueID":"ctl00$ContentPlaceHolder1$GridQtyDeduction","_activeRowIndex":"","_controlToFocus":"","_currentPageIndex":0,"_editIndexes":"[]","_embeddedSkin":true,"_gridTableViewsData":"[{\"ClientID\":\"ctl00_ContentPlaceHolder1_GridQtyDeduction_ctl00\",\"UniqueID\":\"ctl00$ContentPlaceHolder1$GridQtyDeduction$ctl00\",\"PageSize\":15,\"PageCount\":1,\"EditMode\":\"InPlace\",\"AllowPaging\":true,\"CurrentPageIndex\":0,\"VirtualItemCount\":0,\"AllowMultiColumnSorting\":false,\"AllowNaturalSort\":true,\"AllowFilteringByColumn\":false,\"PageButtonCount\":10,\"HasDetailTables\":false,\"PagerAlwaysVisible\":false,\"changePageSizeComboBoxTopClientID\":\"ctl00_ContentPlaceHolder1_GridQtyDeduction_ctl00_ctl02_ctl01_PageSizeComboBox\",\"changePageSizeComboBoxClientID\":\"ctl00_ContentPlaceHolder1_GridQtyDeduction_ctl00_ctl03_ctl02_PageSizeComboBox\",\"IsItemInserted\":false,\"clientDataKeyNames\":[\"TranDet_ID\"],\"_dataBindTemplates\":false,\"_selectedItemStyle\":\"\",\"_selectedItemStyleClass\":\"rgSelectedRow\",\"_columnsData\":[{\"UniqueName\":\"rprodcode\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"rprodcode\",\"ReadOnly\":true,\"Display\":true},{\"UniqueName\":\"rname\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"rname\",\"ReadOnly\":true,\"Display\":true},{\"UniqueName\":\"pack_qty_req_for_packing\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"pack_qty_req_for_packing\",\"ReadOnly\":true,\"Display\":true},{\"UniqueName\":\"pack_qty_req_for_packing_unit\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"pack_qty_req_for_packing_unit\",\"ReadOnly\":true,\"Display\":true},{\"UniqueName\":\"label_qty\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"label_qty\",\"Display\":true},{\"UniqueName\":\"label_claim_unit\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"label_claim_unit\",\"Display\":true},{\"UniqueName\":\"qty_reqd_per_dosage_unit\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"qty_req_per_dosage_unit\",\"Display\":true},{\"UniqueName\":\"Qty_reqd_per_dosage_unit_UNIT\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"Qty_reqd_per_dosage_unit_UNIT\",\"Display\":true},{\"UniqueName\":\"RM_assay\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"RM_assay\",\"Display\":true},{\"UniqueName\":\"perc_overage\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"perc_overage\",\"Display\":true},{\"UniqueName\":\"adj_qty_per_dos_unit\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"adj_qty_per_dos_unit\",\"Display\":true},{\"UniqueName\":\"perc_in_form\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"perc_in_form\",\"Display\":true},{\"UniqueName\":\"pot_as_is\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"pot_as_is\",\"Display\":true},{\"UniqueName\":\"qty_req_for_std_kg\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"qty_req_for_std_kg\",\"Display\":true},{\"UniqueName\":\"qty_req_for_order_kg\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"qty_req_for_order_kg\",\"Display\":true},{\"UniqueName\":\"receiving_no\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.String\",\"DataField\":\"receiving_no\",\"Display\":true},{\"UniqueName\":\"pack_qty_tot_qty_used\",\"Resizable\":true,\"Reorderable\":true,\"Selectable\":true,\"Groupable\":true,\"ColumnType\":\"GridTemplateColumn\",\"DataTypeName\":\"System.Decimal\",\"DataField\":\"pack_qty_tot_qty_used\",\"Display\":true}]}]","_loadingText":"Loading...","_masterClientID":"ctl00_ContentPlaceHolder1_GridQtyDeduction_ctl00","_readyText":"Ready","_shouldFocusOnPage":false,"_statusLabelID":"ctl00_ContentPlaceHolder1_GridQtyDeduction_ctl00_ctl03_ctl02_statusPanel","allowMultiRowSelection":false,"clientStateFieldID":"ctl00_ContentPlaceHolder1_GridQtyDeduction_ClientState"}, {"command":RadGrid1_Command,"rowClick":RowClick,"rowCreated":RowCreated,"rowDestroying":RowDestroying}, null, $get("ctl00_ContentPlaceHolder1_GridQtyDeduction"));
});

Can anyone explain what that means? I am not sure how to go about fixing it. Thanks.

1 Answer, 1 is accepted

Sort by
0
Ekjot
Top achievements
Rank 1
answered on 20 Apr 2012, 07:26 PM
Nevermind. Sorry I had forgotten a bracket somewhere and now it's all working. Problem Solved
Tags
Grid
Asked by
Ekjot
Top achievements
Rank 1
Answers by
Ekjot
Top achievements
Rank 1
Share this question
or