.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Manipulating list view from Ecmascript client OM

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :SharePoint

Hi All,

how can I manipulate the view of a list which is beeing displayed by a (Xstl)ListViewWebPart?

The idea is to control the items that will be displayed by setting the view's filter through the javascript client OM.


View Complete Post

More Related Resource Links

How to get List ContentTypes using ECMAScript Client Object Model?

Hello SharePoint Experts, I have a document library in SP 2010 site which also has a custom Ribbon button. The user can select either a folder or a document/List Item from the document library. I want to disable the custom Ribbon button if the user selects the folder and enable it when the user selects document/List Item. I want to do all this using JavaScript/ECMAScript Client Object Model. I tried many things,but could not do it yet. I know I how to check if the currently selected item has a Folder ContentType or an Item ContentType. Code: var _clientContext = new SP.ClientContext.get_current(); var _web = _clientContext.get_web(); var _list = _web.get_lists().getById(SP.ListOperation.Selection.getSelectedList());                                  _clientContext.load(_list, 'Title', 'Id'); _clientContext.executeQueryAsync(Function.createDelegate(this, onListLoaded), Function.createDelegate(this, onListFailed)); function onListLoaded(sender, args) {                                   alert('onListLoaded...');        &n

Disable filtering on a Dynamic Data list view.


I have an entity set of NotificationTemplates, and each one of these has a collection of zero-many SmsTemplate entities. When editing or viewing a NotificationTemplate, I have a link to View SMS Templates. That link takes me to a List view for the SmsTemplates entity set, filtered for the NotificationTemplate I was viewing.

How can I prevent the user changing this filter to show SmsTemplates for another NotificationTemplate? That is, I want the filter, but it must be read only. The drop-down just mustn't drop down, it must just display the name of the NotificationTemplate that these SmsTemplates belong to. To view SmsTemplates for another NotificationTemplate, the user must click View SMS Templates from that other template.

This was originally asked by myself on SatckOverflow at: http://stackoverflow.com/questions/3514373/disable-filtering-on-a-dynamic-data-list-view

Video: SharePoint 2010: ECMAScript Client Object Model

In this video you will learn how to use the SharePoint client object model to program a ECMAScript application against SharePoint data. (Length: 8:20)

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

list webpart, not using the sourse url, but referring back to the library view on close.

i have a webpart which brings a list in to my front page. -when user clicks, it shows  the item, and when he clicks on close,it takes him back to the library view. not back to the page,from where the request has initiated. we are using f5 load balancer, and our webapplications are extended. is there somesetup i am missing, so that i can make the sourse url's refer back to the originating page.        

List view - inline editing with read only fields

I'm new to sharepoint and using SP2010. I would like to use the inline editing feature of list view and at the same time to lock some of the fields. Is there a simpler way to achieve this like adding some field property using SP designer?

List View Permissions and Views for Web Parts

My fellow developers and I are going in circles a bit with our new Sharepoint 2010.  This question probably has several different answers.   I have a list of grades and comments that our Team Leaders want to create and save on Sharepoint.  When saved, the user who was graded should be able to see their own grades.  Its a pretty simple requirement and I'm 90% of the way there.   I created a list with the required fields, and two separate views.  The first view filters the list by the user's name so they see on their grades.  The second view shows all grades in a grouped order by the person who assigned the grade.  To make this second view more readable, I added some formatting with Sharepoint Designer 2010.  It looks nice.   Here's where the speed bump occurs.  I create a web parts page for each view.  The page showing only the user grades works as expected.  The other page, however, shows the list in a view that I didn't create.  No matter what view I select from the "Edit Web Part" menu, it always shows this strange view.  If I select the list, it says its current view is "Default".  The second view I created is set as default, but its not the view I see.  If I change the current view from list menu to the second view specifically, it shows up correctly. &n

Develop consumer which receiving data from list view

In my page I want to display a list view. Each time a user is clicking  on an item the relevant data of the current item will be passed to a consumer web part that I will develop. What interface the list view WP inherit from? Can you give send me an example of such implementation?   Tnx Keren  

Create a new list View Style

Hi, In SharePoint 2010 for XSLT List View Web Part you can assign different view styles using SharePoint Designer. For example "Basic Table", "Boxed" or "Shaded" etc. These styles just don't fit my needs. So my question is how can I create my own View Style which I can apply to any list? I came across "Customize XSLT > Customize Entire View" option under Design tab in SharePoint Designer which allows me to change the XSL stylesheet and control the rendering for a list. But how can I create my own list "View Style" which I would like to reuse with other lists too? Thanks, Hitesh  

How to hide the list ribbon in XSLT List View Web Part?

Hi, In SharePoint 2010, I have a custom list "Clients" on a site. On the home page of the site, I have added a Clients List Web Part. When I access the home page in a browser and click anywhere in that list, it displays the "List Tool" ribbon group which has "Items" and "List" ribbons. I do NOT want these ribbons at all when clicking on the list. How do I achieve this? Should I disable the click event on the list so these ribbons do NOT appear? How do I disable the click event on the list? Or What should I do to hide these ribbons when clicking on the list? Basically I want it to behave same as content query web part. In content query web part, if you click anywhere in it, it doesn't show up any extra ribbons. I want the same behavior with list web part. Thanks, Hitesh

scrollbar is not showing for sharepoint list with group by view

Hi, have created a Share point 2007 list having a huge data. I have created a group by view by grouping the data with category. My requirement is to show the data as web part on a page. When i did so, while expanding the group inside the web part, the web part is expanding. I want to keep the height and width of the web part fixed so that the layout of the page will not be ugly looking. But though I am putting the option for fixed height and width in the web part setting but I am not able to see the scroll bars. Where as I can see the height and width are fixed but could see a few data instead of all the data with scroll bar.   Please advice me if there is any solution or workaround.Deeptyranjan

list view

in  list view's properties what is  group?  

Cannot access parent site list from subsite in XSLt List View webpart in sharepoint designer 2010

Hi    We are using sharepoint 2010  for internet facing sites for our big client in healthcare domain .  I am using XSLT list view webpart in sharepoint designer 2010 for retrieving contents from sharepoint list & displaying it by using XSLT List view webpart in publishing sites. We are having lot of list in rootsite collection, If i am creating pages by using XSLt list view webpart in root site collection I can access the list,View and Display in Pages by XSLT List view webpart. Now the requirement is i have to access the list in roosite collection(parent site) from subsites.  In Sharepoint designer 2010, while i am inserting XSLT list view webpart, i could not find datasource to access the list that exist in rootsite collection(Parent site) from subsite. Below is the the code i am using for accessing the list& view from parent site & creating the pages in parent site by using xslt list view webpart,now i wants to access parent site list from subsite by using XSLT list view webpat in subsite pages.  Pls let me know what i have to change in the code level <WebPartPages:XsltListViewWebPart runat="server" Description="The list for the conditions details" ListDisplayName="" PartOrder="2" Default="FALSE" HelpLink="" AllowRemove="True" IsVisible="True" All

Can Managed Metadata columns be edited in the DataSheet View of a Library or List?

Hi, I like to mass set document properties in a library using DataSheet View, the properties are columns based on Managed MetaData values. When I open the doc library in Datasheet view, those columns become read-only. I made sure the library does not require 'Check Out' and also tested it in other views then the AllItems view. Can someone confirm what is the expected functionality and or if there is a bug?

View Definition for SP 2010 Client Object Model

Hello, I am looking for where in the SP Client Object Model that I would find where the View Definitions are Located. For various reasons, I am displaying in my own custom listview a list of Documents and I would like these list results to share the same look as if the user was looking at the list in SharePoint.Please note this is NOT web based, but an application. Can someone give me a hint as to how to pull a view definition? Thanks, Andrew

How to get the webpart title in XSLT list view webpart

Hi, How to get the Webpart Title or ID in XSLT on list based webpart. I saw the couple of articles getting the Title and ID in CQWP. But my scenario is XSLT list view webpart. Thanks in advance Regards, Madhu
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend