I am writing a custom webpart to replace SP's default ListWebPart in my document library view page. But I found it can't keep the folder information when showing the "Explorer View". For example, I enter a subfolder "root/folder 1" and
select "Explorer View" in ViewToolbar, it returns the root folders content. But when I click the "Open in Windows Explorer" in ActionMenu, it returns contents of folder 1.
I see the Sharepoint's ListViewWebpart does not have this problem. It can return correct contents when I enter a sub folder and click "Explorer View". The page's url contains correnct query strings about folder path (in my own webpart the query
string is missing). Is it because I forget some config for the toolbar since I add it via codes?
Below is my code to add the toolbar:
SPView view = this.CurrentView;
if (view == null) return null;
this._toolbar = new ViewToolBar();
this._toolbar.ID = this.ID + "_ViewToolBar";
this._toolbar.RenderContext = SPContext.Current;
this._toolbar.TemplateName = view.ToolbarTemplateName;
Thanks a lot.
View Complete Post