Forum Replies Created

Viewing 15 posts - 46 through 60 (of 60 total)
  • Author
    Posts

  • nico86
    Participant

    Sorry foy my absence, i’m in holiday.

    In fact, I would like to use the same grid for several datatabse not identical.
    So if I don’t know the exact number and names of my database entry come there is no solution for me ?

    thanks


    nico86
    Participant

    Could I have an answer about my last question.
    Thanks.


    nico86
    Participant

    Thanks for your answer

    But we always have to define the name of each fields in the datafields and therefore know the structure?
    thanks


    nico86
    Participant

    I made an example to reproduce the bug : if you use the filter and click one of them, two boxes are checked

    http://jsfiddle.net/72bcw8tj/6/

    Thanks


    nico86
    Participant

    i made a little sample with jsfiddle.net and it’s true, all is ok…..very strange because doesn’t work into my web application, Do you think that the problem came of the datasource (over 1000 lines), dataadaptateur (dataType : ‘json’) ? could you try with external json source ?

    Here my js code :

       $.ajax({
    	type : 'POST', // envoi des données en GET ou POST
    	beforeSend : function() {},
    	url : 'http:'+server_sp+'/Coding/Metaddra_test/LLT_LIST',	// url du fichier de traitement	
    	async:false,	
    	data : '',
    	dataType : 'json',
    	success  : function(data){
    				},
    	complete :function(data){
    		var resu= eval(data);  
    		
                    var source =
                    {
                        datatype: "json",
                        datafields: [
                            { 
    						  name: 'LLT'
    						  }
                        ],
    
    					localdata: resu
                    };
    				
                    var dataAdapter = new $.jqx.dataAdapter(source);
                    $("#jqxWidget").jqxListBox({ source: dataAdapter, displayMember: "LLT", width: 300, height: 350, checkboxes: true , filterable: true, searchMode: 'contains', theme: 'metro'});
                    $("#jqxWidget").on('checkChange', function (event) {
                        var args = event.args;
                        if (args.checked) {
                            $("#Events").text("Checked: " + args.label);
                        }
                        else {
                            $("#Events").text("Unchecked: " + args.label);
                        }
                        var items = $("#jqxWidget").jqxListBox('getCheckedItems');
                        var checkedItems = "";
                        $.each(items, function (index) {
                            if (index < items.length - 1) {
                                checkedItems += this.label + ", ";
                            }
                            else checkedItems += this.label;
                        });
                        $("#CheckedItems").text(checkedItems);
    				});
    				$('#ajax-loader1').remove(); // on enleve le loader
    	}										
    		});

    nico86
    Participant

    It is ListXox widget, not dropdownlist…sorry for my mistake…if you could move this thread.

    ok for the answer, this feature is really important for me.


    nico86
    Participant

    I resolved my problem adding displaymember, sorry
    $(“#jqxWidget”).jqxListBox({ source: dataAdapter, displayMember: “LLT”, width: 300, height: 350, checkboxes: true });

    have a nive day


    nico86
    Participant

    my data return from ajax request are like this (i try with or without id)

    stocker des photos

    thanks


    nico86
    Participant

    ok
    when I click my save Button, I transform my dates into my javascript file before recorded data like this
    …. dateA=row.Date;
    dateB= (dateA.getMonth()+1)+”/”+dateA.getDate()+”/”+dateA.getFullYear();

    but does it means that jqwidget can record the dates in a format but it can not read the same format when I import data ?

    Thanks
    …and sorry for my English, i hope you understand me.


    nico86
    Participant

    Here the good link :

    Into IE, no problem the date is correct
    Hébergeur d'image

    Afer I backup my data in a database, I can see that the date is changed like this (Fri Sep 19 00:00:00 UTC 0200 2014), is there a possibility to recorded date in the same format as in IE 8 client (.d => m/dd/yyyy)
    Hébergeur d'image

    But when I reload my webpage (F5), we can see that the format is not the same like the picture 2 , why ?
    Hébergeur d'image

    And if i want to change this cell….there is a problem with the datepicker like you could see on the two screen below
    Hébergeur d'image
    Hébergeur d'image

    THANKS


    nico86
    Participant

    Sorry it s ok now with

    $(‘#jqxgrid’).jqxGrid(‘beginupdate’);

    $(‘#jqxgrid’).jqxGrid(‘endupdate’);

    thanks


    nico86
    Participant

    Thanks
    it work but performance is very low because i have many columns to hide, is there any solutions ?

    function showhide_row(){
    		$("#jqxgrid").jqxGrid('hidecolumn', 'SOC');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'PROCCOM');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'MEDICNB');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'TREATNAM');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'DRUGCOD');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'DRUGNAME');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'DRUGLBL');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'ATCCOD');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'ATCLBL');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'PLLTCOD');
    		$("#jqxgrid").jqxGrid('hidecolumn', 'PPTCOD');
    		
    		/*
    		if (indts=='MR_AE_17' ) {
    		$("#jqxgrid").jqxGrid('showcolumn', 'SOC');}
    		
    		if (indts.substr(0,6)=='MR_AEP' ) {$("#jqxgrid").jqxGrid('showcolumn', 'PROCCOM');}
    		
    		if (indts=='MR_MH_03' || indts=='MR_MH_04' || indts=='MR_MH_05' ) {$("#jqxgrid").jqxGrid('showcolumn', 'PROCCOM');}
    		
    		if (indts=='MR_MH_06' ) {
    			$("#jqxgrid").jqxGrid('showcolumn', 'MEDICNB');$("#jqxgrid").jqxGrid('showcolumn', 'TREATNAM');$("#jqxgrid").jqxGrid('showcolumn', 'DRUGCOD');}
    
    		if (indts=='MR_MH_07' ) {			
    			$("#jqxgrid").jqxGrid('hidecolumn', 'ADRNBA');$("#jqxgrid").jqxGrid('hidecolumn', 'DISCOM');$("#jqxgrid").jqxGrid('showcolumn', 'ATCCOD')
    			$("#jqxgrid").jqxGrid('showcolumn', 'MEDICNB');$("#jqxgrid").jqxGrid('showcolumn', 'TREATNAM');$("#jqxgrid").jqxGrid('showcolumn', 'DRUGCOD');
    			}
    
    		if (indts=='MR_MH_08' || indts=='MR_MHP_01' || indts=='MR_MHP_02' ) {
    			$("#jqxgrid").jqxGrid('showcolumn', 'PROCCOM');$("#jqxgrid").jqxGrid('showcolumn', 'PLLTCOD'); $("#jqxgrid").jqxGrid('showcolumn', 'PPTCOD');
    			}
    		if (indts=='MR_TT_01'  ) {
    			$("#jqxgrid").jqxGrid('showcolumn', 'MEDICNB');$("#jqxgrid").jqxGrid('showcolumn', 'TREATNAM'); $("#jqxgrid").jqxGrid('showcolumn', 'ATCCOD');
    			$("#jqxgrid").jqxGrid('showcolumn', 'DRUGNAME');$("#jqxgrid").jqxGrid('showcolumn', 'DRUGLBL'); $("#jqxgrid").jqxGrid('showcolumn', 'ATCLBL');
    			$("#jqxgrid").jqxGrid('hidecolumn', 'ADRNBA');$("#jqxgrid").jqxGrid('hidecolumn', 'DISCOM');
    			$("#jqxgrid").jqxGrid('hidecolumn', 'LLTLIST');$("#jqxgrid").jqxGrid('hidecolumn', 'PTLIST');
    			}*/
    }

    nico86
    Participant

    ok but i don’t want use this option to see the maximum of row when i don’t want to see the content of my cell “discom”

    No popup option ?

    thanks


    nico86
    Participant

    it’s ok if i put this outside of validation ;

    $(“#jqxgrid”).bind(‘rowselect’, function (event) {
    row = event.args.rowindex;
    }) ;

    My problem is closed


    nico86
    Participant

    I try to add this to get selected row number, but it seem it don’t run into “validation”.

    $("#jqxgrid").bind('rowselect', function (event) {
    							var row = event.args.rowindex;
    })	;	
    								identity= $("#jqxgrid").jqxGrid('getcellvalue', row, 'NAME');
Viewing 15 posts - 46 through 60 (of 60 total)