I had the error originally, which prompted the use of <colgroup> <col /> etc.
That unfortunately did not work. (The Detail grid uses GrodBoundColumn and GridCheckboxColumn), the Master TableView originally used <Span> and eval which worked , but which provided me a lack of alignments.
I replaced those <Span> elements with a table and no <colgroup> elements resulting in the error, which needed colgroup to get around it. But no go.
I get this error now
TIA
Neal
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)
I have checked my C# code to exactly match your examples
protected void grvSchedule_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item.OwnerTableView.Name != "grvAnimalDetl")
{
foreach (GridDataItem dataItem in e.Item.OwnerTableView.Items)
{
foreach (TableCell cell in e.Item.Cells)
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "12px";
cell.Style[
"height"] = "38px";
}
}
}
if (e.Item.OwnerTableView.Name == "grvAnimalDetl")
{
if (e.Item is GridDataItem )
{
foreach (TableCell cell in e.Item.Cells)
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "8px";
cell.Style[
"height"] = "24px";
}
}
if (e.Item is GridHeaderItem)
{
foreach (TableCell cell in e.Item.Cells)
{
cell.Style[
"font-family"] = "Arial Unicode MS";
cell.Style[
"text-align"] = "left";
cell.Style[
"font-size"] = "9px";
cell.Style[
"font-weight"] = "bold";
cell.Style[
"height"] = "35px";
}
}
if (e.Item is GridCommandItem)
{
e.Item.PrepareItemStyle();
//needed to span the image over the CommandItem cells
}
}
}
and markup
<
telerik:RadGrid ID="grvSchedules"
runat="server" Width="100%"
CssClass="GridVClass"
AutoGenerateColumns="False"
AllowPaging="True"
GridLines="None"
PagerStyle-AlwaysVisible="false"
OnItemCommand="grvSchedule_ItemCommand"
OnItemDataBound="grvSchedule_ItemDataBound"
OnDetailTableDataBind="grvSchedule_DetailTableDataBind"
OnNeedDataSource="grvSchedule_NeedDataSource"
OnDataBound="grvSchedule_DataBound"
OnItemCreated = "grvSchedule_ItemCreated"
HorizontalAlign="Left">
<ExportSettings IgnorePaging="true" >
<Pdf PageHeight="270mm" PageWidth="540mm" PageTitle="Client Schedule" />
</ExportSettings>
<PagerStyle Mode="NumericPages" AlwaysVisible="False">
</PagerStyle>
<MasterTableView
Width="100%"
DataKeyNames="RecId" CellSpacing="1" pagesize="20">
<DetailTables >
<telerik:GridTableView
Name="grvAnimalDetl"
BorderColor="Gray"
BorderStyle="Solid"
BorderWidth="1px"
DataKeyNames="AnimalId, AnimalTypeId, insval, Val"
BackColor="LemonChiffon"
EditMode="InPlace"
Width="100%" runat="server" CellSpacing="-1"
GridLines="Horizontal" HierarchyDefaultExpanded="True"
PagerStyle-Visible="false" >
<Columns>
<telerik:GridBoundColumn DataField="AnimalName"
HeaderText="Name" UniqueName="AnimalName">
<ItemStyle HorizontalAlign="Left" Width="130px" Font-Size="XX-Small" />
<HeaderStyle HorizontalAlign="Left" Width="130px" Font-Size="XX-Small" />
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="AccidentalVC"
HeaderText="AccidentalVC" UniqueName="AccidentalVC" >
<ItemStyle Width ="75px" HorizontalAlign="Center" Font-Size="XX-Small" />
<HeaderStyle Width="75px" HorizontalAlign="Center" Font-Size="XX-Small"
wrap="True" />
</telerik:GridCheckBoxColumn>
</Columns>
<ItemStyle BackColor="White" Font-Names="Times New Roman" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="False" />
<AlternatingItemStyle BackColor="GhostWhite" Font-Names="Times New Roman" HorizontalAlign="Left" VerticalAlign="Middle" Wrap="False" />
<HeaderStyle BackColor="LemonChiffon" />
<CommandItemStyle BackColor="LemonChiffon" BorderColor="Gray"
BorderStyle="Solid"
BorderWidth="1px" />
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridTemplateColumn>
<ItemTemplate>
<table>
<colgroup>
<col />
<col />
</colgroup>
<tr>
<td >Animal Details and Covers:
</td>
<td >
</td>
</tr>
</table>
<br />
<br />
<br />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<AlternatingItemStyle Font-Size="X-Small"></AlternatingItemStyle>
<ItemStyle Font-Size="X-Small"></ItemStyle>
</telerik:RadGrid>