This is a migrated thread and some comments may be shown as answers.

CellSpacing in a gridviewtemplate

2 Answers 8 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andre
Top achievements
Rank 1
Andre asked on 16 Mar 2018, 10:33 AM

hello everyone
i trying to give all cells a CellSpacing in a gridviewtemplate.
for a radgridview this can be done with radgridview.TableElement.CellSpacing = 3.

 

Thanks for your help

andre

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 16 Mar 2018, 11:06 AM
Hi Andre,

You can use the ViewCellFormatting event to access the table element of the child template (each cell will have its own child table element):
private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
    if (e.CellElement is GridDetailViewCellElement)
    {
        var cell = e.CellElement as GridDetailViewCellElement;
        cell.ChildTableElement.RowSpacing = 3;
    }
}

I hope this will be useful.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Andre
Top achievements
Rank 1
answered on 16 Mar 2018, 11:14 AM
Hello Team, 
thanks it working perfect :)
Tags
GridView
Asked by
Andre
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Andre
Top achievements
Rank 1
Share this question
or