jQuery UI Widgets Forums Grid Dropdown List To Make Disable Problem

Tagged: ,

This topic contains 6 replies, has 2 voices, and was last updated by  Martin 5 years, 10 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Dropdown List To Make Disable Problem #103076

    processmakeruser
    Participant

    Hello!

    I have a problem about grid. I want to make disable some data in dropdown list. If the “Taşeron” of columnd is clicked, the data should be disable. It is difficult to expalin because of this I added some videos. I hope I could understand it.

    Thanks

     {
                    text: 'Seçenekler',
                    datafield: 'SECENEKLER',
                    columntype: 'dropdownlist',
                    editable: true,
    
                    cellclassname: cellclassname,
                    width: '10%',
    
                    createeditor: function (row, value, editor) {
                        var SECENEKLER = ["Peşin Ödeme", "Sonradan Ödeme", "Doğrudan Alım", "Onaya Gönder", "İptal"];
    
                        editor.jqxDropDownList({
                            autoDropDownHeight: true,
                            source: SECENEKLER,
                            placeHolder: "Lütfen Seçiniz:"
                        });
                        editor.bind('open', function (event) {
                            //first, enable all items
    
                            //second, disable items by value of rows
    
                            var rowData = $('#TalepDegerlendir').jqxGrid('getrowdata', row);
                            if (rowData.TASERON == 1) {
                                editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "Peşin Ödeme"));
                                editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "Doğrudan Alım"));
                                editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "Onaya Gönder"));
                                editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "İptal"));
                            }
    
                        });           
    
                    },

    https://drive.google.com/drive/folders/1jF-1A6ekA554qMw9URCvILFYprW61O4j?usp=sharing

    Dropdown List To Make Disable Problem #103085

    Martin
    Participant

    Hello processmakeruser,

    I have created this Example, based on your code.
    It seems to work fine. On the rows where the “available” column box is checked, two of the dropdown option are disabled.

    Best Regards,
    Martin

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

    Dropdown List To Make Disable Problem #103110

    processmakeruser
    Participant

    Hi Martin!

    I tried it like you said but it doesn’t work as I want. Mine is old version jqwidgets. It is jqwidgets v4.4.0 (2016-Now) version. I think because of this it doesn’t work well.

    Can you help me how can I do it in this version?

    Best Regards

    Dropdown List To Make Disable Problem #103145

    Martin
    Participant

    Hello processmakeruser,

    Yes, it seems that it is from the version.
    I think that in the older version only one dropdownlist is created for all rows, so after that only the open event is fired.
    So can you try this Solution, with getting the current row index in the cellbeginedit event
    and updating the dropdownlist options.

    Best Regards,
    Martin

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

    Dropdown List To Make Disable Problem #103149

    processmakeruser
    Participant

    Hi Martin!

    Thanks a lot. I solved my problem thanks to you

    Best regards

    Dropdown List To Make Disable Problem #103449

    processmakeruser
    Participant

    Hi Martin!

    I have a problem and I write it both here and the forum in a new topic. I want to read data in nested grid without to do showrowdetails.

    In addition I added a video. You can see my problem in the video.

    Can you help me about it?

    https://drive.google.com/open?id=1qfPEg4h1IeW70Sbd1UMQSCAFGzOyyoQV

    Dropdown List To Make Disable Problem #103463

    Martin
    Participant

    Hello processmakeruser,

    I have answered you in the new Topic that you’ve opened.

    Best Regards,
    Martin

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

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

You must be logged in to reply to this topic.