Hi,
I'm working with a RadGridView and add a Template on it with :
GridViewRelation relation = new GridViewRelation(gridView.MasterTemplate, template);
Then I'm trying to customize the view of my gridview because I would like delete all borders on my Template.
I'm trying to do that but it's not enough to delete all borders. What I could do more ?
private
void
gridView_ViewCellFormatting(
object
sender, CellFormattingEventArgs e)
{
GridDetailViewCellElement childCell = e.CellElement
as
GridDetailViewCellElement;
GridGroupExpanderCellElement expanderCell = e.CellElement
as
GridGroupExpanderCellElement;
if
(e.CellElement.ViewTemplate.Parent !=
null
)
{
e.CellElement.BorderBoxStyle = BorderBoxStyle.SingleBorder;
e.CellElement.BorderWidth = 0;
e.CellElement.Padding =
new
Padding(0);
}
else
if
(childCell !=
null
)
{
childCell.BorderBoxStyle = BorderBoxStyle.SingleBorder;
childCell.BorderWidth = 0;
childCell.Padding =
new
Padding(0);
childCell.PageViewElement.Header.Visibility = ElementVisibility.Collapsed;
childCell.GridViewElement.DrawBorder =
false
;
childCell.GridViewElement.GroupPanelElement.DrawBorder =
false
;
RadPageViewStripElement stripElement = childCell.PageViewElement
as
RadPageViewStripElement;
if
(stripElement !=
null
)
{
stripElement.DrawBorder =
false
;
stripElement.BorderBoxStyle = BorderBoxStyle.SingleBorder;
stripElement.BorderWidth = 0;
foreach
(RadPageViewItem item
in
stripElement.Items)
{
item.MaxSize =
new
Size(0, 1);
item.Visibility = ElementVisibility.Hidden;
}
}
}
Thanks for your help,
Simon