jQuery UI Widgets › Forums › Grid › combobox on grid
Tagged: combobox in grid, datagrid control, grid control, javascript grid, jquery grid, jqwidgets datagrid, jqwidgets grid, js grid
This topic contains 3 replies, has 2 voices, and was last updated by masda 10 years, 10 months ago.
-
Authorcombobox on grid Posts
-
I have a combobox in a grid, when create the combo box, i just got visible the ValueMember of the combobox, when I go to combobox, loading it, the values that appear is DisplayMember, but after selecting and upgrade the grid, i have back the valueMember instead of the DisplayMember.
Hi masda,
To learn how to use ComboBox inside Grid, please refer to – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customcomboboxcolumn.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/I followed an example by but now, the combo box is blank when I load the grid, but after the update, the value is correct, this is my code:
`var source_combobox_parente =
{
datatype: “json”,
datafields: [
{ name: ‘utente_tipo_parente_id’ },
{ name: ‘utente_tipo_descricao’ }
],
url: ‘./php/utente_maint.php’,
type: ‘POST’,
data: {funcao : funcao}
};
var dataAdapter_combobox_parente = new $.jqx.dataAdapter(source_combobox_parente);var source_parentes =
{
datatype: “json”,
datafields: [
{ name: ‘utente_parente_tipo_parente’},
{ name: ‘tipo_parente’, value: ‘utente_parente_tipo_parente’, values: {source: dataAdapter_combobox_parente.records, value: ‘utente_tipo_parente_id’, name: ‘utente_tipo_descricao’}}
], …$(“#jqxgrid_parentes”).jqxGrid(
{
width: ‘100%’,
height: ‘100%’,
source: dataAdapter_parentes,
columnsresize: true,
sortable: true,
columnsreorder: true,
filterable: true,
columns:
[
{ text: ‘Tipo Parente’, datafield: ‘utente_parente_tipo_parente’, displayfield: ‘tipo_parente’, columntype: ‘combobox’,
createeditor: function (row, value, editor) {
editor.jqxComboBox({ source: dataAdapter_combobox_parente, displayMember: ‘utente_tipo_descricao’, valueMember: ‘utente_tipo_parente_id’ });
}
}, …thanks
Can someone help?
-
AuthorPosts
You must be logged in to reply to this topic.