Hi. I'm trying to show the inplace edit template of a detail table 1 level down from the MasterTableView and I'm having difficulties. I've tried using the example at..
http://www.telerik.com/community/code-library/submission/b311D-keegd.aspx
but that seems to not work with the Prometheus Grid. I've also tried modifying the code sample on the demos page for double click editing but that is only for non hierarchy grids.
Here is the current script for non hierarchy grids that I am trying to use. Can anybody give me any suggestions on how to make this work?
Thanks
http://www.telerik.com/community/code-library/submission/b311D-keegd.aspx
but that seems to not work with the Prometheus Grid. I've also tried modifying the code sample on the demos page for double click editing but that is only for non hierarchy grids.
Here is the current script for non hierarchy grids that I am trying to use. Can anybody give me any suggestions on how to make this work?
Thanks
| <script type="text/javascript"> |
| <!-- |
| var hasChanges, inputs, dropdowns, editedRow; |
| function RowClick(sender, eventArgs) |
| { |
| if(editedRow != null && hasChanges) |
| { |
| if(confirm("Update changes?")) |
| { |
| hasChanges = false; |
| $find("<%= grdChecklist.MasterTableView.ClientID %>").updateItem(editedRow); |
| } |
| else |
| { |
| hasChanges = false; |
| } |
| } |
| } |
| function RowDblClick(sender, eventArgs) |
| { |
| if(editedRow && hasChanges) |
| { |
| if(confirm("Update changes?")) |
| { |
| hasChanges = false; |
| $find("<%= grdChecklist.MasterTableView.ClientID %>").updateItem(editedRow); |
| } |
| else |
| { |
| hasChanges = false; |
| } |
| } |
| editedRow = eventArgs.get_itemIndexHierarchical(); |
| $find("<%= grdChecklist.MasterTableView.ClientID %>").editItem(editedRow); |
| } |
| function GridCreated(sender, eventArgs) |
| { |
| var gridElement = sender.get_element(); |
| var elementsToUse = []; |
| inputs = gridElement.getElementsByTagName("input"); |
| for (var i = 0; i < inputs.length;i++) |
| { |
| if(inputs[i].type.toLowerCase() == "hidden") |
| { |
| continue; |
| } |
| Array.add(elementsToUse, inputs[i]); |
| inputs[i].onchange = TrackChanges; |
| } |
| dropdowns = gridElement.getElementsByTagName("select"); |
| for (var i = 0; i < dropdowns.length;i++) |
| { |
| dropdowns[i].onchange = TrackChanges; |
| } |
| setTimeout(function(){if(elementsToUse[0])elementsToUse[0].focus();},100); |
| } |
| function TrackChanges(e) |
| { |
| hasChanges = true; |
| } |
| --> |
| </script> |