.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

Custom List View - filter blank value

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :SharePoint


I am creating a custom list view in SPD2010 and am having some problems. I want to have 3 filters (language, country and quarter). I have set these up as ASP drop down lists that auto postback and then I have defined the paramaters and linked them into the list filter.




This works fine and all 3 drop downs filter the list. The only problem I am having is if I want to search just on one column. The way I have it set up in the filter is

Country EQUALS [Country] AND
Language EQUALS [Language] AND
Quarter EQUALS [Quarter]

If I want to show all entries from Germany and not filter on Language and Quarter how do I do this? I have tried adding a "Please Select.." entry at the top of the list and setting the value to nothing but it does not work. I have had to create 3 seperate views but I would love to get these 3 filters working at the same time.

Is there a value in SP that I can use to filter on blank values or not consider the column at all? I have tried using nothing in the value and also tried NULL but neither have worked.

I have been trying to solve this for some time with no luck :( If anyone has any

View Complete Post

More Related Resource Links

custom field type works in view properties, but not in list view: 3 parent fields filter child list,


My situation:

A) odd thing is that no matter where I put a stop point in my custom field type, it is NEVER hit when the items are displayed in list view.  Event with <Field Name="CAMLRendering">TRUE</Field> which causes the list to error out, but again no stop point to help me know why.

B) the value of the column in question will be different for every user who views the list, I'm querying a secondary list based on the user's loginName, and two of the fields from the list we're in. 

C) the display is customized based on whether any records were returned and the current DateTime, so possible displays would be "", "! 12/1/2010", and "7/7/2011"

D) and the text displayed links over to a form for them to do their assignment. the link url would be a config setting url + "?[one of the fields form the list we're in]"

My questions:

1) Is it possible for fieldtype code to execute while a list view is being rendered?

2) If not, then should I chase down the path of a content query webpart?  Will it be able to filter on the current users login name?

3) If not on 1 or 2, can you think of any other way to do this beyond creating a custom application page? (need to having filtering and sorting on this page)

How to filter a List View by multiple values for one filter field?

Hi, I need to create a dynamically created link to a List View with a filter on one field, but with multiple values. Example: http://<server>/Lists/<list>/Allitems.aspx?FilterField1=Name&FilterValue1=John/Jack/Jonas which should give me all items where Name equals John, Jack or Jonas. Is this even possible?

list view connection filter doesn't work

  I have  a custom display form for documents library with two connected List View WebPart. I am trying to filter documents at the second list view with the value from the first one. Both list views contain data from the same documents library. I have configured the connection, but second list doesn’t display any item, and it doesn’t matter which field I use for filtering. Also  for another document s library’s custom  display form  it work perfect.But there second list view contain data from another documents library. Not the same as at first   case. Any ideas with my issue?

Viewselector is not working in a custom ASPX list view nor does the custom view display in the list


I created a custom ASPX page to display data from a linked datasource in SharePoint designer. (Let's call it NewView)   After creating the new page I inserted a web part zone then inserted a data view into the zone and attached the default master to the page.   From the linked data source, I added the columns I wanted to display in the data view and added additional columns from the 2nd linked list as a subview.

I copied the following code just after the </WebPartPages:SPProxyWebPartManager> tag and just before the <WebPartPages:WebPartZone tag:

  <table class="ms-menutoolbar" cellpadding="2" cellspacing="0" border="0" width="100%">
    <td class="ms-toolbar" nowrap="">
     <SharePoint:NewMenu runat="server"></SharePoint:NewMenu>
    <td class="ms-toolbar">|</td>
    <td class="ms-toolbar" nowrap="">
     <SharePoint:ActionsMenu runat="server"></SharePoint:ActionsMenu>

KPI List custom view



Am try to create a KPI list view where in i like to add few of my custom columns.MOSS 2007 is not allowing me to do the same.

when ever i create the KPI list view i get 4 standard columns.

Can any one please help me on this?


Creating a Custom View for a Custom List


I have been thrown in head first to MOSS 2007 and am trying to learn it as fast as possible. Here is what I got:

A custom list that is populated from an external database by a timer job every minute. There is also another job that clears items in that list that are over an hour old.

What I want to do is, create a view/web part that essentially shows a gridview with certain columns from the list. Also need a column that is calculated on the fly, and is not in the list (basically create a hyperlink to another site based on a column in the list).

I also need 2 buttons or something next to each row that will allow me to manipulate that row. And I need that list to autorefresh every few seconds to reflect changes in the list.

What would be the best method to do that?

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

Dynamic Data Foreign Key Filter - how to limit the # of dropdowns on the list view



I have a visual basic website in VS 2010 framework 4, linx to SQL, with scafolding.... and this dataclass has about 10 foreign key fields, of which all 10 are shown in the list view of the website.  I want the ability to exclude those filters from the list view (or exclude some and keep some), but without eliminating them from the edit forms.  Using <scafoldingcolumn("False")> does the trick to remove them entirely but that will also remove them from the grid/list itself, which I don't want, and remove the column from the edit record views, which I don't want either.

Any help would be great!!!!

Cannot filter a KPI list view



I'm just starting work with KPI in MOSS 2007 recently. Hopefully, I'm on the right forum. Please let me know if otherwise.

So, I've created a new KPI list. Inside that KPI list, I've created several indicators using data from another custom list on the same site. All of these indicators are using "All items" view from that custom list. Next, I've added another indicator from that same custom list but using a different view.

The indicators are working fine. I'm trying to create new view on that KPI list to show me the indicators that I'm interested in. I'm able to create new view based on the default "KPI List" view, but the filter doesn't seem to work. No matter which field or value I specify, the new view always shows all the indicators.

Is that the expected behaviour? I've tried to search online, but didn't see anything that can be of help. I need to create filtered view of the KPI list, because I'm showing these indicators on a web part page as part of a dashboard. For that, I'm using the web part for "Key Performance Indicator" but I don't need to show every single indicators. Only certain indicators will suffice.

One workaround I can think of is to create a separate KPI list and separate my indicators into different lists, but that sounds like an odd workaround/over the top!!!


SharePoint 2007 - How to associate a Custom List View with a Custom Edit Form. Edit link always re


Can someone give me a clue of how to connect a specific Custom List View with a custom Edit Form.

I have created a custom list, and I have created a custom view attached to that list.   I also have a custom CustomEditForm.aspx form created using SharePoint Designer.

I want to associate the Custom Edit form directly with one and one view only for a given list so that when the user clicks the edit icon in that view, they are linked to the custom Edit Form.  But all other views including the All Items view behave as normal, i.e. using the normal EditForm.aspx.

I can replace the EditForm.aspx in the Url with my custom form and it works fine, but I can't seem to figure out how to connect the custom view edit link to the custom form.  It always takes me back to the default EditForm.aspx page.

I have investigated the href="{$URL_Edit}?ID={@ID}" onclick="GoToPage('{$URL_Edit}?ID={@ID}') in code, which appears to  be how the URL is generated but I'm not sure how or where best to set the value of URL_Edit parameter so that I point to the custom Edit Form.  This is somehow getting passed into the custom view, but I'm not sure how best to set it for a specific non-AllItems view.

Does anyone

Custom Control Design view error



I have created a custom control from scratch and it works fine as in you can build the project that uses it and it works fine at runtime. Problem is when you go to design view the control shows an error in the place of where the control should be rendered.

Error: '<SomeValue>' Could not be set to '<SomeProperty>'

This shows up on all my custom set properties. These properties are created as basic as possible. I can give the properties values in Source view and run the app just fine. I can even add a Onclick event. If I don't set any custom properties the control will render fine in Design view. It's only when I set a value to a custom property.

Property Code Example:

public string Text
                string ret = "";
                object obj = ViewState["Text"];
                if (obj != null)
                    ret = obj.ToString();
                return ret;
                ViewState["Text"] = value;

I've even removed the Category and Description tags with no difference.

I don't know if what I said makes sens, but I hope it

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

Custom Grid View Header - Grid view Row Created event vs Gridview row databound events ?


Hi Gurus ,

It happened to add an extra Gridveiw Header in row_databound event , It did worked fine on !Postback but disappered on Page.Postback . Quick google search guided me to move the event to Row_Created event and every thing is okay .

Can any expert post some pointers , differnces between grid row_created vs row_databount with some sample table data created dynamically  behaviour of both the events in !Postback and page.Postback .

Thanks a tonne in Advance and  any inputs will be valued and appreciated .

Custom tree view for navigating wiki pages

I'm creating an information resource on our intranet (WSS 3.0) using the wiki style format.  The only trick is, unlike a standard wiki, where all pages are directly under the parent, I want to be able to create a customizable tree view where some pages are nested underneath each other.  For example, this particular site talks about all of our different IT systems.  I'll have a wiki page for each system, then underneath each of those pages, there will be more pages for things like training, documentation, etc.  Even though all those pages are at the same level, I need to be able to nest them in a navigational tree view on the quick launch bar.  I suppose if there were also a way to nest the wiki pages themselves, I could just use the pre-packaged tree view.  Anyone have any ideas?

How to add custom list entries to mysite's calendar in Sharepoint 2007 site?


I would like to know below things

(1) How to create MySite for one specific member with other or administrator's access?

(2) Scenario : Administrator have created one SP2007 site. now Administrator have created one calendar (Sample calendar). Administrator have added some entries in calendar. now one user entered in portal site ansd view the calendar and he click on MySite menu. so this sample calendar entries should enter in that user's mysite calendar. How this can be achieved?

Thanks in advance.
Regards, Praful Udade

Issue in Infopath 2007 browser form - cascading dropdown using owssvr.dll filter view


Referring the below link, I created a cascading dropdown. The parent dropdown has sharepoint list as datasource and the child dropdown has xml datasource that points to owssvr.dll filter view. The cascading drop down works fine in preview but throws error after publishing as admin approved form - "form cannot run the specified query" exception when trying to execute xml datasource i.e., when a value is selected in parent dropdown. The security is 'Full Trust". In the event viewer the error message states "401 unauthorised" for the user a/c. the xml data source is an approved udcx file and in central admin, have enabled cross domain for infopath service. I have tried different solution provided in tech forums but issue still exists. Not sure whether Im missing something. Can someone guide me in fixing this issue?

Link Reffered:



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