Datagrid: Add a Main header row, above the column headers

Is this possible?  How is this done?

-smc


~ Remember To Mark The Posts Which Helped You As The ANSWER ~
0
smcirish
4/27/2007 1:27:07 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

3 Replies
517 Views

Similar Articles

[PageSpeed] 39

Yes...Handle the ItemCreated event.  I have a sample using the GridView that can give you the idea http://www.webswapp.com/codesamples/aspnet20/nestedgridviews/default.aspx


HTH,
Phillip Williams,
http://www.webswapp.com
0
webswapp
4/27/2007 2:43:33 PM

Do you have any examples using DataGrid in VB?

Can the Header be displayed above the column headers?

 -smc


~ Remember To Mark The Posts Which Helped You As The ANSWER ~
0
smcirish
5/1/2007 12:55:02 PM
http://www.societopia.net/samples/dataGrid_customheader.aspx
HTH,
Phillip Williams,
http://www.webswapp.com
0
webswapp
5/1/2007 3:43:41 PM
Reply:

Similar Artilces:

datagrid with a headers header row
Howdy! I am using a datagrid and I have all the rows and then a header row explaining each column, but I want a row above that as part of the table explaining the table. Thoughts? Cheers Can you explain more clearly what you want? Okay, A normal datagrid has the data fields and the header fields where the header fields are a one to one correlation to the data fields and are used to descibe the data fields. That is perfect as well, but I want to put a title on the datagrid above the header fields to use a couple of words to describe the table itself. There will be s...

adding a blank header row /row above the header row
is it possible to add a blank row above the header row in gridview for adding some links and buttons the links will respond to thae data in the grid and the buttons are for login / regisration etc....  if yes how it can be done or how do i achieve it. Its better that u create a table with a single row with columns matching the GridView columns. Set the table width same as the GridView width. This will make the GridView Look as if there is a row above its header.Please do not forget to click Mark As Answer on the post that helped you. Regards,Iam Srikanth Reddy....

Is there a way to add extra control to header of a Grid column, but still keep the default column name? thanks
I am using Grid, and I add template field <asp:TemplateField HeaderText="name" SortExpression="something">if I want to have special header, I can use HeaderTemplate, but with HeaderTemplate added ,the headertext will not show, if there a way I can just add a control beside the headertext? since I don't want to handle the column sort. thanks I am sure there is a better way to do this, but in the past I have used the following method although I left out the commandname and arguments protected void GridView1_DataBound(object sender, EventArgs e) { string celltext = GridView1.H...

Add a second Header-Row to DataGrid
Hi! I want to add to my DataGrid a second Header-Row in which i place textboxes...so the user can enter search terms for the desired fields... I really don't know how to... Thanks in advance! Hi, Take a look @ Extending DataGrid in ASP.NET HTHK B ShajudeenAreYaar.comDubai, United Arab Emirates. Oh that looks good to me.. Thanks!...

how to add string in row header of dataGrid?
hi there, I just want to know that can we add values or string displayed in the row header of a grid which is use to select the whole tuple ie ,row. If we can then pls let me know how. hope that i get the response as soon as posible. thanks Regards DeadRocker Do you mean that? Sub OnItemCreated( ByVal e As DataGridItemEventArgs ) if e.item.itemtype = ListItemType.Header the...

How to retrieve controls in column header of a DataGrid?
I have controls in column header of a my DataGrid control grdDocumentDate. I use grdDocumentDate.FindControl() to look for the controls in column header but could not get them. Is there any way to solve the problem? ImageButton ib = (ImageButton)grdDocumentDate.FindControl("ibDocDate");ib always returns null.<asp:datagrid id="grdDocumentDate" style="Z-INDEX: 118; LEFT: 24px; POSITION: absolute; TOP: 176px" runat="server" BorderWidth="0px" AllowSorting="True" AutoGenerateColumns="False" OnItemCommand="ShowMoreDetailsCommand" BackColor="Silver"    Width="704px"> ...

Can you control selectability of DataGrid column headers?
We have a DataTable with sorting enabled.  The person that I am working for has a complaint:  he wants the user to be able to select a column for sorting whenever the mouse is over the text in the header text of the column;  as things stand now, the cursor must be positioned  just below the text before the browser will allow selection.  Is there a way to control this, or  is this functionality that is internal to the browser? This behavior appears to only be an issue in Internet Explorer, not Firefox. the sort headers are simply an anchor...

how to add string in row header of dataGrid? #2
hi there, I just want to know that can we add values or string displayed in the row header of a grid which is use to select the whole tuple ie ,row. If we can then pls let me know how. hope that i get the response as soon as posible. thanks Regards DeadRocker Actually I couldn't understand exactly what do u mean, but if what you want is to add a clickable text in the header of a data grid to let the header be selected, if so then try to read this: I don't know if the header can be selected directly, but I don't think so, but there is a tricky way: by adding a normal ...

Add Custom Control to GridView Column Header
I am trying to add a custom control to the column header in a grid view. I am doing this on RowDataBound, but that might be incorrect. The ultimate goal is to have the Custom Control appear next tot the HeaderText and still allow the HeaderText to sort the columns. Here is my code:1 If e.Row.RowType = DataControlRowType.Header Then 2 Dim oCell As System.Web.UI.WebControls.TableCell 3 For Each oCell In e.Row.Cells 4 Dim oHelp As New admin_controls_HelpItem 5 oHelp.ID = "hlpItem" 6 oHelp.Help...

freeze the header row of datagrid for dynamically generated columns
Hi Everyone ... I have a dynamically generated datagrid populated using the results of an Oracle Stored Procedure. When I say "dynamically generated" I mean that dependent on the results from the database this will build the datagrid which can have varying number of columns, column headers, column types, etc ... I have sucessfully been able to program this using a DataView Object which has allows bi-directional column sorting and pagination. However, I am in a position where the database can return a vast amount of information, different people will use different hardware and thus ...

Repeating Datagrid column headers every 10th row
I want to display the datagrid column headers every 10th row so the user does not need to scroll up to see the header of the column. I have searched this issue a lot without any success. Please advice if this is even possible to achieve with the datagrid.   Check this one for startershttp://www.extremeexperts.com/Net/Articles/ExtendingDataGrid.aspxThanks,Teemu KeiskiFinland, EU Thanks for the reply.The example you mentioned does not repeat the original header. I want to repeat the productid and categoryid every 10th row. I am starting to believe now that this is not a...

Freezing the column header row of a GridView control using CSS
I am struggling getting my Gridview in ASP.NET 2.0 Visual Studio 2005 to freeze the column header row and provide for scrolling of the remaining data rows. My specific problems right now are: (IE7) column headers freeze as intended and do not scroll  BUT scroll bar is not initially visible to user (requires scrolling with mouse wheel before scroll bars are exposed in gridview) (Firefox 2.0.10) column header row just scrolls out of sight like any other row  Here is part of my default.css in my default App_Theme folder: /* So the overflow scrolls */ div.coveragesContainer ...

How to access a CheckBox in the header row of a Template Column in a data-bound DataGrid
All-- Please help. How can one get a handle to a CheckBox that is in the header row of template column in a DataGrid that is data-bound? See below for details on what does NOT work. Any ideas? Please advise. Thank you. --Mark Here is the code in the ASPX file... <asp:datagrid id="MainDataGrid" runat="server"> <headerstyle horizontalalign="Left" verticalalign="Top" backcolor="LightBlue" font-bold="True" font-size="x-small"></headerstyle> <itemstyle horizontalal...

how to put column values as column headers in datagrid
Hi, I am trying to develop a report. Basically we have two tables named A and B. In Table A we have columns DelivTypeId EstDate CompDate In Table B we have columns DelivTypeId DelivDesc I have written a join select statement to get the DelivDesc, StartDate, Enddate so the result would be like DelivDesc StartDate EndDate Tiering1 8/31/2004 9/20/2004 Tiering2 8/31/2004 9/20/2004 Tiering3 8/31/2004 9/20/2004 Tiering4 8/31/2004 9/20/2004 I need my datag...

Web resources about - Datagrid: Add a Main header row, above the column headers - asp.net.presentation-controls

Resources last updated: 1/10/2016 8:18:28 AM