Hi...
i got some problem on my custom new row element according to this link, but on my code i made with button element
internal
class
CustomGridNewRowElement : GridRowElement
{
private
GridCellElement cellElement;
private
RadButtonElement radButtonElement;
public
RadButtonElement AddButtton =>
this
.radButtonElement;
public
CustomGridNewRowElement() { }
protected
override
void
CreateChildElements()
{
base
.CreateChildElements();
this
.cellElement =
new
GridCellElement(
null
,
this
) { StretchHorizontally =
true
, StretchVertically =
true
};
this
.radButtonElement =
new
RadButtonElement(
"Add New"
);
this
.Children.Add(cellElement);
this
.cellElement.Children.Add(
this
.radButtonElement);
this
.cellElement.ClipDrawing =
true
;
}
public
override
bool
IsCompatible(GridViewRowInfo data,
object
context)
{
return
data
is
CustomGridViewRowInfo;
}
}
internal
class
CustomGridViewRowInfo : GridViewNewRowInfo
{
public
CustomGridViewRowInfo(GridViewInfo viewInfo) :
base
(viewInfo)
{
}
public
override
Type RowElementType =>
typeof
(CustomGridNewRowElement);
}
the problem is im missing an rowheadercellelement as shown on attachment, i need the Add Button only fit on GridViewDataColumns like a standard GridViewNewRowInfo,
and shown on 2nd attachment it throw an exception when mouse right button press / contextmenu on Add Button Element, i couldnt find whats wrong.
any help please.