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

PDF content not showing

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jesmon
Top achievements
Rank 1
Jesmon asked on 01 Jun 2012, 09:26 AM
Hi,
        I have a RadGrid with PDF option. when I set the UseStaticHeader true, PDF content not showing. but when removing the UseStaticHeader from property PDF content will display. My requirement is UseStaticHeader should be there and PDF content also needed. Please help...

Thanks in advance
Jesmon Joseph

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Jun 2012, 01:14 PM
Hi,

One suggestion is to Disable the Scrolling/StaticHeaders functionality - don't forget to Rebind() the RadGrid control afterwards, otherwise the changes will not take effect. Please take a look into the following code snippet.

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.ExportToPdfCommandName)
    {
        IsExport = true;
    }
}
protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    if (IsExport == true)
    {
        RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = false;
        RadGrid1.Rebind();
        RadGrid1.ClientSettings.Scrolling.UseStaticHeaders = true;
        IsExport = false;
    }
}

Thanks,
Shinu.



Tags
Grid
Asked by
Jesmon
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or