In The Grid_ItemCreated Event Write this code for A Select Button:
this is an example:
If e.Item.ItemIndex <> -1 Then
For Each cont As Control In e.Item.Cells(0).Controls
If TypeOf (cont) Is Button Then
If Not cont Is Nothing Then
If CType(cont, Button).CommandName = "Select" Then
CType(cont, Button).Attributes("onclick") = "alert('its clicked');"
End If
End If
End If
Next
End If
Ahmed Ali
Software Developer
|