Hi,
I getting strange error on row edit.
1. I implemented inline row edit on double click. But the row is editing in "Form Template Edit Form". I want only inline line edit. How do it. I am doing something but I am unable to get it. Can anyone help me.
here is java script.
Radgrid
2. I want to give few columns to edit. For ex. i have columns a, b, c, d, e, f, g. When user double click on a row the user should get e, f, g columns to edit.
I getting strange error on row edit.
1. I implemented inline row edit on double click. But the row is editing in "Form Template Edit Form". I want only inline line edit. How do it. I am doing something but I am unable to get it. Can anyone help me.
here is java script.
function RowDblClick(sender, eventArgs) { |
editedRow = eventArgs.get_itemIndexHierarchical(); |
$find("<%= gvCktMap.MasterTableView.ClientID %>").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") { |
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); |
} |
Radgrid
<telerik:RadGrid ID="gvCktMap" BorderColor="White" runat="server" AutoGenerateColumns="true" |
AllowSorting="true" BackColor="White" AllowPaging="true" PageSize="25" GridLines="None" |
OnPageIndexChanging="gvCktMap_PageIndexChanging" OnRowCancelingEdit="gvCktMap_RowCancelingEdit" |
OnRowCommand="gvCktMap_RowCommand" OnRowUpdating="gvCktMap_RowUpdating" OnRowDataBound="gvCktMap_RowDataBound" |
OnSorting="gvCktMap_Sorting" OnRowEditing="gvCktMap_RowEditing" ShowGroupPanel="True" |
EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" |
AllowFilteringByColumn="True" AllowCustomPaging="false" OnItemCreated="gvCktMap_ItemCreated" |
EnableViewState="false" OnNeedDataSource="gvCktMap_NeedDataSource" OnItemUpdated="gvCktMap_ItemUpdated"> |
<MasterTableView DataKeyNames="sId"> |
</MasterTableView> |
<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> |
<ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" |
OnCommand="GridCommand" /> |
<Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
<Selecting AllowRowSelect="True"></Selecting> |
<Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" |
ResizeGridOnColumnResize="False"></Resizing> |
</ClientSettings> |
<GroupingSettings ShowUnGroupButton="true" /> |
<PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> |
</telerik:RadGrid> |
2. I want to give few columns to edit. For ex. i have columns a, b, c, d, e, f, g. When user double click on a row the user should get e, f, g columns to edit.