SL RadGridView to Excel- Want the same name to the Excel work sheet as the radGrid in the application

5 posts, 0 answers
  1. Prithvi
    Prithvi avatar
    19 posts
    Member since:
    Jul 2012

    Posted 13 Mar 2012 Link to this post

    Hi,

    Can anyone please help me out!!!!!!!!!

    The requirement is, want the same name as grid to the work sheet and the default filename  in the Excel.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 13 Mar 2012 Link to this post

    Hi,

     Have you checked our exporting demo? You can specify desired file name when you open the save dialog. Naming the sheet however is not supported.

    Greetings,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Prithvi
    Prithvi avatar
    19 posts
    Member since:
    Jul 2012

    Posted 13 Mar 2012 Link to this post

    No, please give me the link for SL RadGrid export to Excel.


    Thanks,
    Prithvi
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 13 Mar 2012 Link to this post

    Hello,

     Here is it:
    http://demos.telerik.com/silverlight/#GridView/Exporting

    Kind regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Prithvi
    Prithvi avatar
    19 posts
    Member since:
    Jul 2012

    Posted 13 Mar 2012 Link to this post

    Hi,

    The code is like this:

     

     

    public void StructureWorkspaceRadTreeView_Exporting(object sender, GridViewElementExportingEventArgs e)

     

    {

     

     

     

    if (e.Element == ExportElement.Cell

     

    && e.Value !=

     

    null

     

    && e.Value.GetType() ==

     

    this.SModel.RecordClassType)

     

    {

    e.Cancel =

     

    true;

     

    }

     

     

    else if (e.Element == ExportElement.HeaderCell)

     

    {

    e.Background =

     

    Colors.Blue;

     

    e.Foreground =

     

    Colors.Black;

     

    e.FontSize = 50;

    e.FontWeight =

     

    FontWeights.Bold;

     

    }

     

     

    else if (e.Element == ExportElement.Cell)

     

    {

    e.Background =

     

    Colors.Green;

     

    e.Foreground =

     

    Colors.Red;

     

    }

     

    }



    But these changes are not reflecting in the Excel sheet
Back to Top