Show Posts
|
Pages: [1]
|
2
|
General Category / EasyUI for jQuery / [SOLVED] Datagrid parameter to combobox field url
|
on: December 13, 2021, 03:38:19 AM
|
Hi, I have a datagrid and this combobox field :
<th field="idarticolo" width="250px" formatter="formatta" editor="{type:'combobox', options:{valueField:'id',textField:'offerta',url:'ajax/wsgetofferta.php',required:true}}">Articolo</th>
And this SELECT in HTML page:
<select name="firm" id="firm"> <option value="pippo">PIPPO</option> <option value="pluto">PLUTO</option> </select>
I would like to add a parameter to the combobox url based on the value of select, i.e.: "ajax/wsgetofferta.php?firm=" + document.getElementById("firm").value
is it possible ?
|
|
|
3
|
General Category / EasyUI for jQuery / some fields readonly only if existing row
|
on: April 19, 2020, 10:13:58 AM
|
Hi I would like to set some fields readonly only if editing existing row:
Existing rows I want to make readonly have a colum set to 9, I made in this way:
onBeforeEdit: function(index,row){ var col = $(this).edatagrid('getColumnOption', 'qta'); alert(getSelectedValue('#dg3', 3)) if( getSelectedValue('#dg3', 3) == 9) { col.editor = null; } else { col.editor = 'text'; } }
It works but if after editing these rows then I add a new row selectedvalue remain to 9 and it remain readonly. Is there a way to verify if new row or after editing clear buffer ?
|
|
|
5
|
General Category / EasyUI for jQuery / eayui combobox autocomplete queryparams
|
on: November 13, 2019, 07:09:31 AM
|
Hi, I'm tryiing to use combobox getting data from ajax, but I would like it works as jquery ui autocomplete, when I digits characters I'd like it suggests all words starting this these characters. How I can post to php script characters I'm writing ? This is the code: <input type="text" id="nascita_luogo" placeholder="Luogo di Nascita" class="easyui-combobox" data-options="valueField:'id',textField:'comune',url:'ajax/cercacomune.php'"/>
|
|
|
9
|
General Category / General Discussion / Combobox in edatagrid show id instead of description
|
on: November 28, 2017, 08:31:37 AM
|
Hi to all, I have an edatagrid with a combobox I would like to show the description instead of index when I show the datagrid:
i.e.= Table products is this: id =1 description:'apple'
When I edit all ok combobox is displayed correctly but after confirmation the datagrid show the id (1): How I can show 'apple' instead ? this is the row code: <th field="id" width="30" editor="{type:'combobox', options:{mode:'remote',valueField:'id',textField:'description',url:'combofruit.php',required:true}}">Frutta</th>
|
|
|
13
|
General Category / EasyUI for jQuery / Add datebox to edatagrid
|
on: June 21, 2013, 02:56:05 PM
|
Hi everyone!!! I'm tryiing to add a datebox in a column of a edatagrid without success: This is the code: <th field="dal" width="15" editor="{type:'text',class:'easyui-datebox'}">Dalla Data</th> What is wrong ? Bye
|
|
|
14
|
General Category / EasyUI for jQuery / Re: edatagrid refresh combo after data input
|
on: May 08, 2013, 09:22:50 AM
|
Hi Thank you for the answer, but this is my first datagrid and I will need a little further help, because my structure is a little different from your. Follow my code D00PRO is product and D00ART the color : var articoli; function trunkFormatter(value){ for(var i=0; i<articoli.length; i++){ if (articoli[i].MACAR0 == value) return articoli[i].MACAR0; } return value; }
$(function() { $.getJSON('list_art.php?tipoord='+ $("#tipoordine").val(), function(json) { articoli = json; $('#dg').edatagrid({ url: 'get_righe.php?file=' + $("#nomefile").val(), updateUrl: 'update_righe.php?file='+ $("#nomefile").val(), onAfterEdit: function (data) { $('#dg').edatagrid('reload'); }, rowStyler:function(index,row){ if (row.PREDIV>0 && row.D00PRO != 0){ return 'background-color:pink;color:blue;font-weight:bold;'; } if (row.D00PRO==0){ return 'background-color:yellow;color:blue;font-weight:bold;'; } } }); }); }); </script> <h2>Gestione Dati</h2> <div class="demo-info" style="margin-bottom:10px"> <div class="demo-tip icon-tip"> </div> <div>Doppio click per modificare</div> </div> <table id="dg" title="Righe importate" style="width:1000px;height:500px" toolbar="#toolbar" pagination="true" idField="E42POS" rownumbers="true" fitColumns="true" singleSelect="true"> <thead> <tr> <!-- <th field="id_trunk" width="140" formatter="trunkFormatter" editor="{type:'combobox',options:{valueField:'id_trunk',textField:'nome',data:collegamenti,required:true}}">Righe</th> --> <th field="D00POS" width="0" editor="text" hidden="true">id</th> <th field="D00PRO" width="10" editor="text">Progressivo</th> <th field="D00ART" width="50" formatter="trunkFormatter" editor="{type:'combobox',options:{valueField:'MACAR0',textField:'MADES0',data:articoli,required:true}}">Articolo</th> </tr> </thead> </table> <div id="toolbar"> <a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:$('#dg').edatagrid('saveRow')">Salvare</a> <a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#dg').edatagrid('cancelRow')">Cancel</a> </div>
|
|
|
15
|
General Category / EasyUI for jQuery / edatagrid refresh combo after data input
|
on: May 07, 2013, 04:54:36 AM
|
Hi all, I'm newbie in easyui, and I have a problem: I would like to retrieve data in a combobox after a user input data in a column or in alternative connect a column to the value of another. I make an example to best understand the problem: I have a db of products (where the combo retrive data) this this values:
ID PRODUCT COLOR 1 A RED 2 A GREEN 3 B YELLOW In the datagrid there is an input text where the user digit the product and the combobox where I display the colors and I would like that if the user digit A in the combobox appear RED and GREEN is it possible ? Thank you Bye
|
|
|
|