Export Excel functionality from Radgrid silverlight

3 posts, 0 answers
  1. Kumar
    Kumar avatar
    8 posts
    Member since:
    Jan 2013

    Posted 18 Jan 2014 Link to this post

    I have beeen using export to excel function from the radgrid control for silverlight. Now I do have a requirement to show up a drop down in excel as one of the columns with some predefined values. Is that possible to do it.
    code snippet:
    private void ButtonExport_Click(object sender, RoutedEventArgs e)
            {
                string extension = "xls";
                SaveFileDialog dialog = new SaveFileDialog()
                {
                    DefaultExt = extension,
                    Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "Excel"),
                    FilterIndex = 1
                };

                if (dialog.ShowDialog() == true)
                {
                    using (Stream stream = dialog.OpenFile())
                    {
                        gridView.Export(stream,
                            new GridViewExportOptions()
                            {
                                Format = ExportFormat.Html,
                                ShowColumnHeaders = true,
                                ShowColumnFooters = false,
                                ShowGroupFooters = false
                            });
                    }
                }
            }
  2. Kumar
    Kumar avatar
    8 posts
    Member since:
    Jan 2013

    Posted 21 Jan 2014 Link to this post

    Any suggestions on this or can i write html in exported event but keeping the export format to ExcelML.
  3. DevCraft banner
  4. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 23 Jan 2014 Link to this post

    Hi,

    Unfortunately, as far as I know drop down options are not supported in the ExcelML specification, so that such behavior will be impossible to achieve.

    Regards,
    Ivan Ivanov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top