.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

exporting from detailsView to exl and pdf

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net

Hello i am new to asp.net  .  I was wondering how can i export from a detailsView i made into exl and pdf files. It has many template fields with textboxes and labels . 


View Complete Post

More Related Resource Links

Master-Detail with the GridView, DetailsView and jQuery's ThickBox

One more article about grids from Matt Berseth. This time he shows how to create master-detail with the gridview, detailsview and jQuery's ThickBox. He writes:
So I thought I would check some of this out and along the way rebuild my Master-Detail with the GridView, DetailView and ModalPopup Controls and replace the ModalPopup with jQuery's ThickBox. I found it pretty interesting - read on to see how it went

Exporting web from MOSS 2007 to WSS 3.0

Hi! I'm trying to export SharePoint web site from MOSS 2007 to WSS 3.0.

There are some problems, which prevent me. WSS doesn't include two features: DataConnectionLibruary and TransMgmtLib. This features are not avaible on WSS, so I tried to deactivate these features using site capabilities. It wo'nt help. Here is the exception text:

Could not find Feature TransMgmtLib
at Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyFeatureDefinition(SPRequirementObject reqObj)
at Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirementObject reqObj)\
at Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate()
at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
at Microsoft.SharePoint.Deployment.SPImport.Run()
at InfoCenter.ConsoleTestingApp.Program.ImportInfoCenter()

The question is: which way must I go to solve this problem? Is it really possible (I mean export from MOSS to WSS)? And what is the purpose of TransMgmtLib feature? Thanks.

get edited value from detailsview


hi sir/madam,

im using asp.net 3.5 sp1 and tried to search the internet but could not find any answer, i have a problem with detailsview as below, when user click on btnEdit, it will call detailsview.changemode(edit) and then allow user to enter data into the textbox, after that user will click on btnsave and then to read the value from txtname and process the value. my question is how do i get the value from txtname? i dont want to use any datasource component and i have tried call the DetailsView1.FindControl("txtname") and it returned txtbox with empty text. hope your can give me some clue where did i missed out.

any helps will be appreciated, thanks.

      <asp:DetailsView ID="DetailsView1" runat="server"  Height="50px" Width="125px" >
<asp:TextBox ID="txtname" runat="server" Text='<%# Bind("name") %>'></asp:TextBox>
<asp:Button ID="btnEdit" runat="server" Text="

Detailsview clears filled in fields


I have a details view on my page that has a template field in it. In the template field is a button that when clicked, sets the visible property of another field to true. When this happens the whole detailsview resets and anything that was entered into other fiields is cleared. Is there any way to prevent the other fields from being cleared when the hidden field is set to be shown. 

what am i doing wrong with this objectdatasource that the DetailsView never gets populated


I want to allow the user to view and edit their information.

So using another example i found online, i got it work, but the example was setup for you to provide the user name and search for the person, since you are already logged into the system i want to pass your username into the code so that on page load the DetailView is populated with your details.

                      <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="UserName" DataSourceID="ObjectDataSource2" Width="400px">
                                <asp:BoundField DataField="PasswordQuestion" HeaderText="PasswordQuestion" ReadOnly="True" SortExpression="PasswordQuestion" />
                                <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly="True" SortExpression="UserName" />
                                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                                <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" ReadOnly="True" SortExpression="Cre

Exporting MOSS 2007 List to Excel 2007

When doing the export, the columns "Item Type" and "Path" are automatically displayed in the sheet.  Is there anyway to suppress these fields from exporting automatically?  I'm sure this has already been asked before, but I couldn't find anything after much searching (perhaps I'm using the wrong keywords).  Any help would be greatly appreciated.

Weird problem in Detailsview - Dropdownlist in



I'm new in this forum and I really hope you'll be able to help me.

I converted a field in the detailsview into a template field and put a dropdownlist in the <InsertItemTemplate> and it worked great. This is the code I put:

<InsertItemTemplate><asp:DropDownList runat="server" DataSourceID="sdsGenresPossible" DataTextField="Genre"  DataValueField="Index" SelectedValue='<%# Bind("Genre") %>' ></asp:DropDownList></InsertItemTemplate>

Now, I tried to do the same thing for the <EditItemTemplate> . This is the code I put there:

<EditItemTemplate><asp:DropDownList runat="server" DataSourceID="sdsGenresPossible" DataTextField="Genre" DataValueField="Index" SelectedValue='<%# Bind("Genre") %>' ></asp:DropDownList></EditItemTemplate>  

When I change the DV properties I do see that a dropdownlist was  added but when I run the program and click on "Edit" in the DV nothing happens (however when I click on "Insert" it works fine).

This is the Select command for the data source I used:

<asp:SqlDataSource runat="server"

Exporting SharePoint list to excel.

Hi All,   We have a SharePoint list in which one column is "Person or Group" and it can take multiple values. When we export it to spread sheet this column contains some junk data.We are using MOSS 2007 and Office 2007. Previously asked question on the same issue http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/00cc338d-8201-4b8d-b2ea-5979ee58a464 Does any one know of a Microsoft published article for this issue as we need to provide it to our higher ups for this issue.   Thanks.

Exporting a gridview into word landscape

Hi,  I have managed to export a gridview into word but is there a way when i export the gridview into Word that Word opens in landscape? Thanks in advance, Jon 

(SQL Server 2008) Exporting entire databases to SQL CREATE/INSERT statements

Hi All, I'm looking for a way to export SQL Server 2008 (Express or otherwise) databases to CREATE/INSERT statements.  I've seen a million threads (give or take) with instructions for creating large (often illegible) TSQL scripts for the task.  However, I'm hoping that this isn't the only way by which to do it.  I have need to regularly back up the data from existing MS SQL Server DBs (which are used by some of our standard apps) to various other MySQL and PostgreSQL databases (which are used by PHP and Rails web front ends).  I need to export them from MS SQL Server 2008 to a general format (i.e. INSERT statements) and perform regex edits on the file as necessary. FYI, I've written a few applications that connect to the various DBs over ODBC, etc. and transfer the data row by row.  You can image how painful this process is... I realize that there are many tools that do this.  However, most of them approach the issue from the standpoint of migration, and not that of regularly scheduled backups.  Also, this tool will need to eventually be distributed so having to purchase a license for the migration app for each person/group simply isn't feasible. Anyway, if you guys have a quality, straightforward solution to this issue, it would certainly be appreciated. Best.

DataList and DetailsView problem

I have a problem hooking up the datalist to the details view. I know everything server side is fine cause the default values work, but I guess I am not getting post back from the datalist. Here is my code.<div id="thumbnail">                     <asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource2"                          RepeatDirection="Horizontal" DataKeyField="ItemsID">                         <ItemTemplate>                             <asp:ImageButton ID="Image1" runat="server" ImageUrl='<%# "Handler.ashx?ItemsID=" + Eval("ItemsID")%>'/>                             <asp:Button ID="button1" runat="server" Text='<%# Eval("ItemsID") %>' />                         </ItemTemplate>                     </asp:Dat

Passing data from a DetailsView to an Applet

I have a DetailsView that I am trying to use to pass results to an applet's parameter list but I can't figure it out. Example: <asp:DetailsView ID="..."....     <Fields>         <asp:boundfield Datafield="Name".../>         <asp:boundfield Datafield="Name2".../>          ...etc.   <applet codebase="http:/..." ...> param name="Name" value="value of Name from my DetailsView" /> param name="Name2" value="value of Name2 from my DetailsView" /> ...etc. I have been trying all sorts of things and viewing tutorials, etc, but I just don't seem to be able to figure this out.        

Get value of a label control inside the DetailsView

Hi everyone, I have a databound label control (i.e. Label 3) inside an Item Template that's in a DetailsView control. I just need to get the value of those label and compare it to some string. I tried several ways (i.e. Find control, DetailsView.Row) but nothing seems to work. I don't know if I'm using the FindControl methos correctly or if I need to access the Row first and do the findcontrol method.  Protected Sub DetailsView4_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailsView4.DataBound 'If (DetailsView4.Rows(2).Cells(1).ToString = "Regular") Then 'Label3.ForeColor = Drawing.Color.Azure 'End If 'Dim StatusQualifierContainer As Label 'Dim S As String 'StatusQualifierContainer = DetailsView4.FindControl(Label3.Text) 'S = StatusQualifierContainer.Text 'If S = "Regular" Then 'Label5.ForeColor = Drawing.Color.Aqua 'End If 'Dim C As Label = DetailsView4.FindControl("Label3") 'If C.Text = "Regular" Then 'Label3.ForeColor = Drawing.Color.DarkBlue 'End If 'Dim headerRow As DetailsViewRow = DetailsView4.HeaderRow 'Dim lblText As Label = CType(headerRow.FindControl("Label3"), Label)

Issue while exporting to Excel

Hi All, We are having report in SSRS 2005, everything is working fine while Running the report on BIDS as well as on Report Server, but as soon as we export the report to Excel it is creating issue(S) not just a issue. First - I'm not able to see "Footer" in Excel, although it does exist in BIDS as well as Report Server. It is visible while doing Print-Preview in Excel, why so is it a bug, is their any work around to make it visible without doing Print-Preview, please do let me know! Second - It is regarding "Header", I have couple of text boxes in my Report Header, as soon as I include text boxes in Report Header and when I export to excel, the rows & columns height as well as width is getting disturb (meaning some getting compressed and some getting expanded), so to make it look attractive we have to manually arrange in proper order before delivering to our end-user, Can anybody tell me why rows & columns are getting disturbed and also how to arrange with exact height & width without any manual interpection, please help me out, this is getting me crazy?   Thanks Regards, Kumar

need to link multiple detailsview to page from one master detailsview

I am trying to arrange the information from a SQL record into a 3 column by 3 row table to fit  the form presentation that I want. I have placed on the page 3X3 table and then tried to place a detailsview in the first cell for the first picture called P1dv. I have place a detailsview in the last cell that would control the paging of information called Controldv. I need to fiqure out how to link P1dv paging to Controldv page action. I am using visual web dev. 2005. I am not updating or editing these are read only views.  All help is greatly appreciated.  example of what i need the form output to look like:     picture1   picture2  picture3     name1     name2     name3     Contact1   contact2  contact3what i have coded as of now:asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ContactConnectionString %>" SelectCommand="SELECT * FROM [driveinfo] ORDER BY [Updated_on] DESC"></asp:SqlDataSource>    <table style="width: 827px; height: 339px"> <tr> <td align="

Detailsview based on choice of dropdowns

I have a database table of managers containing the fields manager id and manager name along with some other information. I want one screen that has two dropdownlists - one for manager id and one for manager name. I want to populate detailsview after the user has chose manager id OR manager name. I do not know how to set up the datasource for the detailsview since the user could select from either dropdown.  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend