I have a grid which includes a GridHyperLinkColumn. The enabled state of the link needs to be set dynamically based on values in other columns in the grid. This needs to be done client-side (as I'm building an MVC app).
I've added a RowDataBound event handler:
function RadIncidents_RowDataBound(sender, args)
{
var cell = args.get_item().get_cell("colActionText");
if (cell)
{
if (dataItem.CanQuickReview)
{
cell.disabled = false;
cell.title = "Click to quick-review this item.";
}
else
{
cell.disabled = true;
cell.title = "This item cannot be quick-reviewed.";
}
}
}
}
This makes the link look disabled (its colour is changed), but it still functions as an active, enabled link.
I've also tried replacing the cell's inner Html with its text, but this then gets cached across grid refresh / rebinds.
Does anyone know how to properly disable the link in a GridHyperLinkColumn?
Thanks,
Luke.
I've added a RowDataBound event handler:
function RadIncidents_RowDataBound(sender, args)
{
var cell = args.get_item().get_cell("colActionText");
if (cell)
{
if (dataItem.CanQuickReview)
{
cell.disabled = false;
cell.title = "Click to quick-review this item.";
}
else
{
cell.disabled = true;
cell.title = "This item cannot be quick-reviewed.";
}
}
}
}
This makes the link look disabled (its colour is changed), but it still functions as an active, enabled link.
I've also tried replacing the cell's inner Html with its text, but this then gets cached across grid refresh / rebinds.
Does anyone know how to properly disable the link in a GridHyperLinkColumn?
Thanks,
Luke.