Hi, since some days I sit here and have for me a big problem, because I am new with html, php and easyui datagrid, so I will post a piece of an example and I hope you can help me, because I donĀ“t find the answer how it works. I want to create a grid which load it contents from a database, this works.In the datagrid one column has to be a combobox. This comboxbox has also be filled out of a db and hast to be selected with the correponding item from the rest of the other data. This works not. And I dont know how to tell the datagrid that, if the user click into cell or becomes the focus, that editing start without pressing a edit button. Can you please!!! help me? I hope you understand my not so perfect english. Thanks a lot. Here now the code:
<div id="container" class="easyui-layout" fit="true"> <div region="center"> <table id="dgCustomers" toolbar="#toolbarCustomer" class="easyui-datagrid" fit="true" singleSelect="true" fitColumns="true" rowNumbers="false" pagination="true" url="<?= site_url('welcome/getcustomers') ?>" pageSize="25" pageList="[25,50,75,100,125,150,200]" nowrap="false"> <thead> <tr> <th field="customerNumber" width="80">Customer Number</th> <th field="customerName" width="100",editor:'text'>Name</th> <th field="contactFirstName" width="100">Contact First Name</th> <th field="contactLastName" width="100">Contact Last Name</th> <th field="phone" width="50",align:'right',editor:{type:'numberbox',options:{precision:1}}>Phone</th> <th field="addressLine1" width="100">First Address</th> <th field="addressLine2" width="100">Second Address</th> <th field="city" width="50">City</th> <th field="state" width="50,align:'center',editor:{type:'checkbox',options:on:'P',off:''}}">State</th> <th field="postalCode" width="50",align:'right',editor:'numberbox'>Postal Code</th> <th field="country" width="50">Country</th> </tr> </thead> </table> </div> </div>
|