Export selected row in Grid to PDF

4 posts, 0 answers
  1. Joakim
    Joakim avatar
    1 posts
    Member since:
    Dec 2013

    Posted 12 Dec 2013 Link to this post


    I am using the "Export Grid to PDF" from the Code Library. 

    It works great, but I need to be able to choose which rows to export to PDF, with a checkbox, not the entire grid. 

    I created this checkbox:
    columns.Template(e => e.IsChecked).ClientTemplate("<input type='checkbox' #= IsChecked ? checked='checked':'' # value='#=EmployeeID#' />")
    How can I access this in the controller, where the method to create the export is located?

    Can someone point me in the right direction?

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 14 Dec 2013 Link to this post

    Hello Joakim,

    Basically you need to send the selected records to the server from then on the approach remains the same as in the code library.

    Check the attached project, it should give you the idea.

    Kind Regards,
    Petur Subev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
  4. mohamed
    mohamed avatar
    6 posts
    Member since:
    Apr 2014

    Posted 13 May 2014 in reply to Petur Subev Link to this post

    a have a probleme to export record in  pdf using itextsharp or any library to export pdf  there is my code :
    i have two tables i am using Entity Framework :
    public class personne{
     public int personneID { get; set; }
            public string Name  { get; set; }
            public string Designation  { get; set; }
    public string workexperience  { get; set; }
     public string About  { get; set; }
    Pulblic int LocationID

    the second table :  
       public class Location{
     public int LocationID { get; set; }

            public string Location  { get; set; }
                              } i need to export pdf from all of two tables,not all of recods but with my choise or delected row (like edit or delete)  like in this pictures thank you
  5. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 15 May 2014 Link to this post

    Hello Joakim,

    Exporting with a third party library tool workflow is always the same. You create button with a href pointing to an action method that based on the state of the Grid will send all the state descriptors to the server. On the server side inside that action method you can create a DataSourceRequest get just those records using ToDataSourceResult() extension method and then use your exporting tool to create the result.

    All those approaches are used in our exporting examples, you can get the idea from there:


    Kind Regards,
    Petur Subev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top
UI for ASP.NET AJAX banner