or


In the example shown for batch update in the below link, I used NeedDataSource event handler to bind the data to the grid and ItemDataBound to bind the DropDownLists. But I dont see the DropDownList getting populated may be due to the dropdownlist's style property Style="display: none". And the function HideEditor never gets executed becuase the variable 'colName' is null. Do I have to use SqlDataSource only to get this working?
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultvb.aspx
Appreciate your help!!
Neelima
function UpdateValues(grid) { //determine the name of the column to which the edited cell belongs var tHeadElement = grid.get_element().getElementsByTagName("thead")[0]; var headerRow = tHeadElement.getElementsByTagName("tr")[0]; var colName = grid.get_masterTableView().getColumnUniqueNameByCellIndex(headerRow, editedCell.cellIndex); //based on the column name, extract the value from the editor, update the text of the label and switch its visibility with that of the column //column. The update happens only when the column editor value is different than the non-editable value. We also set dashed border to indicate //that the value in the cell is changed. The logic is isolated in the HideEditor js method switch (colName) { case "Start_Dt": HideEditor(editedCell, "textbox"); break; case "PickupAddr1": HideEditor(editedCell, "textbox"); break; case "TypeOfFare": HideEditor(editedCell, "textbox"); break; default: break; } }function HideEditor(editCell, editorType) { //get reference to the label in the edited cell var lbl = editCell.getElementsByTagName("span")[0]; switch (editorType) { case "textbox": var txtBox = editCell.getElementsByTagName("input")[0]; if (lbl.innerHTML != txtBox.value) { lbl.innerHTML = txtBox.value; editCell.style.border = "1px dashed"; StoreEditedItemId(editCell); } txtBox.style.display = "none"; break; case "checkbox": var chkBox = editCell.getElementsByTagName("input")[0]; if (lbl.innerHTML.toLowerCase() != chkBox.checked.toString()) { lbl.innerHTML = chkBox.checked; editedCell.style.border = "1px dashed"; StoreEditedItemId(editCell); } chkBox.style.display = "none"; editCell.getElementsByTagName("span")[1].style.display = "none"; break; case "dropdown": var ddl = editCell.getElementsByTagName("select")[0]; var selectedValue = ddl.options[ddl.selectedIndex].value; if (lbl.innerHTML != selectedValue) { lbl.innerHTML = selectedValue; editCell.style.border = "1px dashed"; StoreEditedItemId(editCell); } //if the form decorator was enabled, hide the decorated dropdown instead of the original. if (ddl.className == "rfdRealInput") ddl = Telerik.Web.UI.RadFormDecorator.getDecoratedElement(ddl); ddl.style.display = "none"; default: break; } lbl.style.display = "inline"; }protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e){ e.Day.IsSelectable = false;}function Calendar_OnDateSelecting(sender, args) { args.set_cancel(true); alert(args.get_renderDay().get_isSelectable());}
