EasyUI Forum
July 26, 2024, 10:44:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 10
 1 
 on: July 07, 2024, 11:27:23 AM 
Started by jega - Last post by jega
Hi.

Need a formatter in textbox as combobox. I know there is other topics about this, but they are very old, and doesn't give me an answer how to extend it, to do text colors

Sample

<input id="text1" name="text1" class="easyui-textbox" style="width: 550px" data-options="
   formatter: formatText">


function formatText(value){
   var s = '<span style="color: blue">' + value + '</span><br>'
   return s;
}


Regards Jesper

 2 
 on: July 03, 2024, 07:05:56 PM 
Started by Wojak - Last post by jarry
Please refer to this example https://www.jeasyui.com/demo/test/test20.html. It works fine.

 3 
 on: July 02, 2024, 06:01:51 AM 
Started by helgvor_stoll - Last post by helgvor_stoll
Perhaps thé source code can help. This source IS unfortunately missing. Does somebody have it?

 4 
 on: July 02, 2024, 03:31:05 AM 
Started by helgvor_stoll - Last post by helgvor_stoll
Hi everybody,
I'm getting gray hair on a problem. Can somebody help me.
I want to develop a master/detail view for a little project. On the left I have a datagrid and on the right the form corresponding to the selected record.
On the datagrid, I have a "add" button in the toolbar and when I click on it, a new blank form is available for filling the data. Until here, everything is ok. So, I save the new record and I would like that:
* if I'm on the first page, the record is the first one on the top and automatically selected. It's ok as I refresh the right panel on the "onSelect" events of the datagrid
* If I'm not on the first page, I would like that the new record can be selected and when i come on the first page, it is maked as selected as well. But this part doesn't work.

Can somebody help me,
Thank you in advance,
Kind Regards


 5 
 on: July 01, 2024, 01:11:27 PM 
Started by Wojak - Last post by Wojak
Quote
I found that if I replace the command to open the window to be after reload then everything is ok

Never mind. It worked for a while. For no reason it stopped working again

 6 
 on: July 01, 2024, 01:01:20 PM 
Started by Wojak - Last post by Wojak
Hi,

I have this error that while I scroll for example, to 200 row and then use this command
Code:
$('#dg').datagrid('removeFilterRule').datagrid('clearSelections').datagrid('reload');
then no rows are displayed. I have to use the button that triggers the reload of this datagrid or scroll up or down.

The code for #dg
Code:
$('#dg').datagrid({
        url: '...',
        columns: [[
            { field: 'opcje', title: 'Opcje', width: '50px', align: 'center',
                formatter: function (value, row, index) {
                    if (row.added) {
                        return '<a href="javascript:void(0)" onclick="a(' + row.id + ')" style="color:inherit;" title="Usuń"><i class="fa-solid fa-trash"></i></a>';
                    }
                    return '<a href="javascript:void(0)" onclick="b(' + row.id + ')" style="color:inherit;" title="Dodaj"><i class="fa-solid fa-plus"></i></a>';
                }
            },
            { field: 'producent', title: 'Producent', width: '180px', halign: 'center' },
            { field: 'nazwa', title: 'Nazwa', width: '260px', halign: 'center' },
            { field: 'typ', title: 'Typ', width: '210px', halign: 'center' },
            { field: 'nrKatalogowy', title: 'Nr katalogowy', width: '210px', halign: 'center' },
            { field: 'opis', title: 'Opis', width: '210px', halign: 'center' },
            { field: 'jmNazwa', title: 'J.m.', width: '50px', halign: 'center' },
        ]],
        idField: 'id',
        rownumbers: true,
        singleSelect: true,
        pageSize: 100,
        remoteFilter: true,
        filterDelay: 1000,
        remoteSort: true,
        clientPaging: false,
        view: scrollview,
        onLoadSuccess: function () {
            c.forEach(el => {
                $(this).datagrid('updateRow', { index: $(this).datagrid('getRowIndex', el), row: { added: 1 } });
            });
        },
        rowStyler: function (index, row) {
            if (row.added) {
                return 'background-color:lightgreen;';
            }
        },
        onSelect: function (index, row) {
            $(this).datagrid('unselectRow', index);
        },
        onDblClickRow: function (index, row) {
            if (row.added) {
                a(row.id);
            } else {
                b(row.id);
            }
        },
    }).datagrid('enableFilter', [{ field: 'opcje', type: 'label' }]);


I found that if I replace the command to open the window to be after reload then everything is ok

 7 
 on: June 28, 2024, 07:26:27 AM 
Started by rezzonico - Last post by rezzonico
Thanks !

Regards
Miche

 8 
 on: June 27, 2024, 08:30:31 PM 
Started by rezzonico - Last post by jarry
Please set the 'type' attribute with 'number' value to define the field for entering numbers with restrictions.

Code:
  <input id="nb" class="easyui-numberbox" label="Number:" labelPosition="top" precision="2" value="234.56" style="width:300px;">
  <script>
    $(function(){
      $('#nb').numberbox('textbox').attr('type','number')
    })
  </script>

 9 
 on: June 25, 2024, 02:48:16 AM 
Started by rezzonico - Last post by rezzonico
If you try the following program on a mobile device, you can insert characters and not only numbers.
I have tried it on Samsung Browser and Chrome.
https://www.jeasyui.com/demo/main/index.php?plugin=NumberBox&theme=material-teal&dir=ltr&pitem=&sort=asc

Is there a workaround to restrict the input to numbers ?

Miche

 10 
 on: June 25, 2024, 12:08:55 AM 
Started by jega - Last post by jega
H jarry

Thanks, it works.

And works with only one wrapped div and works with all types

   <div class="valData">
      <input id="val3" name="val3" class="easyui-textbox" value="3">
      <input id="val4" name="val4" class="easyui-textbox" value="4">
                <input id="val5" name="val5" class="easyui-combobox" value="5">
                <input id="val6" name="val6" class="easyui-datebox" value="yyyy-mm-dd">
   </div>

Result "val3=3&val4=4&val5=5&val6=yyyy-mm-dd"

Pages: [1] 2 3 ... 10
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!