Hello
I have the following grid on my webpage
var columnDefinitions = [ { headerText: "Work Order Number", width: "140px", key: "WorkOrderNumber" }, { headerText: "Work Order Description", width: "250px", key: "WorkOrderDescription" }, { headerText: "Asset Reference", width: "150px", key: "SPN" } ];
$("#createdWorkOrdersGrid").igGrid({
autoGenerateColumns: false, height: "400px", width: "680px", dataSource: createdWorkOrders, primaryKey: "WorkOrderNumber", dataSourceType: "array", dataRendered: function () { common.styleGridHeaders("#createdWorkOrdersGrid", columnDefinitions); }, columns: columnDefinitions, features: []
});
When this grid is displayed the user wants to be able to highlight the text with the mouse cursor, so he is able to copy it. However, the infragistic grid does not let me select the text inside of a cell. This is very frustrating as it should be something very simple.
I am using the bootstrap4 theme.
Hello, Miguel
If you just need to select the cells, then the “features : []” on the last line of the code you showed above should be :
features: [ { name: “Selection”, mode: “cell” } ]
{
name: “Selection”,
mode: “cell”
}
]
More detailed information you could find here :
https://www.igniteui.com/help/iggrid-selection-overview#select-cell
It is also possible to make the grid cells updateable. This way the user should be able to modify or copy the cell contents.
In this case the "features : []" should be :
features: [ { name: “Updating”, editMode: “cell” } ]
name: “Updating”,
editMode: “cell”
Please contact me if this doesn't resolve your problem.
Best regards,
Vasil Pavlov
Associate Software Developer
Infragistics, Inc.
http://www.infragistics.com/support
I'm having the same issue as the original poster is. I want specifically the text to be highlight-able (not just the cell/row). Is there a setting for the Selection feature that would allow for this? Updating isn't desirable because we don't want users accidentally editing the contents of the grid we're showing them.
Hello Rob,
Thank you for posting in our forum.
There is currently no option of the Selection feature to make the text highlightable, but you can workaround it by using this code:
$("#grid").on("igcontrolcreated", function (evt, ui) {
ui.owner.element.find("tbody").unbind("selectstart");
ui.owner.element.find("tbody td").unbind("mousedown");
Please note that we cannot guarantee it would work for every possible scenario.
If you need any additional assistance, feel free to contact me.
Best Regards,