in a grid with multiselection turned on, I'd like to be able to examine the underlying data row when each row is being created so I can decide whether or not I want that row in the table to be selectable or not (i.e. whether to show the checkbox on the far left for selection).
With the normal datagrid I could use code such as the below to examine each row as it was being created. How do I do this with the radgrid?
Private
Sub MyOnItemCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles dgmain.RowCreated
Dim status As String
Dim flockId As String
Dim requesterEmail As String
If (Not (e.Row.DataItem Is Nothing)) Then
flockId = DataBinder.Eval(e.Row.DataItem,
"flockid").ToString
status = DataBinder.Eval(e.Row.DataItem,
"status").ToString
requesterEmail = DataBinder.Eval(e.Row.DataItem,
"requesteremail").ToString
If (e.Row.RowType = DataControlRowType.DataRow) Then
If ((status = "P") AndAlso (requesterEmail = CustomPrincipal.UserEmail OrElse User.IsInRole("dms") OrElse User.IsInRole("tms"))) Then
sbAll +=
"document.aspnetForm.cxitem" + flockId + ".checked=true;" + Chr(10)
sbNone +=
"document.aspnetForm.cxitem" + flockId + ".checked=false;" + Chr(10)
End If
End If
End If
End Sub