Defaulting Preview Pane To First Item in List
A client of ours wanted to use the preview pane for a list view. The default view of the preview pane has the right hand pane blank. You need to select an item or hover an item from the left pane to populate the right pane. The client wanted the right hand pane to have the right hand pane default to first item in the list.
- Add a reference to Jquery into the master page.
- On the list view page add a content editor web part.
- To do this go to the list view page and add ?ToolPaneView=2 to the query string. This brings the list view page into edit mode where you can add a web part to it.
- In the content editor web part add the following JQuery.
$("document").ready(function () { $('div.ms-ppleft table tr td.ms-vb-title').first().trigger('onfocus'); //click(); }) - Save the page.
- The preview pane should now default to the first item in the list.
I cannot get this code to work at all in SharePoint 2010. I am applying it to an announcements list preview pane. Any suggestions?
Thanks for the comment. I need a little more info than that id doesn’t work to try to help. Did you add the reference to jquery to the masterpage? Is it throwing a specific error when you try to debug it?
-dcp
Rating(0-5) is not working in preview pane. how to enable this feature?
Its working absolutely perfect when the list item is opened in a dialog box.
Thanks in advance
I have never tried to use the ratings in the preview pane before. I do know that the ratings uses javascript to manage the stars. Are you getting a specific error? Do the stars load on the page at all or are they hidden? -dcp