EasyUI Forum
May 05, 2024, 12:35:08 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Datagrid parameter to combobox field url SOLVED on: December 16, 2021, 01:43:14 AM
Thank you very much it worked
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 ?
4  General Category / EasyUI for jQuery / Re: eayui combobox autocomplete queryparams on: November 18, 2019, 08:54:00 AM
Thank you very much for the help, it works !!
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'"/>
6  General Category / EasyUI for jQuery / edatagrid lock edit if a column have a certain value on: September 17, 2019, 12:39:56 AM
Hi,
how I can make a row readonly (not editable and not deletable) if a column in edatagrid have a certain value ?
7  General Category / EasyUI for jQuery / Re: edatagrid unsaved data notification on: September 03, 2019, 07:23:16 AM
Thank you very much this worked but there is a way to launch the save action from an external(from edatagrid)  button ?
8  General Category / EasyUI for jQuery / edatagrid unsaved data notification on: September 02, 2019, 08:37:19 AM
Hi to all,
I use edatagrid as a subform, I would like to know if there is a way to notificate the user if there are unsaved rows in edatagrid (i.e. added rows without click save button)...is it possible ?
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>
10  General Category / EasyUI for jQuery / Edatagrid how to add additional parameter to saveurl on: July 11, 2017, 09:06:11 AM
Hi to all,
I would like to add additional parameters to the save url php script:
I tried to add these parameters to the url but they are not received from the saverow script either in POST or in GET,  in this way:
saveUrl: http://webserver.local/saverow.php?param1=1&param2=100
How I can do  Huh

11  General Category / EasyUI for jQuery / Re: Add datebox to edatagrid on: June 24, 2013, 06:27:58 AM
Ok perfect   Smiley, but if I would like to use this date format: dd/mm/yyyy ?
12  General Category / EasyUI for jQuery / Re: Add datebox to edatagrid on: June 24, 2013, 04:36:19 AM
Hi stworthy, thank you for the help, but it does not work, putting editor="datebox" when I try to edit the field other columns become white and not datebox is displayed.
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 :

Code:
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">&nbsp;</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
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!