jQWidgets Forums
jQuery UI Widgets › Forums › Grid › When source has parameters dropdownlist is not refreshing its data
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 12 years, 1 month ago.
-
Author
-
In grid2 the dropdownlist cell “part_sp” shows a null value in every record
The problem is when the source “enquiry_parts_sp_source ” has parameters data: {enquiry_part : sessionStorage.enquiry_part}
When there is no parameters for the mysql query the dropdownlist shows the right value .
Is there a way for “enquiry_parts_sp_source” to load the data with the new parameters and not with the first time loaded parameters ?var enquiry_parts_sp_source =
{
datatype: “json”,
datafields: [
{ name: ‘ENQUIRY_PART_SP_ID’ },
{ name: ‘record1’ },
{ name: ‘ENQUIRY_PART’ },
{ name: ‘ITEM_NO’ },
],
cache: false,
async: false,
url: ‘php/quotations/enquiry_parts_sp__enquiry_part.php’,
type: ‘POST’,
data: {enquiry_part:sessionStorage.enquiry_part} ,
}var quotation_enquiry_parts__quotation__enquiry_part_source =
{
datatype: “json”,
datafields: [
{ name: ‘PART_DESC_SUPPLIER’ },
{ name: ‘QUANTITY_SUPPLIER’ },
{ name: ‘UNIT_SUPPLIER’},
{ name: ‘UNIT_SUPPLIER11’ , value: ‘UNIT_SUPPLIER’, values: {
source: units_adapter.records, value: ‘UNIT_ID’, name: ‘UNITNAME’ ,autoOpen: true, dropDownHeight: 250 , AutoComplete: true
}},
{ name: ‘ENQUIRY_PART_SP11’ , value: ‘ENQUIRY_PART_SP’, values: {
source: enquiry_parts_sp_adapter.records, value: ‘ENQUIRY_PART_SP_ID’, name: ‘record1’ ,autoOpen: true, dropDownHeight: 250 , AutoComplete: true , // autoBind: true ,
}},
],
cache: false,
//async: false,
url: ‘php/quotations/quotation_enquiry_parts__quotation__enquiry_part.php’,
type: ‘POST’,
data: {enquiry_part:sessionStorage.enquiry_part}
}$(“#grid2”).jqxGrid(
{
source: quotation_enquiry_parts__quotation__enquiry_part_adapter ,
columns: [
{ text: ‘part_sp’ ,datafield:’ENQUIRY_PART_SP’, displayfield: ‘ENQUIRY_PART_SP11′, width: ’80’, columntype: ‘dropdownlist’,
source: enquiry_parts_sp_adapter,
createeditor: function (row, value, editor)
{
editor.jqxDropDownList( //jqxComboBox jqxDropDownList
{ source: enquiry_parts_sp_adapter, valueMember: ‘ENQUIRY_PART_SP_ID’, displayMember: ‘record1’,
autoOpen: true, dropDownHeight: 250 , dropDownWidth: 400
}
);
},
},
],
}
);Hi,
The “data” object will not be evaluated again in the next Ajax call. So you would better use the “formatdata” callback function instead.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.