K
Kevin Frey
Hello. I asked this question a while back and got no response, so I thought
I'd have another shot.
When I display a list of records in a GridView, I want to be able to vary
the presence of the Edit and Delete buttons per row depending on eg. the
user's security permissions for that row, or attributes associated with the
record (eg. a purchase order that has been dispatched to a supplier cannot
be deleted).
Can anyone tell me the correct method to go about this?
The track I am currently taking is to build a specialised CommandField
object, and hiding the appropriate controls from within a data-binder. I'm
doing this so I don't have to reimplement much of CommandField
(InitializeCell specifically).
Is there any easier way to achieve this? (To be honest the whole
data-binding strategy seems very circuitous at times for cases like this).
I'd have another shot.
When I display a list of records in a GridView, I want to be able to vary
the presence of the Edit and Delete buttons per row depending on eg. the
user's security permissions for that row, or attributes associated with the
record (eg. a purchase order that has been dispatched to a supplier cannot
be deleted).
Can anyone tell me the correct method to go about this?
The track I am currently taking is to build a specialised CommandField
object, and hiding the appropriate controls from within a data-binder. I'm
doing this so I don't have to reimplement much of CommandField
(InitializeCell specifically).
Is there any easier way to achieve this? (To be honest the whole
data-binding strategy seems very circuitous at times for cases like this).