Forms Data Controls :: Merge Like Cells In Column In Gridview
Mar 18, 2010
I'm working on a project in vb.net framework 2.0 and have a column that has server names. I have the accessdb sql setup to order by the db, what I would like to do is to have it look like the following picture below. I'm pretty stumped on how to do it as the methods I've found online haven't worked so well. Also just a small tid-bit the gridview is bound to a ddl which selects the application and the gridview refreshes with server data. Country would be server name and state would be the environment.
I'm working on a project in vb.net framework 2.0 and have a column that has server names. I have the accessdb sql setup to order by the db, what I would like to do is to have it look like the following picture below. I'm pretty stumped on how to do it as the methods I've found online haven't worked so well. Also just a small tid-bit the gridview is bound to a ddl which selects the application and the gridview refreshes with server data. It is sorted by server than environment so the columns contain much of the same info for those over and over. Country would be server name and state would be the environment.
i have a gridview in my website and i want to merge two cell of that in same column but in different row , for example i have a data about tours in an agency , now i define a tour that has two hotel with difference grade , i want tow show my grid view in this manner :
I have a GridView known as GV_R001 with IssueType, ActID, IssueID cells. I want to Merge the similar IssueType cell accordingly. How do i merge and also sort the IssueType cell accordingly. The following is my codes:
Protected Sub GV_R001_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles GV_R001.DataBound For rowIndex As Integer = GV_R001.Rows.Count - 2 To 0 Step -1 Dim gvRow As GridViewRow = GV_R001.Rows(rowIndex) Dim gvPreviousRow As GridViewRow = GV_R001.Rows(rowIndex + 1) Dim cellCount As Integer = 0 If gvRow.Cells(cellCount).Text = gvPreviousRow.Cells(cellCount).Text Then If gvPreviousRow.Cells(cellCount).RowSpan < 2 Then gvRow.Cells(cellCount).RowSpan = 2 Else gvRow.Cells(cellCount).RowSpan = gvPreviousRow.Cells(cellCount).RowSpan + 1 End If gvPreviousRow.Cells(cellCount).Visible = False End If Next End Sub
Apart from that, after sorting i want to calculate the amount of IssueID are in a particular IssueType and display in a cell called "Total". Is it possible to do so? By the way, I am using Web Developer 2008, VB.net.
I am working on ASP.NET 4.0 application.I want to bind the data in a datatable to a grid control and i want to do some formatting. I want to merge the cells or hide the cell border in the first three columns (Merge every 5 cells in a column). And Vertical align the text to center. Also i need row border at the end of every 5 rows.
For example, If i am binding 10 rows to the Grid i need row border only at the end of 5th and 10th row. And merge every five cells only in the first three columns. All the other columns should not be changed. I also want to change the background color of the cells in all rows based on the value in that cell. How to achieve this in ASP.NET 4.0 and which control can be used to display in this format?
I'm looking for a technique to edit a whole column (vertical) instead of a row (horizontal).Suppose i have 10 rows en 5 columns (like in Excel), and i want to edit all digits from different students (rows) for test number 3 (column).
I Have to present This Data using DataGird on the bellow format
Employee Id Employee Name 01-01-2011 In Time Out Time Remarks 1 Mr Netra Thapa 09:01:59 18:0:15 Earlry In 2 Mr Luja Manadhar 10:15:00 17:0:15 Late In , Early Out 3 Mr Kushal Joshi Absent 4 Mr Prakash Gobhaju 09:00:15 18:30:15 Late Out
have grid view with column ..price ...Sno. Product price ($)1 Pencil 12 Rubber 33 sharpner 2I want to calulate the price column .... means //// i want to calculate the cells in Price column of GridView .....the reult of price will be shown as 1+3+2 = 6
I've created a DataTable by programming and I'v inserted a new DataRow into it, I binded it with a gridview (It's ok), but that new row has many columns, how can I merge all columns of that new row and set the value will be show of that row.
Here is my snipet:
Store2 (new row I've created and I want to merge all columns and show the value is Store2)
want to merge the columns into gridview example SELECT b.TableName,c.ColumnName,a.DataProfileAction,(a.ForeignTable+'/'+a.DataProfileAction) As MergeRecords From DataProfiling As a Inner Join TableList As b ON a.TableId= b.TableId Inner Join MetaDataTable As c ON a.ColumnId=c.ColumnIdquery working.. suppose if any one column empty while binding times it come as empty..
I am able to display it in gridview but not in the above style, that is the columns in excel above are merged, but I have fail to merge gridview column. I have searched google for solution but what I found is that of merging row or header, but what about this one? Note, I can not fixed this style as user can upload excel routine files to server of different style.