This is a migrated thread and some comments may be shown as answers.

not to export to pdf alternate text

3 Answers 15 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vasya Ivanov
Top achievements
Rank 1
Vasya Ivanov asked on 09 Dec 2010, 05:19 PM
Good day,
Please can someone help me with this:

I have a following code in my aspx page:

<

 

telerik:GridTemplateColumn HeaderText ="Eis-Id" UniqueName ="PRICol" Groupable="true" DataField="FILENO" SortExpression="FILENO" ReadOnly="true" HeaderButtonType="TextButton">

 

 

<HeaderStyle Width="70px" />

 

 

<ItemStyle Width="70px" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="PRI" runat="server" ></asp:Label>

 

 

<asp:Image ID="Image1" runat="server" AlternateText="EIS CHARGES" />

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

When I exporting to PDF Alternate text appear on my pdf report.I need only PRI to be on the report.

Thanks so much..

 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 09 Dec 2010, 05:31 PM
Hello Vasya,

You can hide the Image on ItemCreated or ItemDataBound events.
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
   if (e.Item is GridDataItem && isExport)
       e.Item.FindControl("Image1").Visible = false;
}

Word/Excel export (HTML-based)

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Vasya Ivanov
Top achievements
Rank 1
answered on 10 Dec 2010, 05:59 PM
Thanks Daniel for your responding but still not working.
I added suggested code to itemcreated event:

protected

 

void JobDetailGrid_ItemCreated(object sender, GridItemEventArgs e)

 

{

 

if (e.Item is GridDataItem && IsExport)

 

{

e.Item.FindControl(

"Image1").Visible = false;

 

}

 

if (IsExport)

 

ApplyStylesToPDFExport(e.Item);

 

 

}

And got the same result:

 Eis-Id

 

   EIS
 CHARGES0617519

Thanks 


0
Daniel
Telerik team
answered on 10 Dec 2010, 10:36 PM
Hello Vasya,

I suppose I'm leaving something out because I'm unable to reproduce the problem. Please download the attached project and let me know whether it works on your end.

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
Vasya Ivanov
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Vasya Ivanov
Top achievements
Rank 1
Share this question
or