jQWidgets Forums
Forum Replies Created
-
Author
-
January 4, 2017 at 3:44 pm in reply to: Issue with rendered status bar Issue with rendered status bar #90321
Hi Peter,
Thanks for your reply.
I’ll modify / rearrange the code and try to initiate the grid once and repost.
Thanks,
KiranJune 27, 2016 at 5:55 am in reply to: Dependent Dropdown inside JQXGRID Dependent Dropdown inside JQXGRID #85426Hello Dimitar,
Can you please create a page or code and share. I’m urgent need of it.
Thanks,
KiranJune 23, 2016 at 8:23 am in reply to: Dependent Dropdown inside JQXGRID Dependent Dropdown inside JQXGRID #85380Hello 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,
KiranJune 22, 2016 at 1:41 pm in reply to: Dependent Dropdown inside JQXGRID Dependent Dropdown inside JQXGRID #85354Hello 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
togetGroups.php
when ever there is change inteam
dropdown and process and returns the json values. However, I cannot see any details ingroup
drop down. I’m unable to understand where I’m going wrong. Please help.Thanks,
KiranJune 16, 2016 at 11:21 am in reply to: Dependent Dropdown inside JQXGRID Dependent Dropdown inside JQXGRID #85160{ 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 }
Hi Hristo,
Its not working.
Thanks,
KiranHi 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 asPlease Choose..
. unable to understand where I’m failing. I tried to moveeditor.jqxDropDownList({ autoDropDownHeight: true, source: groupnames });
outside the ajax braces and makinggroupname
as global variable. But it same issue.Can you please create any example without switch case and using JSON binding data for DD.
Thanks,
KiranHello 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 -
AuthorPosts