Hello,
I'm formatting some columns RadGridView to give effect link in a cell.
I'm doing this using the event "CellFormatting." The effect works well until you use the scroll bar to navigate between records. We realize that some cells that are not in the context of link is getting the effect. It seems to me that there is a problem to apply the effect on the grid at the time the scrolling and done quickly.
Tks.
Below is the code inserted to modify the cell.
I'm formatting some columns RadGridView to give effect link in a cell.
I'm doing this using the event "CellFormatting." The effect works well until you use the scroll bar to navigate between records. We realize that some cells that are not in the context of link is getting the effect. It seems to me that there is a problem to apply the effect on the grid at the time the scrolling and done quickly.
Tks.
Below is the code inserted to modify the cell.
public
void
CtrlDataGridList_CellFormatting(
object
sender, CellFormattingEventArgs e)
{
switch
(e.Column.Name)
{
case
"CommandColumnSearchMother"
:
case
"CommandColumnSearchFather"
:
if
(!
string
.IsNullOrWhiteSpace(e.CellElement.Text.Trim()))
{
e.CellElement.CustumizeLinkCell();
}
break
;
case
"CommandColumnOpen"
:
if
(
string
.IsNullOrEmpty(_openMessage))
{
_openMessage = I18n.Term.I18nTerm.GetMessage(
"OPEN"
);
}
e.CellElement.Text = _openMessage;
e.CellElement.CustumizeLinkCell();
break
;
}
}
public
static
void
CustumizeLinkCell(
this
GridCellElement cellElement)
{
cellElement.Font =
new
Font(SystemFonts.DialogFont, FontStyle.Underline);
cellElement.ForeColor = Color.Blue;
}