EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
October 10, 2024, 11:11:43 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
Laravel Row selection not working when cell editing enable
Pages: [
1
]
« previous
next »
Print
Author
Topic: Laravel Row selection not working when cell editing enable (Read 6805 times)
dewan
Newbie
Posts: 24
Laravel Row selection not working when cell editing enable
«
on:
November 17, 2018, 05:26:24 AM »
Laravel Row selection not working when cell editing enable. I want to delete a record but it always say
Warning
No record is selected. My code is as below
@extends('layouts/main')
@section('content')
<div class="col-sm-12" id="download" style="margin-bottom: 5px;margin-left:0px;margin-top: 8px">
<a href="{{ URL::to('/products/downloadExcel/xlsx') }}">
<button class="btn btn-success btn-sm">
<span class="glyphicon glyphicon-download"></span> Download
</button>
</a>
</div>
{{-- <div class="row" id="grid_view">
<div class="col-sm-12" style="margin-bottom: 10px;margin-left:10px;">
{!! $phpgrid_output !!}
<script>
$.ajaxSetup({headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}});
</script>
</div>
</div>--}}
<div class="continer">
<div id="tb" style="padding:3px">
<span>Item ID:</span>
<input id="item_id" style="line-height:26px;border:1px solid #ccc">
<a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">Search</a>
</div>
<table id="tt" class="easyui-datagrid"
data-options="
loadFilter: function(data){
if (data.total && data.rows){
return data;
} else {
return {
total:data.total,
rows:data.data
};
}
}
"
method="get"
rownumbers="true"
fitColumns="true"
singleSelect="true"
resizeEdge="true"
nowrap="true"
title="Product Master"
pagination="true"
toolbar="#toolbar"
idField="id"
style="width:100%;height:600px;margin-right: auto">
<thead>
<tr>
<th field="item_id" width="50" editor="{type:'validatebox',options:{required:true}}">ItemId</th>
<th field="name" width="50" editor="text">Name</th>
<th field="description" width="50" editor="text">Description</th>
<th field="unit" width="50" editor="text">Unit</th>
<th field="price" width="50" editor="text">Price</th>
<th field="item_group" width="50" editor="text">ItemGroup</th>
<th field="price_group" width="50" editor="text">PriceGroup</th>
<th field="tax_code" width="50" editor="text">TaxCode</th>
<th field="tax_percent" width="50" editor="text">TaxPercent</th>
<th field="discount_amount" width="50" editor="text">DiscountAmount</th>
<th field="discount_percent" width="50" editor="text">DiscountPercent</th>
<th field="image" width="50" editor="text">Image</th>
<th field="barcode" width="50" editor="text">Barcode</th>
<th field="company_id" width="50" editor="text">CompanyId</th>
<th field="sync" width="50" editor="text">Sync</th>
</tr>
</thead>
</table>
<div id="toolbar">
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true"
onclick="javascript:$('#tt').edatagrid('addRow')">New</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"
onclick="javascript:$('#tt').edatagrid('destroyRow')">Destroy</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true"
onclick="javascript:$('#tt').edatagrid('saveRow')">Save</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true"
onclick="javascript:$('#tt').edatagrid('cancelRow')">Cancel</a>
</div>
</div>
@stop
@section('javascript')
<script>
function doSearch() {
$('#tt').datagrid('load', {
item_id: $('#item_id').val()
});
}
$(function(){
$('#tt').edatagrid({
url:"product_master",
saveUrl: 'create_product_master',
updateUrl: 'update_product_master',
destroyUrl: 'destroy_product_master'
});
});
$(function () {
dg.datagrid('enableFilter');
dg.datagrid('enableCellEditing').datagrid('gotoCell', {
index: 0,
field: 'item_id'
});
});
</script>
@stop
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Laravel Row selection not working when cell editing enable
«
Reply #1 on:
November 17, 2018, 08:19:51 PM »
You should use either row editing or cell editing. Don't apply them together.
Logged
dewan
Newbie
Posts: 24
Re: Laravel Row selection not working when cell editing enable
«
Reply #2 on:
November 22, 2018, 04:22:43 AM »
thank you
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...