Hi Uri,
Thank you for your reply.
Below is a simple example of custom header cell with one textbox and three buttons inside:
public
class
MyHeaderCellElement : GridHeaderCellElement
{
private
RadButtonElement sumButton;
private
RadButtonElement divButton;
private
RadButtonElement modButton;
private
RadTextBoxElement textBox;
private
StackLayoutElement mathStack;
public
MyHeaderCellElement(GridViewColumn col, GridRowElement row)
:
base
(col, row)
{
this
.TextAlignment = ContentAlignment.TopCenter;
}
public
StackLayoutElement ElementsStack
{
get
{
return
this
.mathStack; }
}
public
RadTextBoxElement TextBox
{
get
{
return
this
.textBox; }
}
public
RadButtonElement SumButton
{
get
{
return
this
.sumButton; }
}
public
RadButtonElement DivButton
{
get
{
return
this
.divButton; }
}
public
RadButtonElement ModButton
{
get
{
return
this
.modButton; }
}
protected
override
void
CreateChildElements()
{
base
.CreateChildElements();
this
.mathStack =
new
StackLayoutElement();
this
.mathStack.Margin =
new
Padding(2, 25, 20, 2);
this
.mathStack.StretchHorizontally =
true
;
this
.sumButton =
new
RadButtonElement();
this
.sumButton.Text =
"Sum"
;
this
.sumButton.StretchHorizontally =
false
;
this
.mathStack.Children.Add(sumButton);
this
.divButton =
new
RadButtonElement();
this
.divButton.Text =
"Div"
;
this
.divButton.StretchHorizontally =
false
;
this
.mathStack.Children.Add(divButton);
this
.modButton =
new
RadButtonElement();
this
.modButton.Text =
"Mod"
;
this
.modButton.StretchHorizontally =
false
;
this
.mathStack.Children.Add(modButton);
this
.textBox =
new
RadTextBoxElement();
this
.textBox.StretchHorizontally =
true
;
this
.mathStack.Children.Add(textBox);
this
.Children.Add(mathStack);
}
protected
override
Type ThemeEffectiveType
{
get
{
return
typeof
(GridHeaderCellElement);
}
}
}
And a sample usage:
Would you please clarify for me which arrow are you referring to. Please see if it is the one shown on the attached picture (arrow.png).
I hope this information be of use, looking forward to your reply.
Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application.
Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>