I am having trouble getting the selected items from a ListViewByQuery webpart, using the Client Object Model (JavaScript).
Code (server-side)
<SharePoint:ListViewByQuery runat="server" ID="lvbqMyNews" Enabled="True" DisableSort="False" DisableFilter="False" />
Code (client-side)
var context = SP.ClientContext.get_current();
SP.ListOperation.Selection.getSelectedItems(context);
//returns: [] when anything is selected.
I've tested the same code when going to a normal List in SharePoint, where it gets the selected items perfectly.
Problem
I am not able to get the selected items from the Embedded ListViewByQuery webpart (User control), when I have selected from a ListViewByQuery in a Webpart where I have added the control myself.
If I attempt the same operation on a normal list, then there is no problem getting the list of items. It seems like the Client Object Model is not aware of the ListViewByQuery webpart..