Doc Library List View Row Checkbox Unable to Select or Check

I have code behind that adds webparts to a page. An example of the code is show below.
# web is an SPWeb object
# wpMgr is the web part manager
# Get the list
SPList list = web.Lists["Document Library"];
# Create the list view webpart
XsltListViewWebPart lvwp = new XsltListViewWebPart()
ListId = list.ID,
Title = "Documents",
ViewGuid = list.DefaultView.ID.ToString(),
XmlDefinition = list.DefaultView.GetViewXml()
# Add the list view webpart to the page
wpMgr.AddWebPart(lvwp, "Main", 0);
Problem:
The issue we are having is only with document libraries. When we try to select the document library in the list view by selecting the checkbox, the item appears to be checked, but when you move the cursor away from the row, the checkbox is no longer selected.
This issue is found in Firefox and IE. I'm getting a js error in the core.js file's CountSelectedItems(a) function, shown below.
function CountSelectedItems(a) {
ULSrLq:;
if(a.CurrentSelectedItems==null) a.CurrentSelectedItems=0;
return a.CurrentSelectedItems}
The js error is "Unable to get property 'CurrentSelectedItems' of undefined or null reference". So I read this as the object a being null.
Workaround:
If you edit the webpart and click on "OK", it seems to refresh something and this is no longer an issue.
Solution:
I've tried the ListViewWebPart as well, but that didn't work for me either. Any advice is greatly appreciated.
Thanks
-Gunjan

We experienced the exact same issue and resolved it by using the code below.
In short are we trimming the ParameterBinding from White spaces before adding the webpart. After adding the webpart we update an unimportant property and save back the changes. The strange thing is that this code used to work previously before we added the
"fixup". With this solution you can keep the Group by clause in the CAML Query.
Please mark as answer if it solves your problem.
SPLimitedWebPartManager webPartManager = web.GetLimitedWebPartManager(pageUrl, PersonalizationScope.Shared);
XsltListViewWebPart XsltWebPart = new XsltListViewWebPart();
SPList list = web.Lists[listName];
XsltWebPart.ListId = list.ID;
XsltWebPart.ViewGuid = list.Views[viewName].ID.ToString("B").ToUpperInvariant();
XsltWebPart.XslLink = XslLinkUrl;
XElement el = XElement.Parse("<root>" + XsltWebPart.ParameterBindings + "</root>");
var reader = el.CreateReader();
reader.MoveToContent();
string trimmedBindind = reader.ReadInnerXml();
XsltWebPart.ParameterBindings = trimmedBindind;
webPartManager.AddWebPart(XsltWebPart, zoneId, zoneIndex);
int wpIndex = webPartManager.WebParts.IndexOf(XsltWebPart);
var xwp = (Microsoft.SharePoint.WebPartPages.XsltListViewWebPart) webPartManager.WebParts[wpIndex];
xwp.ExportMode = WebPartExportMode.All;
webPartManager.SaveChanges(xwp);

Similar Messages

  • How to disbale a group of checkboxes when i select one check box WEBDYNPRO

    Hi Friends,
    Can any body help me how to disbale a group of checkboxes when i select one check box WEBDYNPRO Abap
    Also can any body tell me how to handle chain endchain type of scenario in WEBDYNPRO Abap
    Thank you..
    Sai

    Hi
    In the context tab , create 2 context attributes ca_attr1 and ca_attr2   of type WDY_BOOLEAN under a context node cn_node
    now in ur Layout , bind the ENABLE property of CheckBoxGroup UI Element with this attribute ca_attr1
    bind the ENABLE property of CheckBox UI Element with this attribute ca_attr2
    create a action for ur Checkbox , for the OnToggle property of ur checkbox
    in OnactionToggle , check if ca_attr2 is 'X' , set ca_attr2 to ' ' ( for disable)
    this can be done by code wizard , press control +f7 and use read/set context attributes , use get_attribute and set_attribute methods
    // if ca_attr2 is 'X'
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr2.
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   get single attribute
        lo_el_cn_node->get_attribute(
          EXPORTING
            name =  `CA_ATTR2`
          IMPORTING
            value = lv_attr ).
    // if lv_attr2 is 'X' , use set_attribute method for ca_attr1
    IF lv_Attr EQ 'X' .
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr.
    *   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   set single attribute
        lo_el_cn_node->set_attribute(
          EXPORTING
            name =  `CA_ATTR1`
            value = ' ').
    ENDIF.
    regards,
    amit

  • Grey lines on library list view gone

    hello.
    until 3-4 days ago, my itunes was fine. now all the grey lines are gone from every list view, and it's just white background everywhere. I didn't install anything new or messed with any preferences.
    I tried reinstalling but nothing happened.
    I tried itunes on a new user, and it was fine.
    also, I noticed this:
    http://dl.dropbox.com/u/349788/Screen%20Shot%202011-11-26%20at%2013.28.40.JPG
    when another window is over itunes, the grey lines show up on the shadow of that window.
    what the **** is going on?
    how can i fix this?
    thanks.

    I was also kind of annoyed that they got rid of list view.  You now have to click the magnifying glass at the top and it will give you the list view.  There should be a dedicated button for the list view but hopefully they will change this in a future update.

  • ITunes has unselected all of my songs in my Music Library. How do I make iTunes SELECT and CHECK all the songs in my Music Library?

    I've just upgraded iTunes and iOS 5.1. Suddenly iTunes has UNSELECTED every song in my music library.  When I pick "Select All" from the drop-down menu, all the songs are HIGHLIGHTED, but none of them are CHECKED. I can't manually check every song in my library. How do I get iTunes to SELECT and CHECK songs in my Music Library?

    thanks! got it. it's the command key. hold it down while checking one of the boxes and the rest of them will be checked.

  • Printing XML Docs in List view created by XF builder

    Hi,
    I have an iview which displays a list of XML documents created using XMLForms. I want to add Print functionality in this iview. I tried adding a simple HTML link calling window.print() in the <project>RenderListItem.xsl file. It works fine. But the problem is that, the Print link gets displayed for each and every document.
    I just want the Print link to be displayed only once. I tried giving the Link outside the <xsl:template match="DataModel"> section. But it threw an error.
    Is there any way to display the Print link only once?
    Thanks in advance.
    Regards
    Ranjith

    Same Problem here, if you are able to solve it, please also help me.

  • Iphone calendar events only visible in list view

    Rant first: I do wish Apple would stop breaking things.  Every time we get an ios or itunes upgrade something else stops working.  Don't they test the changes?
    OK problem: Yesterday I did the the latest upgrade to itunes (11.2 1.4)  and a sync to my phone.  Today   I stopped being able to see most Calendar appointments and events in day view. At first I would see them for a half second or so before they would disappear so I knew they were on the phone.  Nw however they don't show up in day view at all.  Kind of defeats the purpose of having them on my phone.
    The appointments are still visible on iCal and Outlook and the Calendars are the all ticked.
    In month view I could see the dots that indicated the events were there but again that does not allow me to see them.
    In list view:  I was unable at first to see the appointments: but then a whole lot of "new Events' appeared at the times of the appointments that were there before I did the sync but with none of the detaisl that make the events useful.
    Any thoughts on how to fix?

    Create a CSV with the same format as you post and import it into My default Calendar. The calendar entry is visible both in Calendar view and List view.
    I've notice your Start Data/End Date is 3/7/2010 but not in 3/7/2014, you need to turn the calendar page to a 4-year-ago to check that..
    (In my test, I'v changed the data to 2014)
    Cheers,
    Tony Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please contact
    [email protected]

  • How do I remove the grouping headings in my list view web part?

    I don't have access to SharePoint Designer and so far, that is all I can find that people are saying to use.  I understand and know how to edit the HTML in SharePoint, just don't know what code to put in and where exactly to put it so that the Document
    Library List View web part is grouped how I want, but doesn't actually show the group titles.  Any help would be greatly appreciated.  Thank you!

    Hi,
    I understand that you want to hide list view group headers, based on your description, I can suggest as follow:
    Add this code to a Content Editor Web Part (CEWP) in the list view. Adding a CEWP in a SharePoint 2010 list view will unfortunately remove the list view selector.
    <script type="text/javascript" language="javascript">
    _spBodyOnLoadFunctionNames.push("HideHeaders");
    function HideHeaders()
    var elements = getElementsByClassName(document, "td", "ms-gb");
    var elem;
    for(var i=0;i<elements.length;i++)
    elem = elements[i];
    elem.childNodes[3].style.display = "none";
    elem.removeChild(elem.childNodes[4]);
    elements = getElementsByClassName(document, "td", "ms-gb2");
    for(var i=0;i<elements.length;i++)
    elem = elements[i];
    elem.childNodes[3].style.display = "none";
    elem.removeChild(elem.childNodes[4]);
    elements = getElementsByClassName(document, "tr", "ms-viewheadertr");
    for(var i=0;i<elements.length;i++)
    elem = elements[i];
    elem.style.display = "none";
    Written by Jonathan Snook, http://www.snook.ca/jonathan
    Add-ons by Robert Nyman, http://www.robertnyman.com
    function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
    oElement = arrElements[i];
    if(oRegExp.test(oElement.className)){
    arrReturnElements.push(oElement);
    return (arrReturnElements)
    </script>
    More information:
    http://edinkapic.blogspot.in/2008/06/hiding-list-view-group-headers.html
    http://spjsblog.com/2011/08/30/remove-group-label-in-grouped-list-view/
    If you have any questions, please reply me.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Sharepoint autoselection of list view items

    A SharePoint web part page has a set of three list views that depend on each other. For example, Order > Order Details > Products. For filtering, there are Connections defined to Send Row Data from Order to Order Details and from Order Details to Products.
    When the user clicks Order, I would like all of the filtered Order Details list view items to be automatically selected so that all of the Products are immediately visible. Is that possible?

    Hi
    check this solution for dropdown lists
    http://www.itidea.nl/index.php/cascading-dropdowns-with-jquery-and-spservices-on-a-page-or-webpart/
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Anyway to turn off 'album artist' shown in library list?

    Used to be, only the 'Artist' was shown in the library list view. which is exactly what I want. Now, both the 'Artist' and the 'Album Artist' show up in the library list view, which I hate. I don't see a switch anywhere, but I thought I'd ask...anyone know a way to get JUST the 'Artist' to display?
    I really wish if Apple was going to change this stuff that they at least give us ways to control them.

    that will turn it off in the songlist,
    That will turn it off wherever you are viewing.
    Select the library then iTunes menu View > uncheck *Use Album Artists*

  • Is there a way to exclude temporary people picker fields from a query when receiving the "List View Lookup Threshold" error.

    Hi All,
    My users require the ability to select a sharepoint group from a drop down list and then be able to select a user from a people picker based on the drop down selection.    The best solution I was able to up with, was create a people picker
    for each drop down selection and set the Sharepoint group field to the selected group.  All people picker filed are hidden except the one that matches the drop down selection.  When creating an entry from the sharepoint list this method
    works perfectly.
    However, when I add the list onto a site page using an "Listview webpart", then add an infopath web part and then finally connect the two parts, I get a "List View Lookup Threshold" error when selecting an entry from the list.  I
    understand from the error and reading that this error is related to the number of People pickers in the list.   Is there a way to exclude temporary people picker fields from a site page query, as they are only temporary fields to allow the users
    to select a person and then assign the name to another field.
    Dwayne

    Hi Dwayne,
    In SharePoint 2013, we could manually create a list for all users. Here are the reference:
    Go to Site Settings >  People and Groups > SiteMembers
    Modify url
    http://sitename/_layouts/15/people.aspx?MembershipGroupId=8 to
    http://sp/sites/tutu/_layouts/15/people.aspx?MembershipGroupId=0 , now you will see All people in this site.
    Change the view to List view, and copy the listview id in the url
    http://sitename/_layouts/15/people.aspx?MembershipGroupId=0&View={viewID}
    Go to Settings > List settings, copy the list id in the url
    http://sitename/_layouts/15/listedit.aspx?List=listeid&Source=....
    Now type the address in IE:
    http://sitename/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[LISTID]&View=[VIEWID]&CacheControl , such as
    http://sp/sites/tutu/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=f3958d27-9c2f-4f8d-b221-89466e816667&View=696BFDC5-0C6E-4E27-818F-0E6292A18407&CacheControl=1
    Save the owssvr.jqy from SharePoint site
    Now you could see the file in your desktop with all users, save it as allusers in Excel.
    Then import it to your SharePoint site, add an app > find an app > import spreadsheet
    Regards,
    Rebecca Tu
    TechNet Community Support

  • List View still displays dates as numbers after 2.1 Hotfix

    Hi
    Just tried the List View component after installing Fix Pack 2.1 Hot Fix.   I  put a list view component on the canvas, selected 3 datesone for each header, changed the Appearance - Header to Date and then hit preview.  The first header worksshows the dates but the other two headers show numbers, not dates.
    The documentation shows that this was fixed,  see below
    ADAPT01260598 (List View displays
    dates as numbers)
    Description:
    The header area of List View displays date values as numbers.
    New Behavior:
    This issue is resolved.

    No, I was just wondering since I have a second device on TMobile US and haven't gotten the update. I loaded this OS almost a month ago when it leaked on the Internet.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • Library List Inconsistent When Switching Tracks

    Hello -
    Let me explain my issue:  I select Track 22.  Load the instrument ESX24.  A library list comes up.
    Next, I select track 21:  The Library list changes (to like some default list).
    Then, select track 22 again, the library list is different.  
    Why doesn't the list stay consistant?  If I was browsing thru for a sound, I now have to reload the instrument all over again just to get my library list back.  Has anyone seen this before?  Does anyone have a solution for this? 
    Thanks!

    The answer is "Channel Strip Types"
    You have to be aware that there are Audio Tracks, MIDI Tracks, Drummer Tracks, etc. These are different Channel Strip Types. Their routing and the available Channel Strip components are different.
    Now lets look at the Library Window. This is not a browser window like the Apple Loops browser that shows you all the available Patches (and other settings files). It is more like an Inspector window that dispays its parameters (available settings files) depedning on what you have selected. In this case, the Track in the Tracks Area. Depending on what Channel Strip Type the currently selected Track is assigned to, those Patches will be displayed (like an Inspector on top of a Browser).
    In addition, if you look closely, stepping through the Tracks (even if they are all the same Channel Stirp Type, i.e. Audio Track), the Library WIndow will change its appearance to display the Patch that is loaded in the currently selected Track.
    What you see in the Library window is the content of sepecific folders of two locations. Here is a screenshot that shows the location of the Patch files with their individual folders for the different Channel Strip Types. THe screenshot is from my GarageBand book but it applies also to Logic becasue they access the same folders.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • List View like Library

    Hello All,
    Can we create a list view similar like Library Palette. If so which widget needs to be added on the palette.
    Basically we would like to show multiple columns as in library palette and allow the user to select one or multiple cells from the widget. As when we select a particular cell it selects the full row.
    If anyone has tried this, please do let me know.
    Thank you for all the help in Advance.
    Regards,
    Farzana.

    Hello All,
    I had asked a question last week regarding list view. Has anyone tried the same. If so please do let me know.
    Thank you all in advance.
    Regards
    Farzana.

  • Row limit in declarative list view web part

    Hi,
    Imagine you are in a scenario where you develop a custom web template or a site definition. Page Layouts with web part zones are being provisioned and out of them, decoratively web part pages are being created and populated with web parts. So something like:
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="XXXProjectPages" Url="$Resources:osrvcore,List_Pages_UrlName;" Path="" SetupPath="FEATURES\XXX_Intranet_PMO_PageLayouts\">
    <!-- Home -->
    <File Url="FullPageLayout\XXXFullPageLayout.aspx" Name="Default.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE" ReplaceContent="TRUE" Level="Published">
    <Property Name="Title" Value="Team &amp; Collaboration" />
    <Property Name="ContentType" Value="$Resources:cmscore,contenttype_page_name;" />
    <Property Name="PublishingPageLayout" Value="~SiteCollection/_catalogs/masterpage/XXXFullPageLayout.aspx, ~SiteCollection/_catalogs/masterpage/XXXFullPageLayout.aspx" />
    <!-- Latest News -->
    <View List="Lists/Announcements" BaseViewID="102" WebPartZoneID="wpZone1" WebPartOrder="2">
    <![CDATA[
    <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
    <Assembly>Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
    <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
    <Title>Latest News</Title>
    <FrameType>TitleBarOnly</FrameType>
    </WebPart>
    ]]>
    </View>
    For simplicity, let's assume that we are working with instances of OOB list definitions, such as Announcements or Document Library. So far so good. And now the question...
    In my understanding if you want to do something as simple as limiting the number of items returned, or specifying a custom view criteria (filter/sorting/grouping, whatever) or just remove the toolbar, you have to go as far as provisioning an ENTIRE LIST
    DEFINITION, defining your custom View in it (which declares the toolbar type, row limit and View) and then reference this new View by its BaseViewID. Is that correct?
    Is there really no other, simpler way, of 'provisioning' and referencing a new view, to an existing list instance, along with the
    Module -> File -> View element? I see a couple of logical options:
    1) I would imagine such metadata could be stored in the web part and not the actual list. i.e. the web parts sends a CAML query to the list, based on the View metadata stored in it.
    2) As we know, when you Edit page and configure the View for a List View Web Part on the page, that view is stored as a new hidden view in the actual list (i.e. if you have two list view web parts that reference that list, you will have two additional hidden
    views). Then why can't we provision such (hidden) view along with the List View WebPart when we declare it and create the page? It could be created on first access of the page, or during the page
    provisioning.
    Another option could be the XmlDefinition property of the XsltListViewWebPart, but
    apparently it is being ignored. I have also tried using the 'CustomSchema' property of the ListInstance, but it totally makes no sense because:
    a) You cannot define more than one view in it, i.e. you have to override the OOB view that comes with the definition (lol?!)
    b) You are supposed to overwrite the entire list definition, instead of simply upgrading parts of it
    So, let me elaborate: if I want to have a <View> (ListViewWebPart) in my Page and this view to have some custom criteria, I have to provision an entire List Definition, is that correct? This is crazy.

    Hi Hristo,
    According to your description, my understanding is that you want to know if you can use <view> tag in the list view web part to define the row limit of list view web part.
    Per my knowledge, you can define rowlimit element in the view element for list view web part directly not necessary to modify the entire list definition.
    View Element:
    http://msdn.microsoft.com/en-us/library/office/ms438338(v=office.15).aspx
    Also, if you want to do more customization, you can still orverride the xslt.
    More reference:
    http://www.glynblogs.com/2011/04/overriding-the-presentation-of-an-xslt-list-view-web-part.html
    http://unorig.com/2012/08/15/format-a-list-web-part-with-xslt/
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Zhengyu Guo
    TechNet Community Support

  • Adding "Filter Criteria" to the XSLT List View Web Part impact on "Export to Excel" functionality within Document Library

    Hi there,
    XSLT List View displaying all the list items within the Document Library. In order to implement the Search functionality within Document library out of box "Text Filter" web part is configured as explained below. The solution is similar to
    the one suggested at
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=77
    "Text Filter" Web Part added to the page.
    Filter Criteria (i.e., XSLT List View columns) added to the XSLT List View where the filter parameters take the input from the "Text Filter" Web Part .
      3. Both Web Parts (XSLT List View and the Text Filter) are connected.
    When the search criteria is entered into the "Text Filter" Web Part, it is passed to the relevant Columns of the XSLT List View and the documents (List Items) that match the search criteria are shown within XSLT List View.
    Search functionality working as expected.
    Query: Selecting the "Export to Excel" icon from the ribbon generates the excel spread sheet with no data except Column Titles from the Document library. In the investigation it is
    found that adding the 'Filter Criteria' on XSLT List View is causing this bug. When the Filter Criteria is removed, then "Export to Excel" functionality is working as expected.
    But it is mandatory to add "Filter Criteria" to implement the search functionality with in the document library.
    Help: Help/input appreciated on the work around to get the "Export to Excel" functionality work when the "Filter Criteria"
    exist on the XSLT List View.
    Regards,

    Once again thanks very much for your help Scott. very much appreciated.
    In the investigation it is found that removing the 'Filter Criteria' on XSLT List View makes the "Export to Excel" functionality work. But the 'Filter Criteria' is mandatory to get the 'Document Search' functionality.
    I think that due to technical limitations it should be concluded that 'only custom development can make all work, no code solutions using the SharePoint Designer can meet all the requirements.
    If you can think of any alternative solution that could help in resolving the current issue or fix the issue without any custom implementation please inform. Otherwise this issue would be marked as resolved with your suggested response.
    Regards,

Maybe you are looking for

  • Error while opening a dwg file :java.lang.NoSuchMethodException: Method

    Hello Experts, I tried to integrate WebCenter Content with Autovue ,the integration was good untill i get this error while trying to open a dwg file checked in Content Server using View in Autovue option in Actions : java.lang.NoSuchMethodException:

  • Error -10810 . the application Finder could not be opened

    Hello I recently (about 2 days ago) updated my early 2008 Mac Pro through the standard software update and since doing so my computer has begun acting like it wants to crawl into a hole and die. There are a number of issues I have noticed. After usin

  • Can't get alarm to work on new ipod--never had trouble with old ipod

    Greetings all, I just got a new Classic 120GB and it is great but I can't get the alarm clock to work...when I set a time for the alarm clock, it doesn't seem to remember this time but it instead defaults to an hour later than the current actual time

  • Pictures on my imessage wont send??

    i udated my ipad software to the ios 6.0 and it doesnt send any pics! but it receives texts, pics and videos, i just cant send the pics or videos they just sit there for at least 5 minutes then it has the red "not delivered" meesage i've reset imessa

  • FDM configation issue

    Hi experts, when i am going to configuring the FDM, i am getting the error. please help me. when i wm going to configure the web config manager, "Apppool "HyperionFDMAppPool" could not be accesed. cannot create ActiveX component". please help meeeeee