I'm exporting a Gridview to excel. I get all the gridview header and content in excel in addition to that i need to add a header text like report name in header of the excel sheet with line break in header.
I tried the solution in this link [URL] by adding
Table.Caption = "Header Text" Table.CaptionAlign = TableCaptionAlign.Top but i get error Reference to a non shared member requires an object reference.
I have a requirement to read the excel sheet contents(with first row as header) and to populate it in a Datagrid. so as to manipulate the excel sheet data. But i get an error saying "Could not find installable ISAM". after a big struggle i came to know that the culprit is the "connection string". I tried with various connection strings and now i get the error " Format of the Initialization string does not conform to specification starting at index 121".
when user input the valid data then there will be generate a areport and that report displays in a gridview itemtemplate. when i print the report, only first page data printed properly on a predesigned designed paper. and others are not. then how to print each rowdata of gridview on per page.
Scenario: I have a Gridview where I want to handle the Sorting in a custom control that I've added to the header. I've added this control to my GridView's Header via OnRowCreate event handling. I want the Sort Expressions to persist session to session (via Webparts Personalization)
Here is what I have for adding the custom header control to the GridView Header
This works out well for adding the control, but I can't get anything to persist because these controls are creating initially via postback (per the event) and re-created on all subsequent postbacks. I can't add an If(!IsPostback) because the controls are initially created on the gridview's postback (well at least thats how it's acting when I put it in there) If I were to add this control via the ASP page, not via the Codebehind, I would be able to persist the control. If I try to treat it as though everything is setup correctly, and assign my custom control's controls to [Personalizable], I get a runtime error telling me that I can only have webpartzones in or before Page_init (I'm guessing this is due to when/where the gridview hits the OnRowCreate event). If there is some fundimental logic I'm missing, or best practices that I'm moving away from,
I have a GridView (inside an update panel) that has header text that changes based on some user profile information. I set the header text in the Page_Load function of the page - that works fine. The problem is that when I change to the page number of the GridView, the header text is not redrawn. I am handling the OnPageChanging event to try to update the header text but nothing is happening. I've attached the relevant code.