jQWidgets Forums
jQuery UI Widgets › Forums › Lists › DropDownList › Selected value changes as i move out of Dropdownlist cell in Grid
Tagged: jqdropdownlist- selection issue
This topic contains 7 replies, has 2 voices, and was last updated by Keshavan 12 years, 3 months ago.
-
Author
-
Hi,
I have a ‘jqdropdownlist’ in the 1st cell of my Grid, Problem is,
1) when i select an item from displayed list in dropdown and move to next field in grid, the value in the 1st cell (coltype:dropdownlist)
changes.2) when i finish entering all cell values in grid(except first cell as above) Row is not getting inserted . because of issue as in 1) above.
need help as to what is wrong in the code below,
$(“#jqxgrid”).jqxGrid(
{
width: 950,
height: 350,
source: source1,
sortable: true,
theme: ‘ui-smoothness’,
pageable: true,
editable: true,
editmode: ‘selectedcell’,
rowdetails: true,
filterable: true,
columnsresize: true,
columnsreorder: true,
groupable: true,
rowsheight: 20,
altrows: true,
columns:
[
{
text: ‘Group’, columntype: ‘dropdownlist’, datafield: ‘GroupCompanyId’, width: 300,
createeditor: function (row, cellvalue, editor)
{
editor.jqxDropDownList({ selectedIndex: 0, source: dataAdapter1,valueMember:”GroupCompanyId”,displayMember: “GroupName” })
}
},
{ text: ‘Company’, datafield: ‘CompanyName’, width: 215 },
{ text: ‘Unit’, datafield: ‘Unit’, width: 80 },
{ text: ‘Phone’, datafield: ‘Phone’, width: 180 },
{ text: ‘Email ‘, datafield: ‘EmailId’, width: 180 },
{ text: ‘Address ‘, datafield: ‘AddressLine1’, width: 100 },
{ text: ‘ ‘, datafield: ‘AddressLine2’, width: 100 },
{ text: ‘Zip’, datafield: ‘Zip’, width: 80 },
{ text: ‘Country’, datafield: ‘Country’, width: 80 },
{ text: ‘Culture’, datafield: ‘Culture’, width: 80 },
{ text: ‘Other’, datafield: ‘Miscellaneous1’, width: 80 },
{ text: ‘ ‘, datafield: ‘Miscellaneous2’, width: 80 },
{ text: ‘ ‘, datafield: ‘Miscellaneous3’, width: 80 }
]
});thanks,
Keshavan
Hi Keshavan,
If you select a value from DropDownList editor and move to a next cell, the cell’s value will be updated by design.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
ok, but as i move to next cell after selecting an item , the selected value in the first cell(drop down) is changing and DB is not getting updated even as i enter remaining cell values for the row in grid.
Issue is w.r.t Dropdownlist selection. is not getting assigned to my grid cell.
please help.
Thanks,
Keshavan
Hi Keshavan,
jqxGrid does not update your DB after editing. That a code which you should write in the “updaterow”, “addrow” and “deleterow” callback functions which are expected to be defined in the “source” object from which you initialize the jqxDataAdapter instance.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Yes, i have those methods, will check my code and if problem persists will came back to you.
Thanks,
Keshavan
Hi Peter,
The Issue is with dropdownlist,
i have 2 items in dropdown, even if i select the 2nd item. the field shows value as ‘0’ instead of ‘1’.
Please help.
Thanks,
Keshavan
Hi Keshavan,
The DropDownList editor works fine in our demos. Please, take a look at the implementation of this sample with a DropDownList column: gridkeyvaluescolumnwitharray.htm. It shows how the editor should be initialized and it also shows how to initialize it with a custom Source as in your sample. In addition, make sure that you bind the Grid to an instance of jqxDataAdapter, not to a “source” object.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Issue solved with your example code, Thanks for the fast response.
Thanks,
Keshavan
-
AuthorPosts
You must be logged in to reply to this topic.