EasyUI Forum
May 01, 2024, 04:18:22 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: April 30, 2024, 06:28:54 PM 
Started by Aod47 - Last post by Aod47
I got it. Grin Thank you


 2 
 on: April 29, 2024, 09:03:42 PM 
Started by Aod47 - Last post by Aod47
I try to filter datagrid with asp.net but I don't understand the logic of datagrid33_getdata.php.
Could you please share code how datagrid33_getdata.php filter textbox field from database.

Thank you very much.

 3 
 on: April 29, 2024, 01:28:16 AM 
Started by Coder - Last post by Coder
now use
Code:
$('#dlg .layout').layout('panel','east').panel('resize',{width:250});
$('#dlg .layout').layout('expand','east');

its work, but panel floating from 0 position

 4 
 on: April 29, 2024, 01:24:41 AM 
Started by Coder - Last post by Coder
Code:
  $('#dlg .layout').layout('add',{
    region: 'east'
  , width: 150
  , minWidth: 150
  , maxWidth: 250

$('#dlg .layout').layout('expand','east') - expand panel only to "default"(initial or last) width.

How to expand to maxWidth ?

 5 
 on: April 21, 2024, 10:08:28 PM 
Started by jahangir - Last post by jahangir
Thanks Jarry, it works.
I changed your code from:
msg.find('.messager-input').attr('type','number');
to:
msg.find('.messager-input').numberbox({width:'100%'});
to convert the input to an EasyUI numberbox.

 6 
 on: April 19, 2024, 10:38:00 AM 
Started by Coder - Last post by Coder
for simple export there is no need for ext lib

 7 
 on: April 18, 2024, 03:13:33 AM 
Started by Wojak - Last post by Wojak
I changed to the newest version, but still the same problem. Is there a way to fix it by calling method?

 8 
 on: April 18, 2024, 01:38:02 AM 
Started by Wojak - Last post by jarry
This example works fine.
Code:
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script>
<script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script>
var data = [
{"id":1,"opcje":"opcje1","wydzial_dzial":"wydzial_dzial1"},
{"id":2,"opcje":"opcje2","wydzial_dzial":"wydzial_dzial2"},
{"id":3,"opcje":"opcje3","wydzial_dzial":"wydzial_dzial3"},
{"id":4,"opcje":"opcje4","wydzial_dzial":"wydzial_dzial4"},
{"id":5,"opcje":"opcje5","wydzial_dzial":"wydzial_dzial5"}
]
$(function () {
$('#example').datagrid({
// url: 'example.php',
data: data,
columns: [[
{
field: 'opcje', title: 'Opcje', width: '60px', align: 'center',
formatter: function (value, row, index) {
if (row.editing) {
const s = '<a href="javascript:void(0)" onclick="exampleSave(' + row.id + ')"><i class="fa-solid fa-floppy-disk fa-xl" style="color:black;"></i></a> ';
const c = '<a href="javascript:void(0)" onclick="exampleCancel(' + row.id + ')"><i class="fa-solid fa-rotate-left fa-xl" style="color:black;"></i></a>';
return s + c;
} else {
return '<a href="javascript:void(0)" onclick="exampleEdit(' + row.id + ')"><i class="fa-solid fa-pen-to-square fa-xl" style="color:black;"></i></a>';
}
}
},
{ field: 'wydzial_dzial', title: 'Koszty osobowe', width: '200px', halign: 'center' },
{ field: 'stawka', title: 'Stawka godz. [PLN]', width: '120px', halign: 'center', align: 'right', editor: { type: 'numberbox', options: { min: 0, precision: 0, decimalSeparator: ',' } } },
{ field: 'stawka_0', title: 'Stawka godz. + ogolnozakładowa [PLN]', width: '120px', halign: 'center', align: 'right' },
{ field: 'stawka_narzut', title: 'Stawka narzut [PLN]', width: '120px', halign: 'center', align: 'right' },
]],
idField: 'id',
rownumbers: true,
singleSelect: true,
onBeforeEdit: function (index, row) {
row.editing = true;
$(this).datagrid('refreshRow', index);
},
onAfterEdit: function (index, row) {
row.editing = false;
$(this).datagrid('refreshRow', index);
},
onCancelEdit: function (index, row) {
row.editing = false;
$(this).datagrid('refreshRow', index);
}
});
})
</script>
</head>

<body>
<table id="example" style="width:700px;height:250px" data-options="singleSelect:true"></table>

</body>

</html>

 9 
 on: April 18, 2024, 01:27:26 AM 
Started by jahangir - Last post by jarry
Please try this code.
Code:
var msg = $.messager.prompt('My Title', 'Please type something', function(r){
if (r){
alert('you type: '+r);
}
});
msg.find('.messager-input').attr('type','number')

 10 
 on: April 17, 2024, 05:35:04 AM 
Started by Wojak - Last post by Wojak
In strange cases the datagrid becomes unresponsive. You cannot change the column width, the width of the data columns changes.

If i use
Code:
$('#example').datagrid();


Reinitialized works fine

My code for datagrid
Code:
$('#example').datagrid({
        url: 'example.php,
        columns: [[
            { field: 'opcje', title: 'Opcje', width: '60px', align: 'center',
                formatter: function (value, row, index) {
                    if (row.editing) {
                        const s = '<a href="javascript:void(0)" onclick="exampleSave(' + row.id + ')"><i class="fa-solid fa-floppy-disk fa-xl" style="color:black;"></i></a> ';
                        const c = '<a href="javascript:void(0)" onclick="exampleCancel(' + row.id + ')"><i class="fa-solid fa-rotate-left fa-xl" style="color:black;"></i></a>';
                        return s + c;
                    } else {
                        return '<a href="javascript:void(0)" onclick="exampleEdit(' + row.id + ')"><i class="fa-solid fa-pen-to-square fa-xl" style="color:black;"></i></a>';
                    }
                }
            },
            { field: 'wydzial_dzial', title: 'Koszty osobowe', width: '200px', halign: 'center' },
            { field: 'stawka', title: 'Stawka godz. [PLN]', width: '120px', halign: 'center', align: 'right', editor: { type: 'numberbox', options: { min: 0, precision: 0, decimalSeparator: ',' } } },
            { field: 'stawka_0', title: 'Stawka godz. + ogolnozakładowa [PLN]', width: '120px', halign: 'center', align: 'right' },
            { field: 'stawka_narzut', title: 'Stawka narzut [PLN]', width: '120px', halign: 'center', align: 'right' },
        ]],
        idField: 'id',
        rownumbers: true,
        singleSelect: true,
        onBeforeEdit: function (index, row) {
            row.editing = true;
            $(this).datagrid('refreshRow', index);
        },
        onAfterEdit: function (index, row) {
            row.editing = false;
            $(this).datagrid('refreshRow', index);
        },
        onCancelEdit: function (index, row) {
            row.editing = false;
            $(this).datagrid('refreshRow', index);
        },
        queryParams: {
            id: __id
        }
    });

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!