jQWidgets Forums

jQuery UI Widgets Forums Grid Custom edit of rows

Tagged: 

This topic contains 4 replies, has 3 voices, and was last updated by  ashensugar 11 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Custom edit of rows #24829

    prabhu
    Member

    Hi Team,

    I have a requirement where I need to make a particular row in a jqxGrid non-editable. I did it using below code

    var beginedit = function (row, datafield, columntype) {
    if ((row == 1) || (row == 3) || (row == 5)) {
    return false;
    };
    };

    I am not able to edit the row, but when I select the row and hit ‘Delete’ button entire row got deleted. Can you suggest a way to avoid this.

    Thanks,
    Kishore

    Custom edit of rows #24842

    Mariya
    Participant

    Hi Kishore,

    Take a look at the provided example at:http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/handlekeyboard.htm?web
    You can use the “handlekeyboardnavigation” callback function in order to override the “del” key’s build-in functionality.

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Custom edit of rows #24854

    prabhu
    Member

    Thanks for your reply, I went through the keyboard navigation event. How ever how do I disable deleting the row. What is the logic that goes inside which will prevent the row from deleting. A sample code would be of great help.

    Thanks,
    kishore

    Custom edit of rows #24856

    prabhu
    Member

    With the following code I can capture the keyboard event but how do I change the rows editable property dynamically.

    handlekeyboardnavigation: function(event) {
    var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
    if (key == 46) {
    ….what logic goes here……
    }
    },

    Thanks,
    Kishore

    Custom edit of rows #27976

    ashensugar
    Participant

    Not too old post, I wish to do the same thing as you prabhu, I want to disable delKey’s default functionnality to erase the row selected, I came to this same point as you where i can capture the event and do something when key “DEL” is pressed but I don’t find how to prevent default erasing.
    Please Help ! Did you find a way to do it finally ?

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

You must be logged in to reply to this topic.