hide checkbox in grid appropriately

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2004
Posts: 6
Reputation: fmardani is an unknown quantity at this point 
Solved Threads: 0
fmardani fmardani is offline Offline
Newbie Poster

hide checkbox in grid appropriately

 
0
  #1
Jan 17th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 27
Reputation: srikkanthan is on a distinguished road 
Solved Threads: 0
srikkanthan srikkanthan is offline Offline
Light Poster

Re: hide checkbox in grid appropriately

 
0
  #2
May 9th, 2005
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC