Show Posts
|
Pages: 1 2 [3] 4
|
36
|
General Category / EasyUI for jQuery / Datagrid get row by index in pagination
|
on: February 01, 2023, 05:47:09 AM
|
Hey, The problem I have is that when I fetch all the rows from the datagrid with pagination and want to find it by index it doesn't find it. If pagination is set to 100 rows then being on 400 row it shows no row found const id_found = $('#example-dg').datagrid('getRowIndex', id); const row = $('#example-dg').datagrid('getRows')[id_found];
if (row) { // Some code } else { $.messager.alert("Alert", "Not found !!!", "warning"); }
|
|
|
38
|
General Category / EasyUI for jQuery / Re: Datagrid editor combobox after updateRow
|
on: November 02, 2022, 12:40:51 AM
|
Thanks for helping, i changed it as follow $('#example-combobox').combobox({ onChange: function(newValue, oldValue) { const dg = $('#example-dg'); const comboText = $(this).combobox('getText'); if (newValue != '' && !isNaN(newValue)) { const rows = dg.datagrid('getRows'); $.each(rows, function (i, e) { e.waluta = parseInt(newValue); e.nazwa_waluta = comboText; dg.datagrid('updateRow', { index: i, row: e }); dg.datagrid('refreshRow', i); }); } } });
Because i need that 'waluta' value too
|
|
|
39
|
General Category / EasyUI for jQuery / Datagrid editor combobox after updateRow
|
on: October 28, 2022, 07:28:01 AM
|
Hi I have a problem with datagrid while using updateRow, the example below is my datagrid that im using $('#example-dg').datagrid({ columns: [[ { field: 'waluta', title: 'Waluta', width: '80px', align: 'center', editor: { type: 'combobox', options: { textField: 'nazwa_waluta', valueField: 'waluta', url: 'link/to/query.php' } }, formatter: function (value, row, index) { return row.nazwa_waluta; }}, ]], rownumbers: 'true', showFooter: 'true', singleSelect: 'true', idField: 'id', onEndEdit: function (index, row) { const ed = $(this).datagrid('getEditor', { index: index, field: 'waluta' }); row.nazwa_waluta = $(ed.target).combobox('getText'); });
and this is the combobox with other onchange that im using to massUpdate the field "waluta" $('#example-combobox').combobox({ onChange: function(newValue, oldValue) { const dg = $('#example-dg'); if (newValue != '' && !isNaN(newValue)) { const rows = dg.datagrid('getRows'); $.each(rows, function (i, e) { e.waluta = parseInt(newValue); dg.datagrid('updateRow', { index: i, row: e }); }); } } });
If i change the value in "$('#example-combobox')", datagrid is not refreshing with new data but if i beginEdit the new data is shown in combobox
|
|
|
42
|
General Category / Bug Report / Re: Window after collapse
|
on: October 13, 2022, 11:32:14 PM
|
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Error window</title> <link rel="stylesheet" type="text/css" href="assets/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="assets/themes/icon.css"> <script type="text/javascript" src="assets/jquery.min.js"></script> <script type="text/javascript" src="assets/jquery.easyui.min.js"></script> </head> <body> <div id="test-window-1" class="easyui-window" title="NORMAL" style="padding:0px;"></div> <div id="test-window-2" class="easyui-window" title="BUG" style="padding:0px;"></div> <div id="test-window-3" class="easyui-window" title="BUG" style="padding:0px;"></div> <script> $('.easyui-window').window({ collapsible: true, minimizable: false, maximizable: false, closable: true, closed: true });
$(function() { // Works fine $('#test-window-1').window({ height: '200px', width: '200px' }); $('#test-window-1').window('vcenter'); $('#test-window-1').window('open');
// Bugged but after resize by user is working correctly $('#test-window-2').window({ height: '200px', width: '200px' }); $('#test-window-2').window({ title: 'BUGGED' }); $('#test-window-2').window('vcenter'); $('#test-window-2').window('open');
// Works fine with changed title $('#test-window-3').window({ title: 'NOT BUGGED' }); $('#test-window-3').window({ height: '200px', width: '200px' }); $('#test-window-3').window('vcenter'); $('#test-window-3').window('open'); }); </script> </body> </html>
|
|
|
43
|
General Category / Bug Report / Window after collapse
|
on: October 13, 2022, 02:25:23 AM
|
Hi, I am struggling with the problem that when I want to collapse a window, the background of the window remains, but the content collapses
Best regards
|
|
|
|