Understanding the technique to open a record from a dataset
The current out-of-the-box sub-grid allows you to open a record when you double-click on it and shows a hyperlink to the lookups, which makes it more user-friendly. But when you create code components, you have to implement these features on your own and it will vary based on the design of your code component.
Let's expand our code component that will show a hyperlink on the primary field and lookups, which when clicked will open those records. We will update the createCardItems method to check whether the datatype of the column is a lookup or primary field, then add a class that will display this record differently than all other records. The following is the updated code snippet on the createCardItems method:
index.ts
if (columnItems.dataType.startsWith('Lookup.') || Â Â columnItems.isPrimary) {
    content.classList.add("gridText", "gridTextLookup"...