I am trying to (not successfully) To format various cells of the 2 DetailTables in my grid, when exporting to PDF (using Vers 9.1).
a) the formatting is not showing (though the code beneath does get entered, execute)
b) stepping thru , shows all cells to have in them...so checking for
if (item.Cells[j].Text == "Policy Information")
{
....Apply some formatting...}
never actually meets the condition and executes.
eg. my Code from the "ItemCreated" Event
if
( e.Item.OwnerTableView.Name == "ClientSchedDetl" )
{
if (e.Item is GridDataItem)
{
int j = 0;
GridDataItem item = e.Item as GridDataItem;
foreach (TableCell cell in item.Cells)
{
if (item != null)
{
if (item.Cells[j].Text == "Policy Information")
{
item[
"Policy Information"].Style["height"] = "20px";
//item["EnglishName"].Style["font-weight"] = "bolder";
//item["Description"].Style["font-size"] = "10px";
//item["OriginalName"].Style["font-family"] = "Arial Unicode MS";
//item["OriginalName"].Style["color"] = "#bbbbbb";
//item["Description"].Style["text-align"] = "center";
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "16px";
cell.Style[
"height"] = "24px";
cell.Style[
"font-weight"] = "bold";
}
else
{
if (j == 0) //Column One (no DataKey entries so 0 is the first visble column) MAKE BOLD
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "13px";
cell.Style[
"height"] = "24px";
cell.Style[
"font-weight"] = "bold";
}
else //Columns two and on..Non-Bold
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "10px";
cell.Style[
"height"] = "24px";
//cell.Style["font-weight"] = "normal";
}
}
j += 1;
}
}
thanks
Neal