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

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
End If

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.