Hello
I have a radgrid with a NestedViewTemplate. Inside this are 3 fieldsets with either lablels or LIs. All are bound on the dataitembound event. When I export to pdf, the labels & LIs (as text only) are present, but the fieldsets are not, so the horizontal organization of the data is lost... the labels export in a vertical stack.
I have tried replacing the fieldsets with spans to manage placement (I have seen a number of articles regarding div and width... so none of that).
I also tried to various "manipulations" the grid_PreRender. I note the fieldset is present as text of a LiteralControl and the actual Labels are Labels. The LiteralControls have \r\n\ & up to 24 spaces (this matches the html layout in VS). I have stripped all this out, tried creating new Panels and adding the Label controls to these, creating tables and adding the control text to the cells... and so on... but nothing seems to reformat this export.
here is my MasterTableView with NestedViewTemplate
<telerik:RadGrid ID="gvServiceItems" runat="server" DataKeyNames="ID" OnNeedDataSource="gvServiceItems_NeedDataSource"
OnItemCommand="gvServiceItems_OnItemCommand" OnItemDataBound="gvServiceItems_OnItemDataBound" OnPreRender="gvServiceItems_PreRender"
ShowGroupPanel="true" EnableHierarchyExpandAll="true">
<ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true">
</ExportSettings>
<ClientSettings AllowDragToGroup="true">
</ClientSettings>
<GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
<MasterTableView DataKeyNames="ID" Name="EstimateRequests">
<NestedViewTemplate>
<span style="float: left; width: 30%; margin: 10px;">
<fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
<legend>
<asp:Label ID="lblInfo" runat="server" Text="lblInfo" SkinID="LabelSeperatorTitle"></asp:Label>
</legend>
<p>
<asp:Label ID="lblDescription" runat="server" Text="lblDescription" SkinID="LabelRadSilk"></asp:Label><br />
<asp:Label ID="lblDescriptionData" runat="server" Text="lblDescriptionData" SkinID="LabelData"></asp:Label>
</p>
<p>
<asp:Label ID="lblRequestNotes" runat="server" Text="lblRequestNotes" SkinID="LabelRadSilk"></asp:Label><br />
<asp:Label ID="lblRequestNotesData" runat="server" Text="lblRequestNotesData" SkinID="LabelData"></asp:Label>
</p>
</fieldset>
</span>
<span style="float: left; width: 30%; margin: 10px;">
<fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
<legend>
<asp:Label ID="lblEquipment" runat="server" Text="lblEquipment" SkinID="LabelSeperatorTitle"></asp:Label>
</legend>
<asp:Label ID="lblEquipmentData" runat="server" Text="lblEquipmentData"></asp:Label>
</fieldset>
</span>
<span style="float: left; width: 30%; margin: 10px;">
<fieldset style="float: left; width: 96%; text-align: left; min-height: 124px;">
<legend>
<asp:Label ID="lblParts" runat="server" Text="lblParts" SkinID="LabelSeperatorTitle"></asp:Label>
</legend>
<asp:Label ID="lblPartsData" runat="server" Text="lblPartsData"></asp:Label>
</fieldset>
</span>
</NestedViewTemplate>
<Columns>
</Columns>
My grid_PreRender
protected void gvServiceItems_PreRender(object sender, EventArgs e)
{
if (IsExport)
{
foreach (GridHeaderItem header in gvServiceItems.MasterTableView.GetItems(GridItemType.Header))
{
foreach (TableCell cell in header.Cells)
{
cell.Style["font-family"] = "Arial Unicode MS";
cell.Style["font-size"] = "11px";
cell.Style["color"] = "black";
cell.Style["font-weight"] = "bold";
cell.Style["padding"] = "10px 0 4px 0";
cell.Style["margin"] = "0 4px";
cell.Style["text-align"] = "left";
cell.Style["background-color"] = "#ebf0f6";
}
}
int rowNumber = 0;
foreach (GridDataItem item in gvServiceItems.MasterTableView.Items)
{
foreach (TableCell cell in item.Cells)
{
cell.Style["font-family"] = "Arial Unicode MS";
cell.Style["font-size"] = "9px";
cell.Style["color"] = "black";
if (rowNumber.IsEven())
cell.Style["background-color"] = "#fff";
else
cell.Style["background-color"] = "#f3f6f9";
}
rowNumber++;
item.Expanded = true;
if (item.HasChildItems)
Any direction would be appreciated.