disableGridHyperLinks
This function controls whether hyperlinks are enabled or disabled within grid cells. In brixxbox, combobox controls automatically generate hyperlinks to related records, and this function allows you to toggle this behavior.
Syntax
app.disableGridHyperLinks(controlId, disable, columnName)
Parameters
Parameter | Type | Description |
---|---|---|
controlId | String | The ID of the grid control |
disable | Boolean | true to disable hyperlinks, false to enable them |
columnName | String | (Optional) The specific column name for which to disable/enable hyperlinks. If not provided, applies to all columns |
Return Value
This function doesn't return a value. However, it automatically refreshes the grid after changing the hyperlink settings.
Examples
Example 1: Disable all hyperlinks in a grid:
// Disable all hyperlinks in the "customerGrid" control
app.disableGridHyperLinks("customerGrid", true);
Example 2: Enable all hyperlinks in a grid:
// Enable all hyperlinks in the "customerGrid" control
app.disableGridHyperLinks("customerGrid", false);
Example 3: Disable hyperlinks for a specific column:
// Disable hyperlinks only for the "companyId" column in the "customerGrid" control
app.disableGridHyperLinks("customerGrid", true, "companyId");
Notes
- This function automatically calls
refresh(controlId)
after changing the hyperlink settings. - The setting is stored in the grid control's data attribute "disableHyperLink" when applied to the entire grid.
- The function is particularly useful in scenarios where you want to prevent users from navigating to related records.