jQWidgets Forums

jQuery UI Widgets Forums Grid combobox on grid

This topic contains 3 replies, has 2 voices, and was last updated by  masda 9 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • combobox on grid #70701

    masda
    Participant

    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.

    combobox on grid #70731

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    combobox on grid #70787

    masda
    Participant

    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

    combobox on grid #71073

    masda
    Participant

    Can someone help?

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

You must be logged in to reply to this topic.