<GridColumn field="listprice" title="List Price" align="right" :editable="true"> <template slot="edit" slot-scope="{row,rowIndex}"> ... </template></GridColumn>
<div class="datagrid-toolbar"> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <td><LinkButton iconCls="icon-add" :plain="true" @click="handleRemove">删除数据</LinkButton></td> </tr> </tbody> </table></div><DataGrid>.....</DataGrid>methods: { handleRemove() { // get cell row index }}
<DataGrid :data="data" :clickToEdit="true" selectionMode="cell" editMode="cell" style="height:250px" @editBegin="onEditBegin($event)">