


Line 1<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
Line 2<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
Line 3<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
Line 4<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
In the RadGrid1_ItemDataBound I have the following piece of code for displaying the number of records returned in the grids footer.
GridBoundColumn recordCount = RadGrid1.MasterTableView.GetColumn("FieldOne") as GridBoundColumn; |
| recordCount.Aggregate = GridAggregateFunction.Count; |
| recordCount.FooterText = "<strong style='Font-size:10pt;color:red;'>Rows Returned: "; |
However, when I click to export the results to a PDF and only a PDF the error below shows up. The Excel and Word work just fine. The style tag I added is causing this issue.... :(
Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF.
Parse error:
The 'strong' start tag on line 697 does not match the end tag of 'td'. Line 697, position 84.
at line:
<td> </td><td><strong style='Font-size:10pt;color:red;'>Rows Returned: 10</td><td> </td><td>&........
My question is how can I apply a style to the number of rows returned in my footer so the PDF export does not throw an error? Also, is there a better place to show the number or rows returned?
Thank You!
<
telerik:RadComboBox ID="cmbNewShortcut" runat="server" Width="200px"
Skin="Gray" MarkFirstMatch="false" HighlightTemplatedItems="True"
ShowToggleImage="True" AllowCustomText="false" EnableLoadOnDemand="false">
<ItemTemplate>
<div>
<img src='../Images/<%# DataBinder.Eval(Container, "Attributes['ImagePath']") %>' alt="" />
<span ><%# DataBinder.Eval(Container, "Text") %></span>
</div>
</ItemTemplate>
<Items>
<telerik:RadComboBoxItem ImagePath="customer.jpg"
Text="Customer" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="contacts.png"
Text="Contact" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="supplier.jpg"
Text="Supplier" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="contract.jpg"
Text="Contract" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="product.png"
Text="Product" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="order.jpg"
Text="Order" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="admin.jpg"
Text="People" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="serialno.ico"
Text="Serial No" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="Cases.png"
Text="Case" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="task.jpg"
Text="Task" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="document.gif"
Text="Document" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="invoice.png"
Text="MRN" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="dc.png"
Text="Delivery Challan" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="installation.png"
Text="Installation" Value="1002">
</telerik:RadComboBoxItem>
<telerik:RadComboBoxItem ImagePath="invoice.png"
Text="Invoice" Value="1002">
</telerik:RadComboBoxItem>
</Items>
<
CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
| <tr> |
| <td>Contact</td><td> |
| <telerik:RadComboBox ID="cboContact" runat="server" Skin="Outlook" Width="200px"> |
| <Items> |
| <telerik:RadComboBoxItem Text="Rental Manager" Selected="true" Value="1" /> |
| <telerik:RadComboBoxItem Text="Commanding Officer" Value="2"/> |
| <telerik:RadComboBoxItem Text="Auxiliary President" Value="3" /> |
| <telerik:RadComboBoxItem Text="Membership Officer" Value="4" /> |
| <telerik:RadComboBoxItem Text="Service Officer" Value="5" /> |
| </Items> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| <tr> |
| <td>Name</td><td><telerik:radtextbox Width="195px" id="txtName" runat="server" Label="" EmptyMessage="Your Name" Skin="Outlook" InvalidStyleDuration="100" LabelCssClass="radLabelCss_Outlook"> </telerik:radtextbox></td> |
| </tr> |
| <tr> |
| <td>Phone Number</td><td><telerik:radmaskedtextbox skin="Outlook" runat="server" id="txtPhoneNumber" Mask="#########" EmptyMessage="" DisplayMask="###-##-####" DisplayPromptChar=" " /></td> |
| </tr> |
| <tr> |
| <td>Address</td><td><telerik:radtextbox Width="300px" id="txtAddress" runat="server" TextMode="MultiLine" Label="" EmptyMessage="Your Address" Skin="Outlook"></telerik:radtextbox></td> |
| </tr> |
| <tr> |
| 'build message body |
| Dim pnl As Control = Master.FindControl("form1").FindControl("contentplaceholder1").FindControl("pnlForm") '.FindControl("pnlForm") |
| Dim sMessageResponse As String = "" |
| For Each ctrl As Control In pnl.Controls |
| If TypeOf ctrl Is TextBox Then |
| sMessageResponse += replaceText(ctrl.ID) & ": " & DirectCast(ctrl, TextBox).Text & vbCrLf & vbCrLf |
| ElseIf TypeOf ctrl Is CheckBox Then |
| sMessageResponse += replaceText(DirectCast(ctrl, CheckBox).Text) & ": " & Replace(Replace(DirectCast(ctrl, CheckBox).Checked, "False", "No"), "True", "Yes") & vbCrLf & vbCrLf |
| ElseIf TypeOf ctrl Is DropDownList Then |
| sMessageResponse += (replaceText(ctrl.ID) & ": " & DirectCast(ctrl, DropDownList).SelectedIndex & vbCrLf) |
| ElseIf TypeOf ctrl Is RadioButtonList Or TypeOf ctrl Is RadioButtonList Then |
| sMessageResponse += replaceText(ctrl.ID) & ": " & DirectCast(ctrl, RadioButtonList).SelectedValue & vbCrLf & vbCrLf |
| Else |
| End If |
| ' sMessageResponse += vbCrLf |
| Next |
| Mailmsg.Body = sMessageResponse |