Nov 10, 2015, 12:17 PM
[CLOSED] How to implement RowEditing for newly added row in CellEditing GridPanel
Hi,
Can any one please give me the solution for the following criteria. Which is
I have a GridPanel with CellEditing Plugin
I was adding a new row on ViewReady listener like
Here the new row should be always editable.
My Grid looks like below
Thank you
Can any one please give me the solution for the following criteria. Which is
I have a GridPanel with CellEditing Plugin
I was adding a new row on ViewReady listener like
function onGridReady(item) {
var me = item,
view = me.view,
grid = me.view.up('gridpanel');
grid.store.insert(grid.store.getCount(), { });
var pos = grid.getStore().getCount() - 1;
grid.selModel.selectByPosition(pos);
// Here I just need to display entire new row as editable with Add button
// Below code is to edit the first cell of newly added row
grid.editingPlugin.startEdit(pos, 0);
}
I have tried from StartEdit and startEditByPosition as well. But these 2 methods to edit the Cells only, not for the entire row.Here the new row should be always editable.
My Grid looks like below
<ext:GridPanel ID="gridExample" runat="server" StoreID="storeExample" Border="true" Height="100" Scroll="Both" Layout="FitLayout">
<ColumnModel ID="ColumnModel2" runat="server">
<Columns>
<ext:ImageCommandColumn ID="columnGo" runat="server" Align="Right" Text="" Hideable="true" Width="25">
<Commands>
<ext:ImageCommand CommandName="GotoPage" Icon="PageWhiteGo" Text="" Style="margin: 1px 1px 0px 2px !important">
<ToolTip Text="Go to Page" />
</ext:ImageCommand>
</Commands>
<PrepareCommand Fn="gotoPageCommand" />
</ext:ImageCommandColumn>
<ext:Column runat="server" ID="Column12" DataIndex="Type" Text="Type" Flex="1">
<Editor>
<ext:ComboBox ID="cboType" runat="server" StoreID="storeType" DisplayField="Display" ValueField="Display">
</ext:ComboBox>
</Editor>
</ext:Column>
<ext:Column runat="server" ID="Column11" DataIndex="FirstName" Text="First Name" Flex="1" EmptyCellText="First Name">
<Editor>
<ext:TextField ID="TextField5" runat="server">
</ext:TextField>
</Editor>
</ext:Column>
..............................
</Columns>
</ColumnModel>
<View>
<ext:GridView ID="GridView2" runat="server" StripeRows="true" TrackOver="false" />
</View>
<Plugins>
<ext:CellEditing ClicksToEdit="1">
</ext:CellEditing>
</Plugins>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
<Listeners>
<ViewReady Handler="onGridReady(this);" />
</Listeners>
</ext:GridPanel>
Thank you
Last edited by Daniil; Nov 17, 2015 at 11:02 AM.
Reason: [CLOSED]