K
Kevin Frey
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).
I figure I'm going to need a custom version of CommandField, but I'm not
sure what it's behaviour should be exactly (still coming to grips with this
separation of render versus databinding).
My instinct at this stage is I need to create the controls "in advance" and
then use visibility to turn the control invisible if the test-case (eg.
permissions) dictates it.
Should I be doing this visible/invisible switch in a data binder? Or can I
actually achieve this earlier in the InitializeCell( ) method? (and even if
that is possible, is is good practice to do so).
Thanks
Kevin
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).
I figure I'm going to need a custom version of CommandField, but I'm not
sure what it's behaviour should be exactly (still coming to grips with this
separation of render versus databinding).
My instinct at this stage is I need to create the controls "in advance" and
then use visibility to turn the control invisible if the test-case (eg.
permissions) dictates it.
Should I be doing this visible/invisible switch in a data binder? Or can I
actually achieve this earlier in the InitializeCell( ) method? (and even if
that is possible, is is good practice to do so).
Thanks
Kevin