EasyUI Forum
April 19, 2024, 04:12:10 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2
1  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 25, 2022, 04:17:16 PM
In the same grid, how can we bind the other data column value to the editor column of combo grid ? I tried formatter with no luck.

Code:
 { field: 'ObjectCode', title: 'Cost Center', width: 300,
                       formatter: function (value, row, index) {
                           return row["ObjectCodeText"];                          
                       },
                        editor: {
                            type: 'combogrid',
                            options: {
                                required: false,
                                view: scrollview,
                                mode: 'remote',
                                idField: 'CostCode',
                                textField: 'CostCentre', ...
2  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 25, 2022, 05:47:35 AM
It worked after setting the height of the table as below.
Code:
<table id="cc" style="height:200px;"></table> 
3  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 24, 2022, 01:24:37 AM
Jarry, the show panel event works fine. Thank you.

Now, I am facing a strange problem with Datagrid. I have defined Datagrid in user control as below (Example: To display only Datagrid columns with one data row)

Code:
<table id="cc"></table> 

On one button click, the user control dialogue opens and the grid displays. It loads and works fine for the first time. If we close the dialogue and click again the button to reopen it, it does not display. What could be the reason?

Below is the function which is called on button click. Datagrid does not display on second-time button click. Am I making any mistake in initializing?

Code:
editRecord: function () {
            $('#cc').datagrid({    
                data:[{code:1, name:'first', price:100}],          
                columns: [[
                    { field: 'code', title: 'Code', width: 100 },
                    { field: 'name', title: 'Name', width: 100 },
                    { field: 'price', title: 'Price', width: 100, align: 'right' }
                ]]
            });
}
4  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 22, 2022, 11:57:34 PM
Any suggestion on the above, Jarry?

5  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 19, 2022, 02:33:27 PM
Thank you, Jarry. One below observation

In the initial load itself, how can we search or filter the combo grid with the text bound in the column so that the item will be available and selected in the dropdown if the user clicks on the down arrow of a combo grid?
6  General Category / Bug Report / Re: datagrid-scrollview problem at 1.5.3 on: August 19, 2022, 12:36:28 AM
We are facing the same problem. However, the http://code.reloado.com/ofixat/edit#preview is not working.

Can you please post the code here
7  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 18, 2022, 11:56:46 AM
Thank you, Jarry. Could achieve only load-on-demand(pagination) combo grid in a Datagrid.

We require a scroll view instead pagination view. No column filter and header for the combo grid. There will be a single column in a combo grid similar to Combobox. The user will enter the text in a column of a grid to search the records and select the item. In short, we require load-on-demand Combobox in a Datagrid. However, it can't be achieved so I am trying with a combo grid.

Can you share a similar example or change my attached example?

8  General Category / EasyUI for jQuery / Re: Load on demand Combogrid in every row of a table on: August 16, 2022, 02:22:08 AM
Modified your given code as per our requirement. Can you please help us to implement the load-on-demand Combobox /combo grid in a second column (Cost Center)?

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">
<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 costData = [
{ value: 'c1008', text: 'Cost Centre 1008' },
{ value: 'c12', text: 'Cost Centre 12' },
{ value: 'c1007', text: 'Cost Centre 1007' }
];
$(function () {

$('#cc').datagrid({
data: [
{ id: 1, percentage: 20, cost: 'c12' },
{ id: 2, percentage: 30, cost: 'c1007' }
],
columns: [[
{
field: 'percentage', title: 'Percentage', width: 50,
editor: {
type: 'numberbox',
options: {
precision: 0,
onChange: function (value) {
var tr = $(this).closest('tr.datagrid-row');
var index = tr.attr('datagrid-row-index');
updatevalue(index, value, 'percentage')
}
}
}
},
{
field: 'cost', title: 'Cost Center', width: 100,
editor: {
type: 'combobox',
columns: [[
{ field: 'value', title: 'CostCode', width: 120},
{ field: 'text', title: 'Cost Center', width: 250 }
]],
options:{
data: costData,
onChange: function (value) {
var tr = $(this).closest('tr.datagrid-row');
var index = tr.attr('datagrid-row-index');
updatevalue(index, value, 'value')
}

}
}
},
{
field: 'act', title: '', width: 50, fixed: true, align: 'center',
formatter: function (value, row) {
return '<a href="javascript:;" onclick="delrow(' + row.id + ')">Del</a>';
}
}
]],
onLoadSuccess: function (data) {
for (var i = 0; i < data.rows.length; i++) {
$(this).datagrid('beginEdit', i);
}
}
})
$('#cc').datagrid('grid')({
footer: '#footer'
})
})
var idIndex = 10;
function addnew() {
var grid = $('#cc');
grid.datagrid('appendRow', {
id: idIndex++,
percentage: null,
cost: null
});
var index = grid.datagrid('getRows').length - 1;
grid.datagrid('beginEdit', index)
}
function delrow(id) {
var grid = $('#cc');
var rows = grid.datagrid('getRows');
for (var i = 0; i < rows.length; i++) {
if (rows[i].id == id) {
grid.datagrid('cancelEdit', i);
grid.datagrid('deleteRow', i);
break;
}
}
}
function updatevalue(index, value, field) {
var grid = $('#cc');
var row = grid.datagrid('getRows')[index];
row[field] = value;
}
</script>
</head>

<body>
<table id="cc"  style="width:100%;height:250px" data-options="idField:'id',fitColumns:true">

</table>
<div id="footer" style="padding:5px 10px">
<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-add" onclick="addnew()">Add New</a>
</div>
</body>

</html>

9  General Category / EasyUI for jQuery / Load on demand Combogrid in every row of a table on: August 09, 2022, 03:50:21 PM
Hello,

Can you share an example of having load on demand combo grid in every row?

The rows are to be created dynamically and in every row, there will be a combo grid with the load on demand.
The row can be edited, added or deleted by the user.
Should be able to change/update the saved records.

The sample UI is attached for reference.



10  General Category / EasyUI for jQuery / Combo Grid scroll bar not working in IE on: September 28, 2021, 11:09:13 PM
Hello Jarry,

We are using combo grid. We set "limitToList:true" property. However the item does not vanish automatically in case if it is not in the combo list in any browser.

We then tried "reversed: true". It clears the combo for the item not in a list. However if one item is selected from the list and tried to append a different text, it clears the appended text and keeps the old selected item as is in combo grid. We require to clear a  combo grid without any text.

Kindly suggest
11  General Category / EasyUI for jQuery / Re: Combobox scroll bar not working in IE on: May 31, 2021, 11:27:37 PM
Thank you Jarry. It works !
12  General Category / EasyUI for jQuery / Combobox scroll bar not working in IE on: May 21, 2021, 06:43:27 AM
We have added a extender for combobox to clear the input text if it does not exist in the item list of combo box. It works fine in all browsers.

 $.extend($.fn.combobox.defaults.inputEvents, {
            blur: function (e) {
                $.fn.combobox.defaults.keyHandler.enter.call(e.data.target);
            },
});

Laster we observed that in Internet Explorer (any version), the scroll bar for combo box does not work. Attached is the screen shot for your reference.

If we comment the a line of code in the function, scroll bar works well. However input text wont clear if it is not in the item list of combo box.

Could you please help us to achieve both ?
 
13  General Category / EasyUI for jQuery / Re: Dynamic Json source on: April 25, 2021, 06:54:47 AM
The above code does not work. Any update on this how does will it work ?



14  General Category / EasyUI for jQuery / Re: easyui images loading issue on: December 06, 2020, 11:28:22 PM
Hi Jarry,

Yes. However, will appreciate if you could check the example code. In our example the image loads every time we mouse over the combo box. In page loading also it loads at the end and so takes more time to complete the page load.

15  General Category / EasyUI for jQuery / Re: easyui images loading issue on: November 30, 2020, 02:38:49 AM
Hello Jarry,

We tried in IE and the images loads at the end only. Our application is used by clients and they use only Chrome browser and it repeats loading the image because of which the page takes more loading time.

It would be great if you could suggest how to fix it so we could improve the overall performance of the page in chrome

Thank you


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