Enabling toolbar for a list programmatically means to enable it on xslt list view web part..Here’s the code:
Hope this helps-