.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

Filtering the dataview....Problem at filtering subview

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


I have two lists that i connected through Dataview. One is Client Data and other is Add Site List by Account.

Client Data has a field called Clause and Add Site List by Account has a field called Country.

I am trying to filter the data view with these two fields.

So when i try to filter using Clause its working fine but when i filter it by country it isnt working.

So my approcah of filtering is:

Created Dataview..joined subview. Created 2 parameters on it..Code view adding these lines:

<xsl:variable name="smallcase1" select="'abcdefghijklmnopqrstuvwxyz'" />

<xsl:variable name="uppercase1" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

<xsl:variable name="smallcase2" select="'abcdefghijklmnopqrstuvwxyz'" />

<xsl:variable name="uppercase2" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />

   <xsl:variable name="searchcaps1" select="translate($SearchTerm1, $smallcase1, $uppercase1)" /> 
  <xsl:variable name="searchcaps2" select="translate($SearchTerm2, $smallcase2, $uppercase2)" />

 <xsl:variable name="Rows" select="/dsQueryResponse/Client_Data/Rows/Row[contains(translate(@Cl

View Complete Post

More Related Resource Links

Problem trying row filtering - Need Filter Template for string columns


I'm still really new at DD.

I need to do straightforward filtering of tables on columns that are simple string/text/varchar type.

I'm trying to follow the direction given in http://blogs.msdn.com/b/morebits/archive/2009/04/14/customize-table-rows-filtering-in-dynamic-data.aspx 

 I have added the DynamicFilter in my markup like this:

<asp:DynamicFilter ID="SellerFilterID" DataField="SellerUserId" runat="server" OnFilterChanged="DynamicFilter_FilterChanged" />

I have added the QueryExtender and Dynamic Filter expression like this:

            <asp:QueryExtender ID="CustomerCustomQueryExtenderID" TargetControlID="GridDataSource" runat="server">
                <asp:DynamicFilterExpression  ControlID="SellerFilterID" />
I get the error that I expected because the blog warned that "It will throw a 

CollectionViewSource - problem filtering an ItemSource


I am trying to filter out duplicate items from a combo box. The items themselves are not duplicates, but I use a string value called "Name" to populate the combo box, and I only want one instance of that "Name" to show up.

Attached is a somewhat contrived example, but it shows the essence of what my problem is. I have a CollectionViewSource event handler called CollectionViewSource_Filter where I thought that I could get hold of the ItemsSource or CollectionViewSource and detect whether or not I have that string value already in the combo Box. If you compile and run the code, you see that all the items from the DataContext appear and duplicates are are not filtered out.

<Window x:Class="TestCombo.Window1"
  Title="Window1" Height="300" Width="300">
  <StackPanel Orientation="Horizontal">

XSLT Filtering of a dataview


Ok, I'm fairly new to the XSLT Filtering option for dataviews, but I've got a fairly complex condition I need to implement.  Basically I have two parameters, "SearchText" and "Status", what I need it to do is see if the search text is contained within any one of 4 text fields, and then I want it to check the status.  Basically logically looking for this.  If anyone can help me out, or even point me at some tutorials that would be great.  Thanks

(Contains(@SearchText,Field1) OR Contains(@SearchText,Field2) OR Contains(@SearchText,Field3) OR Contains(@SearchText,Field4)) AND (Status = @Status)

GridView Filtering In ASP.NET

In this tutorial you will learn how to add a filter to a Grid View Control, To modify the query with a parameterized filter, the WHERE Clause, Parameter properties, Parameter Value Editor and To test filtering.

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

HTTP Pipelines: Securely Implement Request Processing, Filtering, and Content Redirection with HTTP


ASP.NET is a flexible and extensible framework for server-side HTTP programming. While most people think of ASP.NET in terms of pages served, there is a lower-level infrastructure sitting beneath this page model. The underlying plumbing is based on a pipeline of app, module, and handler objects. Understanding how this pipeline works is key if you want to get the most out of ASP.NET as an HTTP server platform, while making your process more efficient, and keeping your server secure. This article introduces the architecture of the pipeline and shows how you can use it to add sophisticated functionality to an ASP.NET-based app.

Tim Ewald and Keith Brown

MSDN Magazine September 2002

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

Filtering a grid column when the column is bound to a collection


My SetUp (I am using EF for my data):

1 Grid bound to a collection of Vehicle Objects

1 Combobox with multiselect enabled bound to a list of VehicleExtras.

Each vehicle has a collection of extras. 

My Problem:

What I need to do is have the Grid filter Vehicles based on whether those vehicles have the selected VehicleExtras from the Combobox

Can anyone point me in the right direction as to how this filtering should be done (if it is at all possible!)



Custom Filtering



I write a custom StringFilter to use as filter control for string properties, I use bellow code to "GetQueryable" method :

    public override IQueryable GetQueryable(IQueryable source)
        string selectedValue = TextBox1.Text;
        if (String.IsNullOrEmpty(selectedValue))
            return source;

        object value = selectedValue;
        if (DefaultValues != null)
            DefaultValues[Column.Name] = value;

        return ApplyEqualityFilter(source, Column.Name, value);
the disatvantage of this method is user must enter whoul string to find...
can any body help me to change this method to work such as sql "Like" method instead of equality ?


Filtering/selecting rows based on date


I have a gridview, based on thsi datasource:


<asp:SqlDataSource ID="SqlDataSourceAllLoads" runat="server" 
        ConnectionString="<%$ ConnectionStrings:tplatz_dk_dbConnectionString %>"               
        SelectCommand="SELECT DISTINCT DATEADD(day, 0, DATEDIFF(day, 0, tblDelivered.delivered_Date)) AS delivered_Date, tblDelivered.delivered_LoadNo, tblDelivered.delivered_TrailerNo, ISNULL(tblDeliveredInfo.deliveryInfo_FirmaNavn, N'?') AS Expr1 FROM tblDelivered FULL OUTER JOIN tblDeliveredInfo ON tblDelivered.delivered_LoadNo = tblDeliveredInfo.deliveryInfo_LoadNr ORDER BY delivered_Date DESC">

Using a dropdownlist, I can filter (by changing datasource) the results based on customer names in a dropdownlist. This datasource, working perfectly, looks like this:


<asp:SqlDataSource ID="sqldataSourceKundeLoads" runat="server" 
        ConnectionString="<%$ ConnectionStrings:tplatz_dk_dbConnectionString %>" 
        SelectCommand="SELECT  DATEADD(day, 0, DATEDIFF(day, 0, tblDelivered.delivered_Date)) AS delivered_Date, tblDelivered.delivered_LoadNo, tblDelivered.delivered_TrailerNo, ISNULL(tblDeliveredInfo.deliveryInfo_FirmaNavn, N'?&#

does SPD support filtering of the mail title/body we send to a list/library?

for example, if we send a mail with the title of "%hostname% %ipaddress%" to a list. can SPD WF filter the title and get %hostname% to a new variable? the reason to ask this is i want to send a well-formated mail to sharepoint and the automatical WF can recognize the change of the list items and update the relevant columns by the filtered content from mail title or body. thanks!

Sharepoint filtering

Hey,  So i will start by describing what i have .. i have a data view  in a table and i want to filter the data i want that were last modified on a specific date. for example i specify from dropdown list that i want the date : 21\08\2010 . and the data view will filter to me the data which has been modified in that date. i hope u can help me  thanks a lot for ur time best regards,

gridview filtering using a codebehind (textbox + search button)

i am trying to replicate the following sequence: input text into text box > press search button > search a database using LIKE operator > display using a gridview or listview. this sequence is fairly easy to do using the drag and drop then sqldatasource options, but i am trying to do the same result using a codebehind.  here is my code:   ____________________________________________________________________________________________________________ SqlConnection myConn; myConn = new SqlConnection(@"Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\projectDB.mdf; Integrated Security=True;User Instance=True"); myConn.Open(); string strSQL; strSQL = "SELECT * FROM Message";       //strSQL = "SELECT * FROM Message WHERE Message LIKE '" + txtSearch.Text + "'"; SqlDataAdapter da = new SqlDataAdapter(strSQL, myConn); DataSet ds = new DataSet(); da.Fill(ds, "Message"); GridView1.DataSource = ds; GridView1.DataBind(); myConn.Close(); _____________________________________________________________________________________________________________  now, if I use this code inside a page_load event, it does work. if I put it inside a button_click event i get nothing. i am mystified by this.. any help? why can't i use a button to display my gridview1 when i'm using a code behind.  

Filtering GridView?

I have a web page with a GridView control populated from a database.  I want to have a form that users can use to filter the results presented in the GridView.  For example, it might have fields for last name, first name, department, wages, date of hire, etc. that the user can fill out to filter the results.  Is there an elegant way of doing this?  The only thing that comes to mind is to test the value of each field and then have a database query string for every outcome.  For example, if the user only inputs a last name, the query might be SELECT * FROM EMPLOYEE ... WHERE LastName = @LastName.  If they input both last name and department, the query would be SELECT * FROM EMPLOYEE ... WHERE LastName = @LastName AND Department = @Department.  This seems like it would get unwieldy very quickly.  Any suggestions on a better method? 

Multiple selection filtering

I have a document library and I am unable to do multiple selections filtering for a column. Is it possible to enable this?

ASP.NET Dynamic Data Filtering not working

 Hello. I am trying to use this DLL to make searches on dynamic data pageshttp://www.codeplex.com/DynamicDataFilteringI pasted the following code, but nothing happens    <cc1:DynamicFilterForm ID="DynamicFilterForm1" DataSourceID="GridDataSource" runat="server">             <FilterTemplate>                                             <table>                <tr>                    <td>                        Nombre activo</td>                    <td>                          <cc1:DynamicFilterControl ID="DynamicFilterControl3
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