I am using Component one FlexGrid in my silverlight Application and it is autogenerating columns in the grid. I want to make one of the column's data behave as a clickable hyperlink. Any help on this problem would be greatly appreciated.
Asked
Active
Viewed 513 times
2 Answers
1
I have figured out a way to add hyperlink cell in C1FlexGrid. One should extend CellFactory Class and inside the class override method CreateCellContent(C1FlexGrid grid, Border bdr, CellRange range) and write something like this:
public override void CreateCellContent(C1FlexGrid grid, Border bdr, CellRange range)
{
//Ofcourse One should figure out first the col in which they want to
//add the cell
var width = GetWidthForHyperlinkControl((string)grid[range.Row, range.Column]);
var cell = new HyperlinkControl
{
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Center,
Width = width,
Height = 16,
NavigateUri = null,
IsTabStop = false,
Content = (string)grid[range.Row, range.Column]
};
}

Pushpendra
- 1,694
- 14
- 27
0
The sample projects for ComponentOne FlexGrid include a Hyperlink sample. Should be part of your installed items.
If not, you can also access it via the ComponentOne website.
Essentially, you set up a style for the hyperlink cells/columns and apply it. You can use OwnerDrawCell
events to do it, as the example shows.

DonBoitnott
- 10,787
- 6
- 49
- 68