jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • in reply to: Getting data by search. Getting data by search. #83003

    Programmerswe
    Participant

    Nvm, fixed it. 🙂

    in reply to: Getting data by search. Getting data by search. #82997

    Programmerswe
    Participant

    Or maybe: Ol search, change the url, reload the grid data. Getting the input from the searchfield.

    in reply to: Getting data by search. Getting data by search. #82996

    Programmerswe
    Participant

    So, basically, can you take the input fields, send them to get URL that gets the data and then reload the grid with the data returned?

    in reply to: Problem loading data Problem loading data #82516

    Programmerswe
    Participant

    Nvm, I’ve fixed it. 🙂

    in reply to: Getting data by search Getting data by search #81777

    Programmerswe
    Participant

    Thanks for the help Dimitar!

    in reply to: Getting data by search Getting data by search #81673

    Programmerswe
    Participant

    Hm, yes, it’s starting to work, almost at least. Still having some difficulty with the getting of the data. The grid loads without any data. But as soon as i filled in something to search for, the grid gets filled with all the data, not only the data that i searched for.

    in reply to: Getting data by search Getting data by search #81661

    Programmerswe
    Participant

    Almost yeah, its a great start. However the grid is already loaded with the data when you get to the page. It should be empty and just get the data similar to the search in the input field. This should be possible to do somehow though, right?

    in reply to: change editable dynamically change editable dynamically #75912

    Programmerswe
    Participant

    Got it, thanks for the help, you guys are awesome!

    in reply to: change editable dynamically change editable dynamically #75898

    Programmerswe
    Participant

    I am using the “setcolumnproperty”. The question is where i should use the if statement containing it.

    in reply to: change editable dynamically change editable dynamically #75894

    Programmerswe
    Participant

    Im looking for a way to run the

    
    var loggedInUser = document.getElementById("loggedInUser").innerHTML;				
    	if(loggedInUser == "ME"){
    		$('#jqxgrid').jqxGrid('setcolumnproperty', 'Comment', 'editable', true);
    	}
    

    when the grid is loaded. So i can change the comments editable value depending on which user is logged in on the site.
    Is there a way to do this with anything in your api?

    in reply to: change editable dynamically change editable dynamically #75891

    Programmerswe
    Participant

    Ive tried yo use

    
    gridComplete: function () {
    	var loggedInUser = document.getElementById("loggedInUser").innerHTML;				
    	if(loggedInUser == "ME"){
    		$('#jqxgrid').jqxGrid('setcolumnproperty', 'Comment', 'editable', true);
    	}
    },
    

    But it didnt work for some reason, but gave me:

    uncaught exception: jqxCore: invalid property ‘gridComplete’

    in reply to: Bugg with sorting? Bugg with sorting? #75801

    Programmerswe
    Participant

    Never mind. Ive solved it!

    in reply to: Bugg with sorting? Bugg with sorting? #75792

    Programmerswe
    Participant

    Is it enough to see the problem?

    in reply to: Bugg with sorting? Bugg with sorting? #75773

    Programmerswe
    Participant

    Ive got some sensitive code that i really cant shear for all to see.
    however, i can give this to you, it should be enough.

    
    $('#jqxGrid').on('rowexpand', function (event) {
    			var args = event.args;
    			var details = args.details;
    			selectedRowIndex = args.rowindex;
    			var boundIndex = $('#jqxGrid').jqxGrid('getrowboundindex', selectedRowIndex);
    			var val = $('#jqxGrid').jqxGrid('getcellvalue', boundIndex, "Id");
    			var vall = $('#jqxGrid').jqxGrid('getcellvalue', boundIndex, "UserName");
    			var rows = $('#jqxGrid').jqxGrid('getrows');
    			var id = 'yourIframe_'+val;
    			var usertest = document.getElementById("loggedInUser").innerHTML;
    		   window.setTimeout( function(){
    			   
                       alert ("Username: "+vall+" id: "+val);
    		   }, 10); 
    		});
    

    This works no matter if the grid got a filter and i search on it and select an user wile it filtered for exemple: “Pizzas”. Its awesome.

    
    $("#jqxGrid").on('cellendedit', function (event) 
    		{
    			// event arguments.
    			var args = event.args;
    			// column data field.
    			var dataField = event.args.datafield;
    			// row's bound index.
    			var rowBoundIndex = event.args.rowindex;
    			// cell value
    			var value = args.value;
    			// cell old value.
    			var oldvalue = args.oldvalue;
    			// row's data.
    			var rowData = args.row;
    			
    			var args = event.args;
    			var details = args.details;
    			selectedRowIndex = args.rowindex;
    			var boundIndex = $('#jqxGrid').jqxGrid('getrowboundindex', selectedRowIndex);
    			var val = $('#jqxGrid').jqxGrid('getcellvalue', boundIndex, "Id");
    			var vall = $('#jqxGrid').jqxGrid('getcellvalue', boundIndex, "UserName");
    			
    			alert ("Username: "+vall+" id: "+val);
       
    			}
    			
    		});
    

    This code however, dosn’t. It dosn’t take to account that the grid is filtered. And therefore, when i do a cell edit in the start, it might show the username and id for the user 4 rows down or so. And if i filter again for “pizzas”, it only gives me null as values.

    So, basically on the rowexpand, it works perfectly. On cellendedit or any other event, it dosn’t work for me!

    I’m sorry for my lack of english, its not my native language. And cheers for all the help, you guys are awesome.

    in reply to: Keep old value inside cell Keep old value inside cell #75686

    Programmerswe
    Participant

    Tried it, when i use

    
    if (confirm('are you sure that you want to change the old value "'+oldvalue+'" to "'+value+'"?')) {
    			     Change value....
    			} else {
                            $("#jqxgrid").jqxGrid('setcellvalue', 0, "Comment", "test");
    	                }
    

    And click “cancel” it gets stuck in a loop kinda.

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