.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

Web part connection when there is no value all items appear

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

Hi All,

i have two lists and two dataview in the same page, i made a connection between the two dataview and every thing work fine,

but i have a little problem: when there is no data in the data view 1 the other data view web part will show all items and that wronge 

it should show nothing,

any ideas ??




View Complete Post

More Related Resource Links

Content Query Web Part (CQWP) fails to show picture items from a document/picture library in an anon

I have a Picture Library and am trying to use the CQWP to display a list of items in the library.  The web part shows the items fine in authenticated mode, but it fails to show the items to anonymous users. The error log message is: Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.SetDocumentIconUrlAndOnClickString(SPWeb web, DataRow row, String strDefaultItemOpen, Boolean fSetDocIcon, Boolean fSetOnClick, String fileRefColumnRef, String progIdColumnRef, String fsobjTypeColumnRef, String permMaskColumnRef)     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.PreProcessForDocumentIconAndOnClickAttribute()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.AddContentQueryData()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String viewPath)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform) I'm running SP 2010.  I've tried various scenarios including: 1. Using the default publishing template. 2. Using the blank site template with publishing and lock down features enabled. 3. Us

Sharepoint Filter Web Part Connection to Picture Libary Web Part

It seems that a sharepoint or choice filter web part can connect to any list object in sharepoint that is displayed in a web part on a page but the picture library.  I want to allow the user to select a value so that only the image that applies is viewed (along with any correlating information stored in its library). Is there a work around for this?  I've looked all over the web and can only find where someone else has asked in another forum and has not yet received an answer.  I'm sure this isn't the first time this has come up, so what are folks doing to accomplish this?

User Filter web part: how to show items with no value in it

I want to set up a document library View that shows the current user all items with their Department name in a column, as well as those items that don't yet have a Department name. I thought I could do this with the User Filter web part, but I am struggeling to show the items that don't yet have a department name. The problem I have is this: I created a view called "My department's items". I use the User Filter web part on it to show the user all items that have got the user's department name in a column. However, when a user forgets to fill out the department name after uploading a file, or even when they upload the file but then cancel filling out the compulsory fields, the uploaded file disappears from the "My department's items" view (because the department column is empty). How can I set up a filter to show all files that match the current user's department name as well as those that don't have a department name yet? Thanks.

web part to display recent changes on all items in site

Hi, Is there any web part like content Query to list all the changes made to the site say document uploaded, deleted, users added on the home page in SharePoint 2010 sites? If there is any third party web part also, please let me know.   Regards, Garima

problem with displaying items in list view web part

I have a list view webpart at default display form. Default Display form display items (for example) from the contracts documents library. List view webpart also associated with the same documents library (contracts). In such case this webpart doesn't display any item. But if I add another list view web part associated with warrants document library it display item without any problems. Is it possible to bind list view webpart to another data source for contracts document library? Or maybe another solution? Thanks!

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

Accessing Parameter Value from a Web Part Connection


I have two data views on a page and have created a web part connection to pass a value as a parameter from data view #1 to data view #2.  I have done this before with no problem, however in the past I've always used the parameter as part of a filter.  What I need to do in the current scenario is reference the parameter value as part of the redirect path in a form action button.  When I attempt to reference the parameter value, or even just display it anywhere in the data view, I get nothing; however if I display a query string parameter from the same data view it works fine.  Is there something different about using a web part connection parameter that I'm missing in order to reference it within the xsl stylesheet for the data view?

MOSS 2007, SPD 2007


Save as template kill the web part connection



I have a Sharepoint web site and I would like to save it as a template in order to create several site with the same structure and the same web pages.

On some of my web part pages I have some webpart connected to each other (mostly BDC List web part and BDC related list web part). When I save the site as a template and create a new site based on this template most of the connection are not present in the new site. Does anyone know what is the problem and how to solve it? I really need this to work as the site template will contains tens of pages with those connection and we will have to create tens of site with that template so manually recreating the connection is not possible.


Thank you for your help.

Custom List Form web part connection to data view


We have a sharpoint site to manage "projects".    That site includes a document library.  The documents uploaded to the library are categorised based on the project they belong to.

We are trying to implement a custom list form for editing a project record that does one of the following:

1. When the edit form is loaded for a particular projects record that edit form also shows a list of relevant documents.


2. Include a button or link on the edit form to another page that lists only the documents for the current project.

We thought this would be easy to do using web part connections.  If we click on the custom list form it gives us the option to setup a web part connection.  However, if you follow this wizard through and get to the stage of selecting columns to link, there are no columns listed for either the custom list form or for the target dataview.  This is the case whether the target data view is on the same page, ie in case of option 1 or on a different page as in case of option 2.

Could someone advise us how we could either get the web part connections between the custom list form and other dataviews to work or how we could hyperlink to a dataview and pass the id of the record currently being edited to that dataview as a filter?

We are using Sharepoint Designer so would appreciate any suggestions base

TCP Connection Error with Custom Control Web Part


Hello all,

We have a custom web part based on a user control that queries a database cluster. When the connection to the database is made, we regularly experience the error below and have had to create a work-around in the code to retry the connection.  We have 3 environments - development, staging and production; the error only occurs in production.  The difference in the production environment is it is a farm with 3 WFEs and a SQL cluster, where development and staging are single machine instances.  All are MOSS 2007 & SQL Server 2008.

We cannot find what is causing this issue and I'm hoping someone else has experienced a similar problem and knows the cause.

This is the error that occurs frequently when the query is executed:

System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParserStateObject.WriteSni()

at System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()

at System.Data.SqlClient.TdsParser

Web part to retrieve List Items based on configurable property


I want to create a web part that will do the following

1) Have a custom choice property based on teh Choice List Column in the list.

2) Return the records based on the custom choice selected by the user.


Is this possible?


WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

jQuery: Styling DropDownList Alternating Items (Rows)

In the following example, I will show how you can style any asp:dropdownlist very easily.

The example demonstrates how you can change alternating row items background color, using the fadeTo() to add a nice touch in the dropdownlist. You can change alt rows with a couple lines.

Hide a repeater in ASP.NET C# if the DataSource contains no items?

I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following:
In the (C#) code-behind I'm basically using LINQ to pull a listing of information from an XML document and bind that information to the first repeater.

Searching for the answer to this, it seems the method is to determine whether the data for the nested repeater is empty. If it is, then you set the visibility of the repeater to false.

Building Layered Web Applications with Microsoft ASP.NET 2.0 - Part 1

"Building Layered Web Applications" that shows you how to build N-Layer applications with Microsoft ASP.NET 2.0. These articles teach you how to design, build and use custom business objects in your web application. The target audience for this series are developers that are ready to make the switch from using SqlDataSource controls to ObjectDataSource controls with custom business objects. Experience with ASP.NET 2 and C# is necessary while some knowledge about object oriented design certainly helps. The design I am going to show you in these articles is a simplified version of a design you would use in a real world application. It doesn't feature all the necessary functionality your application needs, but instead focuses on the underlying concepts.

Hello World to C# Threading Part 1

In this post we will see how we can implement simple threading. Why do we need threading? When you want you application to do more then one thing at same time, then you need to implement threading. One usual and common scenario would be when your application needs to get data from some other resource like web services and you don't want you application GUI to be freeze during this time. In that sort of case you will run the code to access web services in separate thread so your application GUI won't freeze. The System.Threading namespace .NET provide interfaces to implement multi threading.

Multithreading in .NET Applications, Part 3

Multithreading is a powerful design tool for creating high-performance applications, especially those that require user interaction. Microsoft .NET has broken down the barriers that once existed in creating multithreaded applications. The last two installments of the .NET Nuts & Bolts column were
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