Queries |
Response | |
“I right click the multiple selected rows lost focus and only the last one remains active.”
|
In default contextMenuItems we can edit and delete the record using Edit Record and Delete Record Context menu items.
To edit a record we need to select the single row. So, while right click on row we will remove the selection for other rows.
To achieve your requirement we used recordClick and contextOpen events of ejGrid.
The recordClick event will be triggered when the record is clicked. In this event we store the selected rows indexes in a variable using selectedRowsIndexes method of ejGrid.
The contextOpen event will be triggered before the context menu opened. In this event we select the rows using selectRows method of ejGrid using the variable.
Find the code example and sample:
Refer to the Help documents
| |
“how can I customize more the CustomContextMenuItem.”
|
In the screenshot we found that you have to render the image in the customContextMenuItems. In the below code example we have rendered the image for the item “Download” in CustomContextMenuItems property of ContextMenu
Find the code example and screenshot:
Screenshot:
| |
“I want to apply some custom properties to several rows”
|
In the contextOpen event we get the rowIndex of the selected rows. Using getRowByIndex method of ejGrid we can get the selected row.
To apply custom css for the selected row, use the css jQuery method.
Find the code example:
|
Hi Juan,
In mobile device, context menu will be shown on long press . So, no need for additional properties to open context menu in mobile devices.
Regards,
Jayaprakash K.