jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 89 total)
  • Author
    Posts

  • cpuin
    Participant

    Thank you Maria.
    After reviewing the code probably the right question is: “How to make switching of the page after less than 10 rows.I want to switch to another page after the 7th row”?

    in reply to: Retina display support? Retina display support? #74848

    cpuin
    Participant

    I have no idea why you delete this question?

    in reply to: Error: Invalid Selector Error: Invalid Selector #71917

    cpuin
    Participant

    thank you! it works now

    in reply to: Error: Invalid Selector Error: Invalid Selector #71852

    cpuin
    Participant

    Dear Dimitar,

    The problem is exactly where no data is returned!How to solve this?
    I had similar problems with dataTable in the past and wrote many times, when no data is returned there is infinity “loading”…


    cpuin
    Participant

    Dear Nadhezda,

    Thi is exactly what i need.I have 4 fields, and wants when even one of them is empty the button to be disabled.
    Unfortunately with the code provided below when the user set the value on the first fields the button become enabled.

    
    
    $("#tableCompany").on('rowDoubleClick', function (event) {
    						         var args = event.args;
    						         var index = args.index;
    						         var row = args.row;
                                     $('#company').jqxInput('val', row.Company);
                                     enableDisable();
                                     //global variable
                                     companyID = row.ID;
    						         $("#selectCompanyWin").jqxWindow('close');
    						                      
    						                      
    						                 });
    
    $("#tableWarehouse").on('rowDoubleClick', function (event) {
    						      var args = event.args;
    						      var index = args.index;
    						      var row = args.row;
    						      $('#warehouse').jqxInput('val', row.Name);
    						      enableDisable();
    						      //global variable
    						      warehouseID = row.ID;
    						      $("#selectWarehouseWin").jqxWindow('close');
    						                   
    						                   
    						              });
    
    $("#save").jqxButton({height: 25, width: 80, disabled: true});
    	             
    	        function enableDisable(){
    	            if ($('#company').jqxInput('val').length == 0 && $('#warehouse').jqxInput('val').length == 0) {
    	                $("#save").jqxButton({ disabled: true });
    	            }
    	            else {
    	                $("#save").jqxButton({ disabled: false });
    	            }    
    	        }
    
    

    cpuin
    Participant

    Thank you Nadhezda,

    I really have no idea why && doesn’t work:

    
    $("#save").jqxButton({height: 25, width: 80, disabled: true});
    	             
    	        function enableDisable(){
    	            if ($('#company').jqxInput('val').length == 0 && $('#warehouse').jqxInput('val').length == 0) {
    	                $("#save").jqxButton({ disabled: true });
    	            }
    	            else {
    	                $("#save").jqxButton({ disabled: false });
    	            }    
    	        }
    

    i also tried to get the value like this and it’s not get it:

    `
    var companyState = $(‘#company’).jqxInput(‘val’).length;


    cpuin
    Participant

    Dear Nadhezda,

    I know your code, but i have 4 jqxInput widgets and i don’t know for each of them to write same code, this is the reason i try to use this function for all of them, unfortunately after reviewing both the documentation of jQuery and your can’t find soliution.


    cpuin
    Participant

    Unfortunately with this code when a value is set to the $(‘#company’), the button become active, meaning when click it works, but remains grayed-out as it was disabled.

    
    $("#tableCompany").on('rowDoubleClick', function (event) {
    						         var args = event.args;
    						         var index = args.index;
    						         var row = args.row;
                                     $('#company').jqxInput('val', row.Company);
                                     
                                     var length = $("#company").jqxInput('val').length;
                                     var button = $("#save");
                                     enableDisable(length, button);
                                     
                                     //global variable
                                     companyID = row.ID;
    						         $("#selectCompanyWin").jqxWindow('close');
    						                      
    						                      
    						                 });
    
    $("#save").jqxButton({height: 25, width: 80, disabled: true});
    	        
    	        $("#company").on("change", function () {
    	        	var length = $("#company").jqxInput('val').length;
    	        	var button = $("#save");
    	            enableDisable(length, button);
    	        });
    	        
    	        
    	        function enableDisable(length, button){
    	            if (length == 0) {
    	                button.prop('disabled', true);
    	            }
    	            else {
    	                button.prop('disabled', false);
    	            }
    	        }
    

    cpuin
    Participant

    Thank you very much Nadhezda.I appreciate your help!


    cpuin
    Participant

    Dear Nadezda,

    In your documentations is written the following:

    This event is triggered when the value is changed.

    Code examples

    Bind to the change event by type: jqxInput.

    $(‘#jqxInput’).on(‘change’,
    function () { var value = $(‘#jqxInput’).val(); });

    Due to this description i set a new value like this:

    
    $("#company").jqxInput({height: 25, width: 300, minLength: 1});
    $('#company').jqxInput('val', row.Company);
    

    after that i expect when value is set the button to become enabled, like this:

    
    $("#save").jqxButton({height: 25, width: 80, disabled: true});
    	        $("#company").on("change", function () {
    	                        if ($("#company").jqxInput('val').length == 0) {
    	                            $("#save").jqxButton({ disabled: true });
    	                        }
    	                        else {
    	                            $("#save").jqxButton({ disabled: false });
    	                        }
    	                    });
    

    Nothing happens when new value has being set.In meantime i try to change the value manually and it works.
    This means that the event is not triggered when the value changes as is written, but when somebody types in the filed the value.
    Please advice.I’m trying to use this as input validation, in my case i don’t want to use the one of jqwidgets.
    How can i enable the button when new value is set to the jqxInput (it’s read only!).


    cpuin
    Participant

    Dear Nadhezda,

    Be sure, that you API documentation is the place where i spend my days ultimately.
    I can’t find difference between the code you posted and the one i posted.Despite of this the code you posted doesn’t work to me either.
    The button stays disabled all the time.


    cpuin
    Participant

    I have the same problem.
    Readonly property of the DateTimeInput doesn’t work:
    Here is the code:

    $("#docDate").jqxDateTimeInput({width: '100px', height: '25px', formatString: "yyyy-MM-dd", readonly:true});
     $("#docDate").jqxDateTimeInput('setDate', $("#date").jqxDateTimeInput('getDate'));

    cpuin
    Participant

    Dear Ivailo,

    There is no example how to keep both , the label and the value in array as source.


    cpuin
    Participant

    I got this error when the data is empty, and NO errors when there is some data.

    Error: Invalid Selector – .printButtons! Please, check whether the used ID or CSS Class name is correct.


    cpuin
    Participant

    Dear Ivailo,

    Now i understood.
    In this case i’m wandering how to keep ID and Value in empty array.

Viewing 15 posts - 1 through 15 (of 89 total)