I am extending the ButtonField DataControlField and I want to set its .Visible property inside this extension.
As it does not have On开发者_高级运维PreRender method like other Asp.Net controls, Where is the best place to set .Visible property? Which method? CreateField?
Typically visibility can be set at anytime before the Render event.
Depending on what logic you're trying to implement I'd suggest looking at the ItemDataBound event for whichever data-bound you're working with.
Perhaps if you could be more specific about what you're trying to achieve and why you're setting the visbility I can help further.
精彩评论