I have a DataGrid and i am using the code below to read it.It is reading all the records and working fine.But if i want to read only the recods that are currently displaying the grid(for grid paging is there and at a time it is displaying 10 records).After that i am inserting this to excel file.According to the paging i want the recods to insert in excel(ie 1-10 or 10-20 or 30-40) What should i change in the code? Thanksin advance
You can use this code,it directly exports only the current records of the page
Response.AddHeader("content-disposition", "attachment;filename="& Your File Name & ".xls")
Response.Charset = ""
Response.ContentType = "application/vnd.xls"
Dim stringWriter As New System.IO.StringWriter()
Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWriter)
'dgview is your datagrid
dgview.AllowPaging = true
dgview.DataSource = Your Data Source
and also you can apply some styles for excel sheet....
i have a web service(A) and web application (B) . B calls methods in A, for method A.X(Customer) i use the customer object which is created by XSD. after creating the Customer class by the XSD i added this file to both A and B. but when i call X() method from B it request an object of type A.Customer. it's not accepting an object type of Customer .what might be the problem.any idea.
as u suggested if i create a new project and let it be shared by both , then both keep references, this cannot be allowed, what i want is, both should be able to this Customer object, what is the possible way.
The update on this problem is that now I have created a masterpage in a new project that contains the same layout as in my website project. In the test project the accordion works. When I move the page and the master page from the test project into my website project it does not work!!
When I do a view source on the page that works and the page that does not I see a difference in the the line
from the line in the page that does not work:
the section for SAME PAGE and SAME MASTER PAGE - different projects????
Original post was as follows:
Accordion working on page but when put in contentpage of a masterpage it doesn't. What is the solution? I have tried everything and it is not apparent to me. This question has been asked many times in the internet, but no answers. Help please. A good suggestion would be appreciated.
This page is an accordion on a contentpage I believe.
Ok - I have created a new test project and I have the contentpage with the accordion and 4 panes and it works, but when I move the page to my website project it does not. The only difference is the masterpage. In my website I have login controls, themes, and a menu. The scriptmanager is in the masterpage even in my test project.
Getting closer - surely I am not the only person that has had this problem.