Q: Works with Master Page and Placeholders?

Dec 10, 2007 at 8:17 AM
Hi All,

Does anyone know, will this nice new control work with:

1. Master pages, and place holders within the master page?
2. If the Gridview has templatefields in it?
3. If the templatefields have checkboxes and textboxes within them?
4. If some of the fields are empty?

I tried it but when I look at the resulting xls file, it has the header row, but no data.

Thank you!
Dec 10, 2007 at 1:24 PM
Thanks for your feedback.

I have not tested this control in all the scenarios. With that in mind, I am going to make the best guess to answer your questions. I'd love for the developer commnity to test this out and get back to me with things that are not working. I'll be glad to fix them in my next release

1) The control should work well on all "ASPX" pages, regardless of whether you use master pages or not. As long as a "container" control exposes the "Controls" property, pretty much the control will work with all those controls.

2) If the template field is a "checkbox" or "dropdown" or "hyperlinks" it should work.

3) Should work - please try and get back to me if it does not.

4) If some fields are empty, it should export "Empty" characters.

Happy programming!
Dec 10, 2007 at 4:58 PM
Any hints or ideas as to why my file might be coming out blank?

Also, since it looks like I'll need to debug this, can you give some idea of how I could insert this code into an existing project? In my current project I have a web site project, and another project with all my business classes. I've inherited this code, so I am not very familiar with how to add this (as another project?), and where to place files (I believe there are several I won't need).

Also, I am going to need to customize this, so I'll need to incorporate the source code.

Dec 10, 2007 at 4:59 PM
One Suggestion for added feature...

Often gridviews have a check box field for selecting which rows to include in an action. Can you somenow allow for an "export this row" checkbox in your control?
Dec 13, 2007 at 7:47 AM

I've done some testing... I still can't get my gv to export. IN looking at my gv to see what is different... some of my fields are BoundFields, some are not any control at all (not checkbox, not textbox, not hyperlink, not dropdown).

Some of them are values from the databinder:

<%#WaterTrack.Core.UI.Utils.SetFormDate(DataBinder.Eval(Container.DataItem, "StepDate"))%>

Some of them are bound fields:

<asp:BoundField DataField="ApplicantFullName" SortExpression="applicantName" HeaderText="Applicant">
<ItemStyle Wrap="False" />
<HeaderStyle CssClass="lstHeader" />

Do you think these would cause it to fail?

Dec 23, 2007 at 3:35 PM

Sorry about the delay in response. Been very busy at work. I'll probably have sometime towards the end of this year. Let me take a look at various issues and get back to you.

In the meantime, please feel free to link to the project source into your project and walk through it. The logic is pretty straight forward.

Oct 15, 2012 at 5:59 AM

This control is not giving complete records if i use master page. Is there any issue ?




<RK:ExportToExcel ID="ExportToExcel1" runat="server" ApplyStyleInExcel="True"    ExportFileName="Productivity.xls"                        GridViewID="GridView2" IncludeTimeStamp="True" Text="Export To Excel"                           /> 


Plz advice