954,577 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

hide checkbox in grid appropriately

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

fmardani
Newbie Poster
6 posts since Dec 2004
Reputation Points: 10
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 <> Then
e.Item.Cells(4).RowSpan = <>
Else
e.Item.Cells(4).Visible = False
EndIf

Here the column number 4 in the grid is assumed as the checkbox column.

srikkanthan
Light Poster
27 posts since May 2004
Reputation Points: 42
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You