jQWidgets Forums

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Issue with rendered status bar Issue with rendered status bar #90321

    Kiran
    Participant

    Hi Peter,

    Thanks for your reply.

    I’ll modify / rearrange the code and try to initiate the grid once and repost.

    Thanks,
    Kiran


    Kiran
    Participant

    Hello Dimitar,

    Can you please create a page or code and share. I’m urgent need of it.

    Thanks,
    Kiran


    Kiran
    Participant

    Hello Dimitar,

    Made following change. But still no success.

    { text: 'Group', datafield: 'group1', columntype: 'dropdownlist',
                            initeditor: function (row, column, editor) {
                               editor.jqxDropDownList({ autoDropDownHeight: true, source: groupAdapter });
                            },
                           cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
                                if (newvalue == "") return oldvalue;
                            },    
                           width:  "9%",cellclassname: "columncolorEdit", cellsrenderer: renderer }

    But one thing, the drop down height is getting adjusted based upon content, but with blank field.
    I guess, I’m near to solution but not sure what I’m missing. 🙁

    Thanks,
    Kiran


    Kiran
    Participant

    Hello Dimitar,
    Thanks for your help.
    I followed the steps mentioned demo. But still unable to get the data. Can you please help.

    
    var groupSource =
    		{
    			datatype: "json",
    			datafields: [
                                    { name: 'teamId'},
    				{ name: 'group1Name'},
                                    { name: 'sl'}
    			        ],
                           
    			url: 'getGroups.php',
    			cache: false,
    			async: false
    		};
    
      var groupAdapter = new $.jqx.dataAdapter(groupSource);

    ——

     { text: 'Team', datafield: 'team',columntype: 'dropdownlist',
                            createeditor: function (row, column, editor) {
                                 editor.jqxDropDownList({ autoDropDownHeight: true, source: teamnames});
                            }, cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
                           if (newvalue == "") return oldvalue;
                                else{
                                    groupSource.data = {teamId: newvalue};
                                    groupAdapter = new $.jqx.dataAdapter(groupSource);
                                }
                            },    
                
                          width:  "7%",cellclassname: "columncolorEdit", cellsrenderer: renderer },
    
    { text: 'Group', datafield: 'group1', columntype: 'dropdownlist',
                            createeditor: function (row, column, editor) {
                               editor.jqxDropDownList({ autoDropDownHeight: true, source: groupAdapter });
                            },
                           cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
                                if (newvalue == "") return oldvalue;
                            },    
                           width:  "9%",cellclassname: "columncolorEdit", cellsrenderer: renderer }

    I’m able to receive the teamId to getGroups.php when ever there is change in team dropdown and process and returns the json values. However, I cannot see any details in group drop down. I’m unable to understand where I’m going wrong. Please help.

    Thanks,
    Kiran


    Kiran
    Participant
    { text: ‘Group’, datafield: ‘group1′, columntype: ‘dropdownlist’, initeditor: function (row, column, editor) {
    var teamName= $(‘#jqxgrid’).jqxGrid(‘getcellvalue’, row, “team”);
    if(teamName){
    $.ajax({
          url:’getGroups.php?teamName=’+teamName,
          type:”GET”,
         success:function(result){
         alert(result); // I’m getting the required data here.
         groupnames=(result);
         }
        });
    }
    editor.jqxDropDownList({ autoDropDownHeight: true, source: groupnames });
    },
    
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    // return the old value, if the new value is empty.
    if (newvalue == “”) return oldvalue;
    },
    width: “9%”,cellclassname: “columncolorEdit”, cellsrenderer: renderer
    }
    in reply to: Dependency dropdown list Dependency dropdown list #82104

    Kiran
    Participant

    Hi Hristo,

    Its not working.

    Thanks,
    Kiran

    in reply to: Dependency dropdown list Dependency dropdown list #81918

    Kiran
    Participant

    Hi Hristo,

    I’m not getting error message in console. In debug mode (firebug), the variable groupname is getting the expected value.
    editor.jqxDropDownList({ autoDropDownHeight: true, source: groupnames }); even here also. But after this if I continue, the dropdown will be empty as Please Choose... unable to understand where I’m failing. I tried to move editor.jqxDropDownList({ autoDropDownHeight: true, source: groupnames }); outside the ajax braces and making groupname as global variable. But it same issue.

    Can you please create any example without switch case and using JSON binding data for DD.

    Thanks,
    Kiran

    in reply to: Dependency dropdown list Dependency dropdown list #81831

    Kiran
    Participant

    Hello Hristo,

    I checked all the links provided by you. Thanks.
    However, I’m trying dependency dropdown with dynamic data source using ajax.

    data=['Gp1','Gp2','Gp3','Gp4','Gp5'] // reply from ajax request.
    In my above code, if I replace there
    groupname=data;
    with
    groupname=['Gp1','Gp2','Gp3','Gp4','Gp5'];

    it works awesome.

    Then, why we need to hard code the array, instead of directly assigning groupname=data ?
    and why I need to use “createeditor” while using “initeditor” ?

    Please help.

    Thanks,
    Kiran

Viewing 8 posts - 1 through 8 (of 8 total)