EasyUI Forum
March 29, 2024, 12:46:12 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
1  General Category / EasyUI for jQuery / Re: Scroll propertygrid rows into center layout area! on: March 28, 2018, 06:43:48 AM
Hi, the suggestion works in half.
I inserted fit, in propertygrid. When I open the window, show everything as it should, if I close and reopen, it becomes smaller.
If I enter the fit field, in window, the window remains tiny.
2  General Category / EasyUI for jQuery / Scroll propertygrid rows into center layout area! on: March 26, 2018, 01:25:12 AM
Hello everybody,
I tried to create a layout, inside a easyui window. Inside the Layout in north region, I have insert the commands buttons, and into center region a propertygrid. Now, if I add a row in propertygrid, appear a scroll bar and all window scroll.
How to do scroll alone the center(propertygrid)? What's the way?
Thank's soo much!
3  General Category / EasyUI for jQuery / Re: How to check all fields required are written? on: February 21, 2018, 01:08:21 AM
I used a propertygrid into window.
4  General Category / EasyUI for jQuery / How to check all fields required are written? on: February 20, 2018, 03:26:09 AM
Hi,
exist a function or similar that allow me to check all fields required are written?
My fields are different from each other (combobox, validatebox,...), but almost all, have required=true  as inside option.
If the check is ok ,proceed to write, otherwise expose a allert message when i click a linkbutton (to save information) (I Want to check at the end).

I thought about this solution:
  • Scroll through all the elements by checking if required ! = Undefined
  • Check if the field is written.(if != Undefined)

Code:
var rows = $('#details').propertygrid('getChanges');
for(var i=0; i<rows.length; i++){
   if(rows[i].hasOwnProperty('editor')) {
      if(rows[i].editor.options.hasOwnProperty('required')) {
         if(rows[i].editor.options.required && (rows[i].value==""))
            console.log("Required, without value! ALLERT!!!!");
         else
            console.log("Requested and completed");
      } else
         console.log("I do not care");
   } else
      console.log("I do not care");
}

The values I get with $('#details').propertygrid ('getChanges') are:

0: {…}
    editor: {…}
        options: {…}
            missingMessage: "No Field!"
            required: true
            validType: Object { length: […] }
            __proto__: Object { … }
        type: "validatebox"
        __proto__: Object { … }
    group: "Dettagli"
    index: 0
    name: "Name"
    value: ""
    __proto__: Object { … }

.....
5: {…}
    editor: {…}
        options: {…}
            validType: Object { length: […] }
            __proto__: Object { … }
        type: "validatebox"
        __proto__: Object { … }
    group: "Dettagli"
    index: 5
    name: "Tag"
    value: ""
....

Is there another way?
Thanks!
5  General Category / EasyUI for jQuery / Re: How to check if the text write into Combobox are contained on: February 20, 2018, 02:38:33 AM
Thanks so Much! Grin Grin
Now, Can I expose a message that advise me of the wrong insertion?
6  General Category / EasyUI for jQuery / How to check if the text write into Combobox are contained on: February 19, 2018, 07:47:56 AM
Hello, I would like to implement a validType which allows me to report the insertion error, if a string is inserted that are not contained inside the combobox.
Thanks
7  General Category / EasyUI for jQuery / Combobox, with more equal valueFields on: December 05, 2017, 08:34:44 AM
Hello,
is it possible to insert in a combobox, two values that have the same valueField?
I tried to make a remote insertion, with the help of the url property, 2 equal valuesFields with different textFields.

Es.
valueField= Text A
textField= hello 1

valueField= Text A
textField= hello 2

Thanks
8  General Category / Bug Report / Re: Propertygrid (TypeError: this.groups is undefined) on: December 05, 2017, 08:20:23 AM
Other solutions or someone I like where is it wrong? I do not understand.
Thank you
9  General Category / Bug Report / Re: Propertygrid (TypeError: this.groups is undefined) on: October 31, 2017, 02:52:23 AM
thank you alot, for yours suggestement, but after read your example and my code, I don't understand my logical programmation wrong.

I do not know exactly where the mistake may be

Thanks
10  General Category / Bug Report / Re: Propertygrid (TypeError: this.groups is undefined) on: October 23, 2017, 03:46:01 AM
Sure!
I used the prototype, because I want to reuse some components, declaring them once, and invoking them whenever I need them.

File JS N.1 (pageBaseViews.js)
Code:
function pageBaseViews() {
}

pageBaseViews.prototype.device = function(device){
    $('#details').propertygrid('appendRow', {
        name: "Device",
        value: device,
        group: "details"
    });        
};
    
pageBaseViews.prototype.whoOwns = function(whoOwns){
    var dim = 0;
    try{
        var split  = whoOwns.split(",");
        var dim = split.length;
    } catch (Exception) {
        var dim = 1;
    }

    if(dim>1) {
        $.each(split, function (index, value) {
            $('#details').propertygrid('appendRow', {
                name: "whoOwns - " + (index+1),
                value: value,
                group: "details"
            });
        });                        
    } else {
        $('#details').propertygrid('appendRow', {
            name: "whoOwns ",
            value: whoOwns,
            group: "details"
        });            
    }  
};

pageBaseViews.prototype.associateTo = function(associateTo , type_Associate, name) {
    var dim = 0;
    try{
        var split1 = associateTo.split(",");
        var split2 = type_Associate.split(",");
        dim = split1.length;
    } catch (Exception) {
        dim = 1;
    }
    if(dim>1) {
        $.each(split1, function (index, value) {
            $('#details').propertygrid('appendRow', {
                name: "Associate To",
                value: value,
                group: "Associate - " + name + " - " + value
            });
            $('#details').propertygrid('appendRow', {
                name: "Type Associate",
                value: split2[index],
                group: "Associate - " + name + " - " + value
            });                
        });
    } else {
        $('#details').propertygrid('appendRow', {
            name: "Associate To",
            value: associateTo,
            group: "Associate"
        });
        $('#details').propertygrid('appendRow', {
            name: "Type Associate",
            value: type_Associate,
            group: "Associate"
        });
    }  
}; ....

pageBaseViews.prototype.initialized= function() {
    $('#details').propertygrid({
        scrollbarSize: 0,
        groupFormatter: groupFormatter,
        showGroup: true,
        columns: [[
            {
                field: 'name',
                title: 'Proprierty ',
                width: 150
            },
            {
                field: 'value',
                title: 'Value',
                width: 450
            }
        ]]
    });
  
    $('#infoViews').window({
        width:600,
        maxHeight:950,
        closed: true,
        maximizable: false,
        minimizable: false,
        resizable: false,
        collapsible: true,
        onBeforeClose:emptyGrid_Modify,
        modal:true
    });
    $('#infoViews').window('center');    
    
    function emptyGrid_Modify() {
        $('#details').propertygrid('loadData', {"total": 0, "rows": []});
    }
    
    function groupFormatter(fvalue, rows){
        return fvalue + ' - <span style="color:red">' + rows.length + ' rows</span>';
    }      
};

Now, I create a specific device Object, example Monitor (Monitor.js)

Code:
function Monitor(row) {
    Monitor.prototype = wide;
    Monitor.prototype = views_Monitor(row);
    Monitor.prototype = new pageBaseViews();    
}

function Wide(detail, wide) {
    $(detail).propertygrid('appendRow', {
        name: "Wide",
        value: wide==0 ? "NO" : "YES" ,
        group: "Info Model"
    });    
}

function views_Monitor(row) {
    $.get("getDetails.php", {id: row.id, device: row.device})
    .done(function (info) {
        var result  = $.parseJSON(info);
        $('#infoViews').window({title: result.name + " (" + result.device+ ")"});

        Monitor.prototype.initialized();
        Monitor.prototype.device(result.device);
        Monitor.prototype.whoOwns(result.owns);
        Monitor.prototype.associateTo(result.associateTo, result.typo_Associate, result.name);

        Wide('#details', result.wide);

        $('#infoViews').window({closed: false, width:'auto',height:'auto'});
        $('#infoViews').window('expand');            
        $('#details').propertygrid({width:'auto',height:'auto'});                  
        $('#infoViews').window('center');            
    });                
}

I hope I put everything!

Thanks so much
11  General Category / Bug Report / Re: Propertygrid (TypeError: this.groups is undefined) on: October 23, 2017, 12:44:11 AM
Hi,
I try to use your example, but the problem is the same. The difference between my code and yours is the introduction of a new formatting of group name. The text change, write the number of lines, but the error of the first click persists.

It's new Error Code.

TypeError: _8e2 is undefined[Ulteriori informazioni]  jquery.easyui.min.js:11853:1
   refreshGroupTitle jquery.easyui.min.js:11853:1
   updateRow jquery.easyui.min.js:11908:1
   refreshRow jquery.easyui.min.js:11364:1
   refreshRow/< jquery.easyui.min.js:11165:1
   each jquery.min.js:2:2973
   each jquery.min.js:2:833
   refreshRow jquery.easyui.min.js:11163:8
   $.fn.datagrid jquery.easyui.min.js:10816:8
   _774 jquery.easyui.min.js:10515:1
   endEdit/< jquery.easyui.min.js:11152:1
   each jquery.min.js:2:2973
   each jquery.min.js:2:833
   endEdit jquery.easyui.min.js:11151:8
   $.fn.datagrid jquery.easyui.min.js:10816:8
   _8a8/< jquery.easyui.min.js:11674:1
   each jquery.min.js:2:2973
   each jquery.min.js:2:833
   _8a8 jquery.easyui.min.js:11671:1
   onClickCell jquery.easyui.min.js:11646:1
   _6c4 jquery.easyui.min.js:9668:1
   bindEvents/< jquery.easyui.min.js:11774:1
   dispatch jquery.min.js:4:8497
   add/r.handle jquery.min.js:4:5235


Have you other solution?
Thanks
12  General Category / Bug Report / Propertygrid (TypeError: this.groups is undefined) on: October 20, 2017, 03:55:26 AM
Hi,
I'm working with a propertygrid, and I found a problem.
When I create a propertygrid (contained in a window), at the first startup, when I click on any line and then another in console, this error occurs:

Chrome Browser    
    Uncaught TypeError: Cannot read property '1' of undefined (jquery.easyui.min.js:11851)
    at Object.refreshGroupTitle (jquery.easyui.min.js:11851)
    at Object.updateRow (jquery.easyui.min.js:11908)
    at Object.refreshRow (jquery.easyui.min.js:11364)
    at HTMLTableElement.<anonymous> (jquery.easyui.min.js:11165)
    at Function.each (jquery.min.js:2)
    at m.fn.init.each (jquery.min.js:2)
    at Object.refreshRow (jquery.easyui.min.js:11163)
    at m.fn.init.$.fn.datagrid (jquery.easyui.min.js:10816)
    at _774 (jquery.easyui.min.js:10515)
    at HTMLTableElement.<anonymous> (jquery.easyui.min.js:11152)

Firefox    
    TypeError: this.groups is undefined (jquery.easyui.min.js: 11851:5)

The creation of the group is as follows:
Code:
    $('#details').propertygrid('appendRow', {
        name: "Name",
        value: element,
        group: "Details"
    });
And so for all the lines.

If I close the window and reopen it, this problem does not happen anymore. What can it be?
13  General Category / Bug Report / Re: The colspan-mergeCells propertygrid is Bugged? on: October 20, 2017, 02:09:29 AM
OK thanks
How do I apply only to certain values?
When do I need to call it that way?

Code:
function mergeCells(rowIndex){
    $(this).propertygrid('mergeCells', {
        index: rowIndex,
        field: 'value',
        rowspan: 3
    })
}
$.each(valuesToMerge, function(rowIndex,value) {
    $('#pg').propertygrid({
        onLoadSuccess: mergeCells(rowIndex),
        onAfterEdit: mergeCells(rowIndex)
    });
});

Or how should I do it?
Thanks.
14  General Category / Bug Report / The colspan-mergeCells propertygrid is Bugged? on: October 18, 2017, 06:04:38 AM
Hi,
using colspan to join columns in a propertygrid, I noticed that, it works until I select a line; Once selected and exited from the selected cell, colspan no longer works.

Code:
//count = Number of row
//colSpan = How many column merge

function merge(count, colSpan=3){
    $('#detailsView').propertygrid('mergeCells', {
        index:   count,
        field:   'value',
        colspan: colSpan
    });
}
The effect into attachement (Before.jpg and After.jpg)

I use Jquery-easyui-1.5.3-patch

Do you know how to help me?
15  General Category / EasyUI for jQuery / Re: Introduce Loading Message into propertygrid? on: October 12, 2017, 12:23:15 AM
I try to delete the method Loaded, but the message don't appear. Without, the load message should always be exposed, but that is not the case.
When I use this to load the main table, even though the time is short, it still appears to disappear.
Can the point of code where I have entered this method can be wrong?
Thanks
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!