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

Checked rows to be printed and saved as pdf

1 Answer 207 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Muthiullah
Top achievements
Rank 1
Muthiullah asked on 08 Mar 2013, 12:40 PM
My RadGrid contains select checkbox in all of its rows . what i am trying to do is, the user can select the row which he wants to be in page which is going to be printed or converted to pdf. Currently the website will be intranet website so i cannot acess webresourceurl.
So user can print the radgrid or save it as pdf for all the rows which have the checkbox selected. this setup is repeated 30 times in a page . i am currently binding the data in asp table for printing option and to radgrid for pdf option. hence the page is getting very bulk. can anybody help me to reduce this jumble. so i can implement the print, convert to pdf, the selected row from a single radgrid.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Mar 2013, 04:21 AM
Hi,

I suppose you want to export only selected rows. Here is the sample code.
C#:
protected void Button1_Click(object sender, EventArgs e)
{
        foreach (GridDataItem item in RadGrid1.Items)
        {
            if (item.Selected==false)
            {
                item.Visible = false;
            }
        }
        RadGrid1.ExportSettings.ExportOnlyData = true;
        RadGrid1.ExportSettings.OpenInNewWindow = true;
        RadGrid1.MasterTableView.ExportToPdf();
}

Check the following code library to print Radgrid.
Print RadGrid contents

Thanks,
Shinu
Tags
Grid
Asked by
Muthiullah
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or