jQWidgets Forums

jQuery UI Widgets Forums Grid is it posible set the property editable for each cell in a Grid?

This topic contains 6 replies, has 4 voices, and was last updated by  Peter Stoev 11 years, 7 months ago.

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

  • jose Ivan
    Member

    Hi,

    i was wondering if can i set property editable in cell , i know there’s a property editable for each column  for example i need that just the new data in clienside be editable and many columns and the data comes from server don’t be editable…

    ————————————————————————————————-

    column 1                                        |column 2                                    | column 3                                 |

    ————————————————————————————————–

    data from server no editable  | data from server editable       | data from server editable |

    ————————————————————————————————–

    new data from client editable | new data from client editable |new data from client editable

    As you can see the firts column and first row is not editable because comes from server and i need not editble  but the same column can be editable for new data .

     

     


    Peter Stoev
    Keymaster

    Hi jose Ivan,

    It is still not possible to disable the editing of a particular Grid cell. It is possible only to disable the editing of entire column, but your suggestion makes sense. I will create a new work item regarding this functionality and we will implement it in a future version of our Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    Minh Ly
    Member

    Hi Peter Stoev,

    Can we have any work-round solution for this limitation?

    Example: Can we use the event “initeditor” to disable the cell editing? or can we get the current editing object that we can disable it by javascript?

    Waiting for your response ASAP.

    Thanks,
    Minh


    Peter Stoev
    Keymaster

    Hi Minh,

    My previous answer is still valid. You can disable the editing of entire Grid column, but not for a particular cell. That functionality will be available in the next release of jQWidgets.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    jose Ivan
    Member

    Hi thank for reply …. mmm i was thinking in this solution….. i had to add a field call isClient hidden of type bool so in document ready i set false and then i thought cancell the edition it’s isClient is false with this line $(grid).jqxGrid(‘endcelledit’, row, ‘jobid’, false); but as result this i think the remove the editor so when initeditor finish and come back at your script this make a error in jxgrid.editor in line
    g.css(“display”, “block”);
    this.editcell.editor = g

    so i decide create a property in grid call lasroweditable =false so just only when it the last row and then field is that i want let editable

    this.addHandler(this.host, “keydown.edit” + this.element.id, function (g) {
    var f = true;
    if (d.editable && d.editmode != “programmatic”) {
    if (d._handleeditkeydown) {
    var cel = d.getselectedcell();
    if ((d.noteditable.indexOf(cel.datafield) == -1 || d.getrowdata(cel.rowindex)[d.source._source.id] == 0) && d.lastrowEditable == false)
    f = d._handleeditkeydown(g, d)

    }
    }

    noeditable is a list of fields no editable so i search it and it isn’t no contains u can edit. maybe it’s not the most engine solution but it works…


    rajendra
    Participant

    Hi Peter,

    I have the requirement that is “disable the editing of entire Grid column”. Can you please give the release number/script for my requirement.

    Thanks in advance,
    Rajendra


    Peter Stoev
    Keymaster

    Hi Rajendra,

    The solution is: set the editable property of the column to false.

    Best Regards,
    Peter Stoev

    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.