EasyUI Forum
May 08, 2024, 01:58:06 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2] 3 4 ... 9
16  General Category / General Discussion / TypeError: $.data(...) is undefined on: October 21, 2019, 07:57:08 PM
Whenever I call a function to open a dialog which has a datagrid, I got the following error in the console.

Code:
TypeError: $.data(...) is undefined

However this error does not cause any misbehaviour in my application. My code goes like this:

Code:
function openDialog(){
    $('body').desktop('openApp', {
         href:'datagridview.php',  
         //other code
    });
}

datagridview.php

Code:
<body>
    <table id="dg" data-options="href:view.php" class="easyui-datagrid">
         <th field="categoryName" halign="center" width="20" sortable="true" align="left">Category</th>
          //other codes follow
    </table>
</body>

I tested the code in Firefox, Chrome, Internet Explorer 11. I do not see any misbehavior. But since It is an error, I want to get rid of it. Please help.

Thanks
Alfred
17  General Category / General Discussion / Re: How do we resize datagrid inside dialog? on: October 21, 2019, 07:48:17 PM
Thanks, Jerry. This works perfectly.
18  General Category / General Discussion / How do we resize datagrid inside dialog? on: October 16, 2019, 11:04:36 PM
I am trying to follow the code in http://code.reloado.com/ecituq3/5/edit#preview to resize the datagrid inside dialog. But it is not working. It seems the code listens to only the window resize event.  So how can we make the datagrid listen to the dialog resize event and show columns accordingly like the one in the link mentioned here. Also I used the fluid extension I found in this forum to resize the dialog. It works but does not resize the datagrid based on the priority of the column to show.

Regards,
Alfred
19  General Category / General Discussion / Prepopulate the multiple combogrids with data from server. on: September 08, 2019, 05:17:07 AM
Is it possible to pre-populate the combogrid in the following code with data from the server. Since the code is too long, I will post here only some important parts of it. You can see the whole code http://code.reloado.com/ipopes/3/edit#source. Please look at the comment in the code

Code:
editor:{
type:'combogrid',
   options:{
mode:'local', panelWidth:500,
method:'get',
//url: 'getorder.php?id=1', //This will generate all then necessary rows and create and populate the combogrids
                //url: 'product.php', //If a user choose to change the product, this will generate a combogrid.
data: [
{id:'code1',description:'description1',code:'code1',quantity:100,rate:30},
{id:'code2',description:'description2',code:'code2',quantity:200,rate:40}
],
queryParams: {
type: 'product'
},                
idField:'id',
textField:'description',
reversed:true,
columns: [[
{field:'description',title:'Description',width:120,sortable:true},
{field:'code',title:'Code No',width:60,sortable:true},
{field:'uqc',title:'UOM',width:50,sortable:true},
{field:'quantity',title:'Qnty',width:40,sortable:true},
{field:'rate',title:'Rate',width:50,sortable:true},
]],
fitColumns:true,
selectOnNavigation:false,
onSelect: function(index,row){
var combo = $(this).combogrid('combo');
var opts = $(combo).combogrid('options');
var mainGrid = opts.mainGrid;
var editIndex = opts.editIndex;
var edCode = mainGrid.datagrid('getEditor', {index:editIndex,field:'code'});
var edQuantity = mainGrid.datagrid('getEditor', {index:editIndex,field:'quantity'});
var edRate = mainGrid.datagrid('getEditor', {index:editIndex,field:'rate'});
var edTotal = mainGrid.datagrid('getEditor', {index:editIndex,field:'total'});
$(edCode.target).textbox('setValue', row.code);
$(edQuantity.target).numberbox('setValue', 1);
$(edRate.target).numberbox('setValue', row.rate);
$(edTotal.target).numberbox('setValue', row.rate*1);
}
}
}

In the above code, we have to manually select the product from the code coming from the server `getorder.php`. My question is — Is it possible to populate the combogrid with multiple rows of data coming from the server. And can we still manually change the populated from the combogrid with a new data source such as `product.php`.

Your help is truly appreciated.

Thanks.
Alfred
20  General Category / EasyUI for jQuery / Re: How to remove the following error on: May 13, 2019, 07:29:27 PM
Thanks Jarry. But my combogrid is inside a dialog. The problem is still there.
21  General Category / EasyUI for jQuery / Re: How to remove the following error on: May 13, 2019, 07:22:55 AM
Thanks for the reply. How do I do it in the combogrid? This is the one that causes the error.

Code:
<input name="feeinfo" id="ipBox" class="easyui-combogrid"
  data-options="panelWidth:800, mode:'remote', method:'get', pagination:true,
  idField:'id', textField:'name',  hasDownArrow:true, striped:true,
  prompt:'Type to search..',  url:'Data/list',
  columns: [[
    {field:'id',title:'<b>Id</b>', halign:'center', align:'center', width:40,sortable:true},
    {field:'name',title:'<b>Name</b>', halign:'center', align:'left', width:120,sortable:true},
  ]], fitColumns: true, panelHeight:250,
  onSelect:function(index, row) {
      showInfo(row.id);
      $('#ipBox').combogrid('clear');
  },
  panelEvents: $.extend({}, $.fn.combogrid.defaults.panelEvents, {
      mousedown: function(){}
  }),
  onHidePanel:function(index,row){
      $(this).combogrid('close');
      $('#ipBox').combogrid('clear');
  }, emptyMsg:'<span style=color:red>No Data...</span>'" style="width:100%; height:35px;">

I did try with the following but it does not work:

Code:
$(function(){
    $('#ipBox').combogrid({
        onBeforeLoad: function(param){
           var g = $('#ipBox').combogrid('grid');
           var pager = g.datagrid('getPager');
        }
      });
   });
22  General Category / EasyUI for jQuery / Multi Step forms with next button with the tab components on: May 11, 2019, 08:45:19 PM
I see the following example http://code.reloado.com/eregaf3/edit#preview. It uses the tab component. I wonder how we can go to the other tabs with the sequential order. I mean to go to the next tab only when all the required fields are filled up with the next button at the bottom of the each tab content. I have a lot of fields on my form. So instead of showing all the fields I want to use a multi step form. since tab is another feature itself, easyui could have something like easyuiStep.

I hope you could help me.

Thanks and regards,
Alfred.
23  General Category / EasyUI for jQuery / Re: How to remove the following error on: May 11, 2019, 07:44:25 PM
Please show an example.


Thanks
Alfred
24  General Category / EasyUI for jQuery / How to remove the following error on: April 30, 2019, 05:54:52 AM
Though this error does not cause any unexpected behavior or change in my application, it always appear on the console. So I am looking for ways to remove the error, but could not find the solution.

Code:
Uncaught TypeError: Cannot read property 'panel' of undefined
    at Object.getPager (easyui.min.js:1)
    at n.fn.init.$.fn.datagrid (easyui.min.js:1)
    at HTMLTableElement.<anonymous> (easyui.min.js:1)
    at Function.each (jquery.min.js:2)
    at n.fn.init.each (jquery.min.js:2)
    at Object.loaded (easyui.min.js:1)
    at n.fn.init.$.fn.datagrid (easyui.min.js:1)
    at easyui.min.js:1
    at Object.success (easyui.min.js:1)
    at i (jquery.min.js:2)

I hope you can solve the problem.

Thanks and regards,

Alfred
25  General Category / EasyUI for jQuery / Re: Combogrid with multiple select does not clear the search term on: April 25, 2019, 07:51:53 AM
Thanks. this solves the problem

Regards,

Alfred
26  General Category / EasyUI for jQuery / Re: Combogrid with multiple select does not clear the search term on: April 25, 2019, 04:51:37 AM
My question is to clear the input field once we select a row from the combogrid and fill the input field with the selected data. Because I use multiple property, once I select a row, the input field with the selected field value, e.g. John and added Comma(,) which is followed by my search term, e.g. Jo, So it becomes John, Jo. So I want to remove Jo from the input field, But I select another row e.g. James, I want the input field to be set with John, James.
In my case, Toolbar is not convenient. I hope you can solve the problem.

I am trying something like below:

Code:
onSelect:function(index, row){
   var ginput = $('#cbg').combogrid('getText');
   var newText = ginput.substr(0, ginput.lastIndexOf(',')+1);
   $('#cbg').combogrid('setValue', newText);
}
But this does not allow me to add another field after the last comma. May be there are workarounds, or maybe the combogrid has way to solve this without the toolbar.


Thanks and regards,
Alfred
27  General Category / EasyUI for jQuery / Combogrid with multiple select does not clear the search term on: April 24, 2019, 02:25:55 AM
I am trying to use combogrid with multiple:true and search data

    $('#cc').combogrid({
        panelWidth:450,
        multiple:true,
        idField:'name',  textField:'name',
        mode:'remote', method:'get',
        url:'Employees/list',
        columns:[[
            {field:'regd',title:'Code',width:60},
            {field:'name',title:'Name',width:100},
            {field:'addr',title:'Address',width:120}
        ]]
    });

I have hundred of employees, I want to select 2 or more employees by typing their name on the input of the combobgrid. On the server side, I got the q value for the first name, for the second value, typing does not help because the query alfready contains the first typed name. So using multiple becomes useless. But I solve this problem by reading the q string after the last comma. The problem is combogrid does not clear the typed query string. For example I type 23 for the regd, then I select the name on the grid, the regd 23 is appended to the name selected. How do I clear this? How do I clear the search term I used after selecting the item?
Look at this example.http://jsfiddle.net/Bz9Js/
When you type something, even after selecting our choices from the grid, the typed letters still exist in the input field.

Thanks and regards,
Alfred
28  General Category / EasyUI for jQuery / Re: Scrolling is very slow inside dialog on: April 15, 2019, 04:22:52 AM
Even in your demo the problem is still there. Use your mousewheel to scroll. You can see that it is very very slow. I think this is a bug. If you scroll this page with your mouse wheel, you can feel and see the normal behaviour of mousewheel scroll. But for the datagrid inside the dialog, we can hardly leave even one row at one wheel scroll. I hope you can fix this.

Thanks and regards

Alfred
29  General Category / EasyUI for jQuery / Re: Scrolling is very slow inside dialog on: April 14, 2019, 11:25:06 PM
Thanks for your great help. The issue with my code is below:

To open a dialog:

Code:
unction openDialog(){
   $('#perDialog').dialog({
        title: 'All Students',
        width: 900,
        height: 650,
        closed: false,
        maximizable:true,
        cache: false,
        href: 'Students/All'
}


href:Students/All

Code:
<table class="easyui-datagrid"  url="Lists/getclassdata" singleSelect="true" rowNumbers="true" striped="true" showPageList="true" data-options="view:bufferview, pageSize:50, autoRowHeight:false,">
//other codes........
</table>

With clicking and dragging the vertical scroll bar, it is ok. But using the mousewheel hardly scrolls.

Thanks and regards

Alfred
30  General Category / EasyUI for jQuery / Re: A dialog buttons inside a dialog not working on: April 14, 2019, 08:31:54 PM
This solve the problem.

Thanks very much.

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