jQWidgets Forums

jQuery UI Widgets Forums Grid how to select row when selectionmode is 'singlecell'

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

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

  • JenkeNg
    Participant

    As the title, when I set the selection mode to ‘singlecell’, I can’t select the row, so I can’t do the operation of deleting the row data, which is just too unreasonable.


    Peter Stoev
    Keymaster

    Hi JenkeNg,

    singlecell or other cell selection modes are for selecting cells. You can still delete rows by using the deleterow method of jqxGrid.

    Best Regards,
    Peter Stoev

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


    JenkeNg
    Participant

    Hi,Peter Stoev.

    I am used to selecting the line first, getting the index of this line, and then performing the delete operation. Now I can’t select this line, so I don’t know what method I should use to delete the specified line. Is there any good advice?


    JenkeNg
    Participant

    Added: I want to get a function like ‘EXCEL’. It can be used for both cell operations and the line to edit or delete. This seems reasonable. Is there any way? This problem has taken me too much time.


    Peter Stoev
    Keymaster

    Hi JenkeNg,

    getselectedcells Method
    The expected selection mode is ‘singlecell’, ‘multiplecells’ or ‘multiplecellsextended’

    Gets all selected cells. Returns an array of all selected cells. Each cell in the array is an Object with two fields: ‘rowindex’ – the row’s bound index and ‘datafield’ – the column’s datafield.

    Parameter Type
    None Return Value
    Array
    Code example
    Invoke the getselectedcells method.

    var cells = $(‘#jqxGrid’).jqxGrid(‘getselectedcells’);

    Having the rowindex, you can get the Row’s ID and invoke the deleterow method to delete a Grid row.

    Hi JenkeNg,

    singlecell or other cell selection modes are for selecting cells. You can still delete rows by using the deleterow method of jqxGrid.

    Best Regards,
    Peter Stoev

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


    JenkeNg
    Participant

    Thank you Peter Stoev.
    I know this method you said, but don’t you think it is not intuitive enough? I actually select this cell to delete this line, so it looks silly. You can refer to Excel for cell selection and row selection, and add a selection mode for merge cell selection and row selection. Will this design be improved? In addition, I found another problem. When ‘selectmodel’ is ‘chekbox’ and ‘editmodel’ is ‘selectedrow’, I select this line and click the edit button beginrowedit on the toolbar. This is all right. And when I clicked on the editor to prepare the input value, I immediately triggered endrowedit. I don’t know if this is a bug. These problems are really frustrating.


    Peter Stoev
    Keymaster

    Hi jenkeNg,

    We have several selection modes to select cells and several selection modes to select rows. You’re looking exactly for Excel selection mode which we do not have.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.