EasyUI Forum
April 18, 2024, 03:00:21 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 ... 8 9 [10]
 91 
 on: July 26, 2023, 07:54:20 PM 
Started by BinaryCode - Last post by jarry
This example works fine.
https://jeasyui.com/demo/main/index.php?plugin=PasswordBox&theme=material-teal&dir=ltr&pitem=&sort=asc

 92 
 on: July 26, 2023, 07:53:20 PM 
Started by larryclyons - Last post by jarry
The 'idField' property in the treegrid component is required to identify a row node. While calling the 'refreshRow' or 'refresh' methods, the parameter should be passed with the identity field value.

Code:
$(this).treegrid('refreshRow',row['id']);
// or
$(this).treegrid('refresh',row['id']);

 93 
 on: July 25, 2023, 10:24:00 AM 
Started by larryclyons - Last post by larryclyons
Just bumping this up. Hey Jarry any answer to this?

 94 
 on: July 24, 2023, 04:01:11 PM 
Started by BinaryCode - Last post by BinaryCode
jeasyui-passwordbox doesnot show password when toggle eye button

 95 
 on: July 23, 2023, 12:59:23 PM 
Started by Wojak - Last post by Wojak
JSONfn comes with the answer

Code:
$('#datagrid').datagrid({ columns: [JSONfn.parse(JSONfn.stringify(columns))] });

 96 
 on: July 20, 2023, 11:03:49 AM 
Started by Wojak - Last post by Wojak
Hi,
How could I solve my problem? I tried eval(); and (function() {})();

Code
Code:
function refreshDatagrid() {
    const columns = $('#datalist').datalist('getRows');
    $('#datagrid').datagrid({ columns: [columns] });
}

Data
Code:
[
    {
        "field": "field_fdqzv",
        "title": "title"
    },
    {
        "field": "field_2agdu",
        "title": "2agdu",
        "_selected": true,
        "width": 200,
        "align": "center",
        "formatter": "function (value, row, index) {\n\treturn value + ' ' + index;\n}",
        "styler": ""
    }
]

 97 
 on: July 20, 2023, 10:37:50 AM 
Started by Wojak - Last post by Wojak
Ok, i found it. I needed also title, field was not enough.

 98 
 on: July 19, 2023, 04:43:39 AM 
Started by larryclyons - Last post by fmdano
Hey guys,
working with Larry on this and in our Grid we put in the code above, but the refreshRow code does not seem to work.


$('#ourGridName').treegrid({
         url:'com/Administration.cfc?method=getWhatWeNeed',
         method:'get',
         width:'97%',
         idField:'id',
         treeField:'col0',
         emptyMsg: "No Records Found",
         border: true,
         fit: true,
         singleSelect:true,
         checkOnSelect: true,
         fitColumns: true,
         striped: true,
         rownumbers: false,
         collapsible: true,
         lines: true,

         onClickCell: function(field,row,index){

            row['style'] = row['style']||{};
               console.log(row);
               console.log('row id: ' + row['id']);
               console.log('row style field: ' + row['style'][field]);
               alert(row['id']);
               alert(row['style'][field]);
               if (row['style'][field] == 'background:red;color:#fff'){
                        row['style'][field] = 'background:green;color:#fff';
               } else if (row['style'][field] == 'background:green;color:#fff'){
                  row['style'][field] = 'background:red;color:#fff';
               } else {
                  row['style'][field] = 'background:red;color:#fff';
               }
               alert(row['style'][field]);
         
               $(this).treegrid('refreshRow',row['id'])      

         },

         columns:[[  --- all our colum names and attributes below

The JSON that comes back from our external function is the same as what you have in the post, like:
var data =  [
   {  "id": 1, "name": "All Tasks", "begin": "3/4/2010", "end": "3/20/2010", "progress": 60, "iconCls": "icon-ok", "idField": 10 },
   { "idField": 11, "id": 2, "name": "Designing", "begin": "3/4/2010", "end": "3/10/2010", "progress": 100, "_parentId": 1, "state": "closed" },  and more..

MY QUESTION:
   in the refreshRow line above, when we use row['id'] which is in the idField attribute, what is that ID Field and how does it work with the refreshRow code? we have an id field in our json code that returns.
That is my guess as to why our code is not working but your example code works....ANY THOUGHTS that could help us more forward would be awesome.
thanks
Dan

 99 
 on: July 18, 2023, 11:32:04 PM 
Started by Wojak - Last post by jarry
This code 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">
  <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 type="text/javascript" src="https://www.jeasyui.com/easyui/datagrid-dnd.js"></script>
  <script>
    var data = [
      { "text": "Epson WorkForce 845", "group": "Printer" },
      { "text": "Canon PIXMA MG5320", "group": "Printer" },
      { "text": "HP Deskjet 1000 Printer", "group": "Printer" },
      { "text": "Cisco RV110W-A-NA-K9", "group": "Firewall" },
      { "text": "ZyXEL ZyWALL USG50", "group": "Firewall" },
      { "text": "NETGEAR FVS318", "group": "Firewall" },
      { "text": "Logitech Keyboard K120", "group": "Keyboard" },
      { "text": "Microsoft Natural Ergonomic Keyboard 4000", "group": "Keyboard" },
      { "text": "Logitech Wireless Touch Keyboard K400", "group": "Keyboard" },
      { "text": "Logitech Gaming Keyboard G110", "group": "Keyboard" },
      { "text": "Nikon COOLPIX L26 16.1 MP", "group": "Camera" },
      { "text": "Canon PowerShot A1300", "group": "Camera" },
      { "text": "Canon PowerShot A2300", "group": "Camera" }
    ]
    $(function () {
      $('#dl').datalist({
        data: data,
        onLoadSuccess: function () {
          $(this).datagrid('enableDnd');
        }
      });
    })
  </script>
</head>

<body>
  <div id="dl" title="DataList" style="width:400px;height:250px">
  </div>
</body>

</html>

 100 
 on: July 17, 2023, 03:34:13 PM 
Started by Wojak - Last post by Wojak
Hi,
Am having a problem w drag and drop on my Datagrid
Code:
Uncaught TypeError: Cannot read properties of undefined (reading 'jQuery3310090322002266437942')
    at Q.get (jquery.min.js:2:32502)
    at Q.access (jquery.min.js:2:32622)
    at Function.data (jquery.min.js:2:33477)
    at Object.options (jquery.easyui.min.js:12493:12)
    at $.fn.datagrid (jquery.easyui.min.js:12356:35)
    at getDraggingRow (datagrid-dnd.js:390:27)
    at HTMLTableRowElement.onBeforeDrag (datagrid-dnd.js:152:25)
    at HTMLTableRowElement.<anonymous> (jquery.easyui.min.js:638:21)
    at HTMLTableRowElement.dispatch (jquery.min.js:2:41772)
    at y.handle (jquery.min.js:2:39791)

And also is there a way to import drag and drop to datalist?

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