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

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

Dropping and linking multiple items within the same editing scope transaction

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Windows Application
Hi, I'm using IActivityTemplateFactory.Create to provide a custom experience when the user drops a toolbox item onto my Flowchart designer.  The implementation of IActivityTemplateFactory.Create is to use the model item tree to programmatically create multiple model items (related to activities), and link them together using the appropriate model item properties and connector view state.  All this works fine except for one thing. Say I'm dropping three activities as a result of IActivityTemplateFactory.Create.  I want the first activity to appear at the top, underneath should be the second activity and below that the third activity.  I want all three activity designers to appear alighned around their center point and there to be a straight, centered connection arrow between activity one and two and another straight, centered connection arrow between two and three.  Here's some ASCII art (we'll see how the formatting is retained - not very well it seems): |-----------------| | Activity 1 | | | |-----------------| | | | \/ |--------------| | Activity 2 | |--------------| | | | \/ |----------| |Activity 3| |----------|  It's important to note that the activity designers all not all the same size; both the height and width can vary. I've written code that looks at the various activity

View Complete Post

More Related Resource Links

Dropping and linking multiple items within the same editing scope transaction - Part 2



In an earlier forum post, I asked about how to drop multiple items from the toolbox onto the design surface, have them arranged nicely, and do all this in a single editing transaction.  In that post, Kenny came up with a nice solution.

There's one more scenario that I didn't discuss in the earlier post, that I was hoping to be able to resolve on my own after getting the other post answered.  But, I I'm afraid I need some more help.

The scenario is the same as in the earlier post with one additional complication.  One of the items I'm dropping as part of the drag/drop operation is a FlowSwitch node.  If I did nothing else, the solution presented in the earlier forum post would work.  However, I've an additional need to visually change the appearance of the FlowSwitch designer. Normally, one can change an activity's designer (even a built in activity) by using the metadata store.  However, the FlowSwitch is unique in that the Flowchart designer has hard-coded knowledge of the FlowSwitch designer, and if you replace the built in designer via the metadata store, there are numerous places where the Flowchart designer will generate exceptions and pop up error messages.  I also have the need t

SP2010: Ribbon: Editing multiple selected items


Hi there, we're using the Issues Tracking lists for a number of projects in SP2010.  I've created a solution that adds a few buttons to the ribbon that allows the user to select a few items, and then click the button to do something that affects all of those items, for example, set the "Assigned To" field to a specific value.  Using the EnabledScript tag for CommandUIHandler for the button, I'm able to disable/enable the button so that it only works if at least one item is used.

Two questions:

1) I've read that it may be better to use a "delegate control" for this instead of using a CommandUIHandler since it's just intended to work on a list and not a site - is that the case (and if so, how is that accomplished?)

2) More importantly, how would I actually post back changes to each item that the user selected?  I was thinking of popping up a model dialog that had an Assigned To People Picker box in it with an OK/Cancel, but I'm not sure what to use to post back changes to each item.

Any help would be appreciated - thanks,


Multiple web methods in one transaction


Hi everyone

Sorry I am kinda new in web services, so it may sound a bit newbish question.

We have a web service that comunicates with the database and exposes web methods that enables the application to access the database. Each method does only one operation (Insert, Update or Delete). What I need to do is create a transaction that will be consisted of multiple calls to the database, meaning multiple calls of more then one web methods. Can I do that? (I read that if the web method does not throw exception - or ContextUtil.SetAbort() is not called - the transaction will be commited automatically when the web method finishes executing, which I don't want to happen because I want to call another web method in the same transaction, and then manually commit the transaction)

Thank you in advance.

Items count in scope "not available" in on WFE while it is correct in another WFE

Recently, we added a new WFE in the farm to do load balance. After installation, the search is not working occassionally(almost 50%). It apparently hits the new server. The error message:
Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.

I checked the Items count on view scopes. It is correct on old WFE, while it is "not available" on new WFE.
 In the Office Sharepoint Server Search Seveice seeting, I checked "Use this server for indexing content" and "use this server for serving search queries". I had ever tried to uncheck ""use this server for serving search queries". It is not working, either.

Any suggestion?

People Scope has No Items

After upgrading to SharePoint 2010 I have completed the Active Directory import, and I am showing 544 User Profiles, however the People search returns nothing. After importing the profiles, I  completed a full crawl, and the People scope has no items. The People scope is setup as default with Include contentclass = urn:content-class:SPSPeople behaviour. I checked the content source for the indexer, and I have the sps3s://url source listed. Any ideas? Thanks Richard

SharePoint 2010 Search Service Application: "All Content" scope contains 0 items?

I've encountered a nasty bug in our setup. Our Search Service Application manages to crawl all content just fine. However, the scopes don't work. We've got a total of 570 items currently in our crawl database. 350 of these are of class 'People', and appear in the 'People' scope. The remaining 220 items should appear in 'All Content' as part of the intra (sites, documents etc), however the 'All Content' scope reports 0 items. I've tried the following: -Creating custom scopes (still 0 items) -Recreating the Search Service Application twice -Tried different accounts as the content access account. -Ensuring that the content access accounts do have 'full read policy' -Checked the crawl log for successful content (such as sites and documents). However, despite my efforts I still get 0 items for 'All Content'.  Has anyone else encountered this problem, or do you have any recommendation for us? Currently I don't see any other option than to reinstall everything.

Scope Items not available at site collection

Hi,The default scopes as seen in central admin after crawl and scope update is  People   Ready 331    All Sites   Ready 1792 But if I got to my site collection > site scopes for the same default scopes, I get this All Sites   Ready  not available    People   Ready  not available If I edit properties for all sites scope in the site collection.. I see thisRule                                                              Behavior    Item Count (approximate) All Content                                                     Include    (all items) contentclass = urn:content-class:SPSPeople      Exclude    error                                                                      Total: error Ironically, If I see the same info for all sites in SSP admin.. the count is properI checked the index service to be running fine..I created a new SSP and associated this webapp to it.. no changeCan you please help ?[Update]In fact every Site Collection in the current Web Application has the same problemWhereas, All other site collections in every other Web Application in the farm has no issues.. Did I configure this web app differently ? [Update 2]I backed up the site collection and restored it in another web application .. the Item count started showing up. This indicates that there is something related to the way the web app was created that the count is not showing up in some web apps. Can a

Need to link multiple External Content List items to a single document metadata column

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

multiple executions of MERGE statement: Help with suitable TRANSACTION ISOLATION LEVEL

Folks, I am reasonably new to SQL Server. I am using SQL Server 2008 (no SP) on Windows XP. I am using the MERGE statement within a TSQL procedure to update a master/detail table pair (Master/Child), in which the MERGE inserts into the MASTER if a record based on the primary key doesn't exist and does, effectively nothing, if it does (well, it does an UPDATE set PK=PK so the record is passed on to the OUTPUT statement for insertion into the CHILD). Regardless as to the situation, the CHILD record has a record created when the MASTER exists or doesn't exist. Now, this code works fine with the standard TRANSACTION LEVELS. But I don't know what to do when I am running two instances of the same MERGE statement at the same time. One execution could create a record in the MASTER which the other process might try and create 5 minutes later. I really don't know what SET TRANSACTION ISOLATION LEVEL to use to allow both processes to run at the same time. I have looked at: ALTER DATABASE $(usedbname) SET READ_COMMITTED_SNAPSHOT ON; ALTER DATABASE $(usedbname) SET ALLOW_SNAPSHOT_ISOLATION ON; But these don't seem to work with their associated TSQL calls. I know this is a complex issue, but as a new SQL Server user, I didn't know where else to go. regards Simon                              

Adding, removing or editing the items of combobox.....

Hello everyone, I am working on this application which requires Items of the combobox added, edited or removed by the end user in the different section of the application such as settings window or something like that. I guess If we bind the Combobox to the database where we could easily add , remove or edit the items of combox but for the application that doesn't use database that creates a lot of overhead. To demonstrate that Here is my sample application Window1.xaml <Window x:Class="MySampleApplication.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" Title="Window1" Height="300" Width="300" xmlns:local="clr-namespace:MySampleApplication" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"> <Window.Resources> <local:StringsLenToBooleanConverter x:Key="mvc"/> </Window.Resources> <Grid> <ComboBox Height="26" Margin="12,75,12,0" Name="comboBox1" VerticalAlignment="Top"> <s:String>Red</s:String> <s:String>Blue</s:String> <s:String>Green</s:String> </ComboBox> <Button Height="28&quo

Multiple sql-statements in one transaction

Hi - I've two sql-statements - two inserts statements.The first one creates a person and the next creates an entry in another table with the person id as reference - everything works fine but I've been looking at my code and would like to know how I should wrap it up before firing the statements.I keep it all in one transaction - if the creating of the person fails or the other operation I need to rollbackMy question is:Should I use the same SqlCommand object to fire both statements? At this point I create a new instance for each statement - but isn't it possibly to use the same SqlCommand object, the same SqlConnection and wrap it into the same SqlTransaction?What is best practise in situations like this?

To Hide multiple items having same ID using Javascript

How to access items having same ID using Javascript ?I want to hide these items.Urgent Help Requried .......

toolbox shows items multiple times

My tool box shows the same tools about 12 times.  This is for all of them and for all categories.  I tried repairing it but it didn't work. 

Multiple databases backup/restore in a transaction, if possible, into only one file


Hi dear,

I have three databases named XDW, XOLTP, XOLTPSchema. All of these are for only one application. In the application, user should do backup/restore using GUI.


1. How I should do backup/restore in one transaction? i.e. all of three actions should be success elsewhere all of them should fail.

2. Is it possible to backup them into only one file e.g. X.bak?

3. Or, What is the standard solution in this condition?

Thanks in advance.

How To: Joining multiple DataTable using “LINQ to DataSet”

Multiple selection of items

I've pretty much created a custom itemscontrol and put in there some of my custom objects which are set up to look like rectangles which can vary in size. At this point, I am stuck on understanding how I would select multiple of these items within my collection of items or if this even possible. I keep on searching but I get no results. Btw, my rectangles are setup in a grid fashion which would span the size of a picture in the background.

Merge multiple list items in one list



How can I merge one list content to multiple lists?

Example: The scenario, we have a site collection and inside this site collection we have another subsite where we have a list called "sourceList"  http://sitename.com/collection/siteName/sourceList/ and we have another subsite inside that subsite that has a nother list called "destinationList" http://sitename.com/collection/siteName/subSite/destinationList/.  

Those lists have different columns and are in different sites but in the same site collection.

How can i make a web part that i will add it on the listName1 list and provide the source list(sourcelist) and the destination list (listName1). And the web part will merge the lists content. In our case the items from sourceList will be merged with the items of the destinationList, inside the destinationList list.

Becaseu the fields(columns) are different, and the metadata should be the same if the columns of both lists are the same, otherwise empty.

Thank you very much.


Change the content type for multiple list items


I have a document library which is configured to manage content types.  Users will be expected to upload multiple documents into the library.  Then they will be expected to choose the content type of the file and fill in the required metadata.  The only difference in these content types is the template which will be used to create new files of the specific content type so the columns are identical for each content type.

I have created a public view with inline editing enabled but Content Type is not an editable field.

The problem I have is that when I enable Inline editing, the users don't have an opportunity to select the content type, even though the files have just been uploaded and have not been checked in.

My question is this; how can users change the content type of multiple items without having to go through the complete New Item form? 

With literally thousaands of documents to be imported, having the users fill out a separate form for each document when many will have the same column values is a show stopper for our rollout.  It will take too much time.  The project will be a failure. 

I've also tried to create a datagrid view but the same problem exists.  Content type is not an editable column value.

Thanks for helping.


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