| | |
hide checkbox in grid appropriately
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2004
Posts: 6
Reputation:
Solved Threads: 0
In the itemtemplate of a web datagrid, I have placed a checkbox.
At present, for every row of the grid, there is a checkbox.
If for example, let's say three of the records have the same FileID, then I would like to have only one checkbox for these three rows as opposed to one checkbox for each row.
How can I do this please?
Thanks
At present, for every row of the grid, there is a checkbox.
If for example, let's say three of the records have the same FileID, then I would like to have only one checkbox for these three rows as opposed to one checkbox for each row.
How can I do this please?
Thanks
•
•
Join Date: May 2004
Posts: 27
Reputation:
Solved Threads: 0
You can use the ItemDatabound event in the datagrid for this. Add this ItemDataBound event of the datagrid and inside the event function - you could do something like in the following code:
If <<logic to find to span or not to span>> Then
e.Item.Cells(4).RowSpan = <<number of rows to be spanned>>
Else
e.Item.Cells(4).Visible = False
EndIf
Here the column number 4 in the grid is assumed as the checkbox column.
If <<logic to find to span or not to span>> Then
e.Item.Cells(4).RowSpan = <<number of rows to be spanned>>
Else
e.Item.Cells(4).Visible = False
EndIf
Here the column number 4 in the grid is assumed as the checkbox column.
![]() |
Similar Threads
- checkbox in grid control (ASP.NET)
- show and hide data grid? (Visual Basic 4 / 5 / 6)
- Checkbox Value in DataGridView (VB.NET)
- hide checkbox when field value is null (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Query about Web Beacons
- Next Thread: How it is possible tu use a class that is in a new vb file??
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox class compatible confirmationcodegeneration content contenttype countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv forms gridview gudi homeedition iis javascript jquery list listbox menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice xml xsl





