Hi ,
I was developed custom cell for web browser and every things work fine but one more problem happened and I can not find solution for it .
The problem was when scrolling , the custom cell come over the the column header , please the picture in attached .
I was developed custom cell for web browser and every things work fine but one more problem happened and I can not find solution for it .
The problem was when scrolling , the custom cell come over the the column header , please the picture in attached .
class
WebBrowserCellElement : GridDataCellElement
{
public
WebBrowserCellElement(GridViewColumn column, GridRowElement row) :
base
(column, row) { }
RadWebBrowserElement radWebBrowserElement;
protected
override
SizeF ArrangeOverride(SizeF finalSize)
{
if
(
this
.Children.Count == 1)
{
RectangleF browserrRect =
new
RectangleF(5, 5, finalSize.Width - 6, finalSize.Height - 10);
this
.Children[0].Arrange(browserrRect);
}
return
finalSize;
}
protected
override
void
CreateChildElements()
{
base
.CreateChildElements();
radWebBrowserElement =
new
RadWebBrowserElement();
this
.Children.Add(radWebBrowserElement);
}
protected
override
void
SetContentCore(
object
value)
{
if
(
this
.Value !=
null
&&
this
.Value != DBNull.Value)
{
radWebBrowserElement.DocumentText =
this
.Value.ToString();
}
}
protected
override
Type ThemeEffectiveType
{
get
{
return
typeof
(GridDataCellElement);
}
}
public
override
bool
IsCompatible(GridViewColumn data,
object
context)
{
return
data
is
WebBrowserColumn && context
is
GridDataRowElement;
}
}
public
class
WebBrowserColumn : GridViewDataColumn
{
public
WebBrowserColumn(
string
fieldName)
:
base
(fieldName)
{
}
public
override
Type GetCellType(GridViewRowInfo row)
{
if
(row
is
GridViewDataRowInfo)
{
return
typeof
(WebBrowserCellElement);
}
return
base
.GetCellType(row);
}
}