Silverlight DataGrid: Export to excel or csv

后端 未结 9 2215
野趣味
野趣味 2020-12-13 10:17

Is there a way I can export my Silverlight DataGrid data to excel or csv?

I searched the web but can\'t find any examples!

Thanks a lot

9条回答
  •  鱼传尺愫
    2020-12-13 10:48

    I don't think Silverlight offers a way to download files. You can add a button to your app that calls a URL- i.e. http://www.mysite.com/generateexcelfile.aspx. Include as Querystring values the parameters used to generate the data being displayed in your Silverlight app, run your query and use your favorite Excel file generation component to generate the file on the fly. Redirect to it and it will download to the users' system.

提交回复
热议问题