jQWidgets Forums

jQuery UI Widgets Forums Grid Dropdownlist column in grid

This topic contains 5 replies, has 2 voices, and was last updated by  Dimitar 12 years, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Dropdownlist column in grid #9826

    sreeni379
    Member

    Hi,

    In my grid have two columns have dropdownlists binded same list to dropdownlist.while reading  i was not getting  second dropdownlist column value and While reading what every i changes in dropdown values i was not getting .Following code written for dropdownlists.

        var Adminusersource =
                 {
                     datatype: "json",
                     datafields: [
                         { name: 'PrimaryUserID' },
                         { name: 'AdminUsernames' }
                     ],
                     id: 'id',
                     url: '../DataAdminOwnership/GetAdminUsers/'
    
                 };
    
                var AdmindUserataAdapter = new $.jqx.dataAdapter(Adminusersource);
    
     $("#").jqxGrid(
                    {
                        width: 886,
                        height: 220,
                        editable: true,
                        source: PlatformdataAdapter,
                        theme: theme,
                        altrows: true,
                        filterable: true,
                        selectionmode: 'singlecell',
                        pageable: true,
                        sortable: true,
                        pageable: true,
                        enabletooltips: true,
                        columns: [
                                        { text: 'Platform ', dataField: 'Platform', editable: false, width: 295 },
                                        { text: 'PrimaryOwner', dataField: 'PrimaryUserName', columntype: 'dropdownlist', width: 296,
                                        createeditor: function (row, cellvalue, editor) {
                                            editor.jqxDropDownList({ displayMember: 'AdminUsernames', valueMember: 'AdminUserIDs',source: AdmindUserataAdapter });
                                            editor.bind('select', function (event) {
                                                var selectedIndex = event.args.index;
                                            });
                                        }
                                        },
                                       // { text: 'PrimaryUserID', dataField: 'PrimaryUserID', columntype: 'dropdownlist' },
                                        {
                                            text: 'BackUpOwner', dataField: 'BackupOwnersName', columntype: 'dropdownlist', width: 300,
                                            createeditor: function (row, cellvalue, editor) {
                                                editor.jqxDropDownList({ displayMember: 'AdminUsernames',valueMember: 'AdminUserIDs', source: AdmindUserataAdapter});
                                                editor.bind('select', function (event) {
                                                    var selectedIndex = event.args.index;
                                                });
                                        }
                                        }
                                        //{ text: 'BackupOwnersID', dataField: 'BackupOwnersID', columntype: 'dropdownlist' }
    
                        ]
                    })
    Thanks
    Sree
    Dropdownlist column in grid #9834

    Dimitar
    Participant

    Hello Sree,

    The valuemember of your dropdownlist column (in this case, columns) – ‘AdminUserIDs’ is not present in your source. This may be the cause for your issue.

    Best Regards,
    Dimitar

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

    Dropdownlist column in grid #9839

    sreeni379
    Member

    Hi Dimitar,

    I change what ever you suggested but still have same problem, I am not read values from dropdownlists,Can you suggest me .
    Thanks
    Sree

    Dropdownlist column in grid #9904

    Dimitar
    Participant

    Hi Sree,

    Did you add the ‘AdminUserIDs’ datafield? Does your source file have three datafields? Please provide this additional feedback.

    Best Regards,
    Dimitar

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

    Dropdownlist column in grid #9917

    sreeni379
    Member

    Hi Dimitar,

    I Changed ‘AdminUserIDs’ ‘ datafield. Still i have same problem , Here i find problem , Dropdownlist iteam selected through mouse after selection that iteam is not binding to row ,when i press enter key in keyboard than that item is binding row than i reading that value.is there any mouse evet for bind row after selection iteam . Please can suggest me.

    Thanks
    Sreeni

    Dropdownlist column in grid #9936

    Dimitar
    Participant

    Hi Sreeni,

    It is not possible to save the cell on item selection. You have to click outside the cell or press the enter key to do that.

    As for the previous issue, please provide us with your updated source code so we can better be of help.

    To see how to format HTML code properly in this forum, please check out the topic Code Formatting.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.