ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: hyh888 on October 13, 2021, 06:44:43 am

Title: There is not Delete-Row function in Context menu.
Post by: hyh888 on October 13, 2021, 06:44:43 am
There is not Delete-Row function in Context menu. For I navigrate to this page from https://paramquery.com/pro/demos/import-xlsx , the picture(pgGrid logo in the table) in the orginal page is still on the new page. I have draged the picture in the orginal page,maybe this action triggered the bug.
Title: Re: There is not Delete-Row function in Context menu.
Post by: paramvir on October 13, 2021, 10:05:15 am
context menu on rows in that example uses deleteRow API method and that's normal designed behaviour of that method not to delete any images.

There is a separate method for removing pictures which is invoked by using context menu on the image itself.

https://paramquery.com/pro/api#method-Pic

Code: [Select]
action: function (evt, ui) {         
    var Pic = this.Pic()
    Pic.remove( Pic.getId( ui.ele ) )
}
Title: Re: There is not Delete-Row function in Context menu.
Post by: hyh888 on October 13, 2021, 10:55:51 am
for there is not "delete row" or "delete rows" option in context menu, can this option be added in the context menu?
Title: Re: There is not Delete-Row function in Context menu.
Post by: paramvir on October 13, 2021, 11:26:15 am
Delete row option is already there in context menu.

Do you mean to include remove images/pictures functionality with delete rows?
Title: Re: There is not Delete-Row function in Context menu.
Post by: hyh888 on October 14, 2021, 08:02:26 am
I recheck the sample in https://paramquery.com/pro/demos, but in the Context Menu there is no "Delete Row" option.  For there is no way to upload screen-cut in the post, I couldn't show you the picture.(http://)  The insert-image function of this forum only enable to insert some html mark in edit-box without pop-up dialog to upload picture file.
Title: Re: There is not Delete-Row function in Context menu.
Post by: paramvir on October 14, 2021, 09:05:11 am
This example https://paramquery.com/pro/demos/context_menu doesn't have Delete row in the context menu.

whereas this https://paramquery.com/pro/demos/import-xlsx has "Delete row" in the context menu.

context menu is customizable and you can add as many items as you need.

Code: [Select]
{
    name: 'Delete row',
    icon: 'ui-icon ui-icon-trash',
    action: function (evt, ui) {
        this.deleteRow({
            rowIndx: ui.rowIndx
        })
    }
},
Title: Re: There is not Delete-Row function in Context menu.
Post by: hyh888 on October 14, 2021, 11:29:00 am
Get the point, thank you very much. Hope you can add "delete row" option in context menu sample (https://paramquery.com/pro/demos/context_menu ) to avoid other new comer making the same misunderstanding like me. Usually "delete row" and "delete column" option shoud in the muenu at the same time.