sharepoint-2010

how can I add event receiver only for list with specyfic template id

﹥>﹥吖頭↗ 提交于 2019-12-21 12:41:13
问题 I'm adding ItemAdding event receiver for custom list template. Both event receiver and list template are deployed by the same feature. Also the same feature creates List Instances. The problem I've got is that the event is fired for each list item in site to which it was deployed. Elements.xml for eventreceivre is: <Receivers ListTemplateId="10200"> <Receiver> <Name>ListEventReceiverItemAdding</Name> <Type>ItemAdding</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class

Check if a List Column Exists using SharePoint Client Object Model?

强颜欢笑 提交于 2019-12-21 12:14:41
问题 Using the Client Object Model (C#) in SharePoint 2010, how can I determine if a specified column (field) name exists in a given List? Thanks, MagicAndi. 回答1: Just found this while searching for the same thing, but it looks like Sharepoint 2010 has something built in for this, at least for the Server model: list.Fields.ContainsField("fieldName"); Not sure if it exists for Client side though. Figured it would be a good place to store this information however. 回答2: Server Object Model string

How to get list of all document libraries from sharepoint site programatically

对着背影说爱祢 提交于 2019-12-21 05:36:09
问题 I am using below code which gives me both list & document library; but I am trying to get list of only document libraries. Please help me how to differentiate list & document library programatically using(SPSite oSite = new SPSite("https://server/site")) { using (SPWeb oWeb = oSite.OpenWeb()) { SPListCollection oLists = oWeb.Lists; foreach (SPList olist in oLists) { Response.Write(olist.Title+"<br>"); } } } 回答1: See this Post Try this ways : using(SPSite oSite = new SPSite("https://server

SharePoint 2010: RemoveFieldRef and Inherits=“TRUE”

痞子三分冷 提交于 2019-12-21 04:29:12
问题 I have created a custom content type that inherits from the OOTB SharePoint Picture content type. The only customisations I have made is to add a simple URL field, and remove two of the fields on the base type. See below: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Parent ContentType: Picture (0x010102) --> <ContentType ID="0x0101020027f16ab27e6e45a6848c25c47aaa7053" Name="Custom Picture" Description="" Group="Custom" Inherits="TRUE" Version="0"> <FieldRefs>

jQuery $(document).ready() not firing

早过忘川 提交于 2019-12-21 03:52:28
问题 Using jQuery 1.4.2 from Google hosted Code. Is there a reason why the following javascript does not fire all 3 document.ready functions when the document is ready? The first $(document).ready() function, which renders headers, and the second, which gives a 'Foo' alert box triggered, but subsequent ones in new <script> blocks aren't triggered, <script type="text/javascript"> $(document).ready(function () { Cufon.replace('h1'); // Works without a selector engine Cufon.replace('h2'); // Works

“List Tools” tab is no longer available after adding webpart to the page

不羁的心 提交于 2019-12-20 14:14:18
问题 in SharePoint 2010 I have added my webpart above list (standard list or documents library list - it doesn't matter). After this "List Tools" tab is not visible. After some digging I have found, that problem exists even if I add one of the standard SharePoint WebParts. Here is the same problem and description how to reproduce it: http://www.endusersharepoint.com/STP/viewtopic.php?f=10&t=2027 Has anybody found the solution or real workaround for this? //EDIT: I've found a "solution". Ribbon is

Best way to handle Cross Domain on SharePoint Intranet w/o server side, silverlight, DBC etc

非 Y 不嫁゛ 提交于 2019-12-20 10:46:55
问题 I'm working on a Microsoft internal SharePoint site, and I need to pull in List data from a cross domain SharePoint site. I don't want to use Silverlight, for various reasons, and Business Data Connectivity is not possible right now. Is there a simple way to use JavaScript or something like it to accomplish this? 回答1: " Simple ?" Not exactly. Given your requirements, particularly " w/o server side ," this isn't possible. However, if you can forego that requirement, you have a few options for

How is SharePoint perceived in your company? [closed]

让人想犯罪 __ 提交于 2019-12-20 09:35:06
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . UPDATE An interesting time to revisit this question. Is perception still the same now that SharePoint 2010 is beginning to take hold?

Edit SQL Extended Properties in SharePoint 2010

依然范特西╮ 提交于 2019-12-20 04:32:10
问题 How can I edit extended properties of a table in SharePoint 2010? So far, I'm thinking there's nothing 'out-the-box' that does this. So, I'm assuming this means that I will have to make a custom web-part that extracts the extended properties of a table, then allows me to edit that, and then after editing is complete, the webpart updates the extended properties in SQL. I'm trying to figure out if there's a way to do this without using code (out the box features or something) OR if this is the

Determine Total Count Of Items Returned By SPQuery

这一生的挚爱 提交于 2019-12-20 02:28:07
问题 I'm running a number of CAML queries against a large list in SharePoint 2010, and displaying the results in a gridview to the end user. I wish to page through the results returned by the query to improve performance. However, I am required to display a total count of the items returned by the query on the paging control. My question is, how can I determine the total number of items that will be returned by each query without actually returning them all in a single SPListItemCollection? To be