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 bound to sql datasource with template fields binding the columns. I have set the Header Style to a css class. I have 3 columns not bound to data as Add, Edit and Delete. When I set the text color to white for the header only the non bound columns go white. The bound columns are BLUE like hyperlink. Any one know a way round this. (If I set the style in the gridview the all columns are white. Want to set in external css file).
now the problem is that when i scroll down the gridview the header disappers and so I could not remember what a number is refering to...how can I fix the header so that I scroll down only the rows? is too much if I ask you for the code and where to put it? :P it is a home project for myself so I m not going to sell it or earn money form it.
I'm trying to edit the header row of my gridview to look like this.As you may have noticed, this is the Gmail layout and this was indeed what i intended for. I want to have on my header row some buttons that would then execute some actions to all the selected rows (very much like Gmail).
My users would like to be able to have table headings, then a row with some dropdown lists to discriminate what records are seen in the gird below. Is there a way to do this, or do you have to have the drop down lists floating seperately above the grid?
HUsing C# to develop a web application. Have a gridview to display data from the a sql table.The headers of the gridview is achieve using a table. Need to format the header cells to align with the columns of the gridview.Currently I'm using a trial an error method to set the width of the header to align with the gridview columns. Can I align the Table header to concide with the gird view column width progarmatically?
Im working with a gridview that happens to be placed within a panel for scrolling. Im having a hard time trying to "freeze" the header so when a user scrolls the gridview it keeps the header up at the top. Ive tried many solution from the web unfortunatly.i have had no success. I tried to use an HTML table however nothing line up correctly
I have a grid that contains a footer row conating the textboxes to insert data. The problem is that when there is no row in the the grid the header and the footer does not get displayed. Is there any way to show header and footer when there is no row in the grid?
I have a gridview and i wanted to add a row when the gridview is empty, so that the header would be shown anyway. I have read about it on the web but i can't quite understand where exactly should i add the row.
My grid is binded by a sqldatasource. I am already adding a second header for the grid (to display some filters, and they need to be shown even if there are no results so that the user can perform another "search"), on rowCreated event, so, where am i supposed to add the row? Which events are fired even if the gridview is empty?