View Single Post
  #3 (permalink)  
Old February 23rd, 2007, 06:29 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

A datalist is like a repeater (more or less) where you can format you data any which way you choose which may not necessarily be in a table format. (Rows/columns)

A datalist uses the ItemTemplate, however, not the TemplateColumn tag the datagrid control on the other hand, does. By design a datagrid exports to excel fine because it has its rows and columns defined.

What you may want to do is when you go to export your data, take your datalist Datasource and bind it to an in memory datagrid, then export that datagrid to excel. I think it would work out better for you.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET