Hello,
trying to HorizontalAlign two (of multiple) columns in a pdf export. I've tried:
protected
void
btnExport_Click(
object
sender, EventArgs e)
{
// bla bla
MyGrid.MasterTableView.GetColumn(
"col1"
).ItemStyle.HorizontalAlign = HorizontalAlign.Center;
}
and this way:
protected
void
MyGrid_PreRender(
object
sender, EventArgs e)
{
// bla bla
foreach
(GridColumn col
in
MyGrid.MasterTableView.RenderColumns)
{
if
(col.UniqueName ==
"col1"
) { col.ItemStyle.HorizontalAlign = HorizontalAlign.Center; }
}
}
Both do not work - what's the correct way to do this?
Thx in advance - M.