.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

Out-of-box filter stops working as soon as I "Configure Datasource"

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
I'm running VWD 2008 Express with ASP.NET 3.5 I realize now that 4 has much better filtering controls, but I didn't realize that when I started my project.  Anyway, when I use the standard List.aspx to display a table, the filtering works just fine (yes, it's only foreign keys and booleans, but it works).  I then modify the linq datasource so that the gridview only displays the columns that I want, and the filter function immediately stops working.  You can choose from the drop down lists, but nothing happens.  As an aside, I don't want to set scaffolding to false for those columns because I do want them to show up in the Edit.aspx page.  My understanding is that scaffolding settings would keep the field from showing up in either page. What do I need to include in either the gridview or the linqdatasource to get the filter working again?   Thanks!

View Complete Post

More Related Resource Links

Keyboard shortcuts stops working in WebMatrix


I'm often experiencing that keyboard shortcuts stops working in WebMatrix. This is very annoying as CTRL-S, CTRL-C, CTRL-V, etc. stops working, all of which are heavily used when programming. It's obviously hard to explain how to reproduce this, but I was wondering if someone knows a quick-fix?

Hi this method is working fine need filter how


private void GetData()
        for (int i = 0; i < Gridview1.Rows.Count; i++)
            DataView dv = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
            DataRowView drv = dv[i];

Image stretch inside a grid stops working horizontally once columns are added to grid.

I have a simple setup of a window. Window contains a grid, inside the grid there is an image. I want the image to always stretch across the entire cell. I've set it's Stretch property to Fill and it works fine, as long there is only one column in the parent grid. As the window is resized, the image stretches correctly. As soon as I add another column, the image stops stretching horizontally. Vertially it works just like before, horizontally it now appears with a fixed width corresponding to the width of the picture used as the source. Does not matter which column it's positioned in, and I've tried encapsulating it into another grid but behaviour does not change. It behaves the same in both Visual studio 2010 designer and at runtime. In addition when I tried to encapsulate it in a second grid, this seond grid also now has altered behavior - instead of sizing itself to it's container (both height and width are not set) as it's parent grid does, it now sizes itself to its contents - the image. But only horizontally. What is going wrong here, is this a bug or am I missing something, and any advice on how I can get the image to fill one of the cells of a grid with more then one column?

MS Filter pack for Zip files content search not working

I am facing a problem related to Zip files content search. Searching of content inside zip files doesn't return in search results. But searching for zip file name returns filename in search results. I look into Crawler log, all it says is:   Steps I followed to install MS Filter pack: Installed MS Filter Pack 1.0 (x64) http://support.microsoft.com/kb/946336/en-gb In Search Administration page added "zip" in File types Add Reg subkey under : "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension\" for ".zip" with value ={20E823C2-62F3-4638-96BD-90F4F6784EBC} Stop and Start oSearch Run full crawl of content sources Can you please advise or have any tips you got to resolve this. Thanks http://portal/testzip.zip Crawled (The filtering process could not load the item. This is possibly caused by an unrecognized item format or item corruption. )

After async postback, hide/show panel stops working

I have a Gridview in an UpdatePanel with a column containing an "expander" button that shows (and hides) more detail beneath its row of data.  It all works great until the user pages the gridview.  After the async postback to page the gridview, the javascript function to toggle hide/show appears to work flawlessly (the expander's button image even changes correctly), but the detail panel just doesn't show on the page.Note that my expander control supports a "AsyncTriggerId" property that, if set in the markup, will rebind the javascript toggle function when that control triggers an async postback (see OnPreRender below)Here's the hide/show toggle javascript:function toggleExpander(divId, imgId) { var div = document.getElementById(divId); var img = document.getElementById(imgId); var cssClass = div.getAttribute("className"); if (div.style.display == "" || div.style.display == "none" || cssClass == "hidden") { div.style.display = "inline"; div.setAttribute("className", ""); img.src = "images/dir_down.png"; mce_src = "images/dir_down.png"; img.alt = "Collapse to hide details"; } else { div.style.display = "none"; img.src = "images/dir_rig

SQLMetal stops working (relations in SQL Compact)

Hi!   I was trying to create a dbml file using SQLMetal, but it fails: the database is a SQL Compact 3.5 file, that contains several relations between it's tables. SQLMetal stops working without any error message. I have tried: SQLMetal.exe, SQLMetal Builder and SQLMetal OSUI. All fails on this db file, but runs fine on other .sdf files! When i remove the relations it creates the dbml file in a sec., without any problem!   Is it a bug, or it is not possible at all? If it is not possible, how should i solve this?   Thanks in advance!

Full text search not working for pre-existing data on table after installing docx filter.However wor


Hello All,


I have a strange issue. I have pre-existing data in my table with full text index defined along with catalog. I noticed that I did not have the docx filter ,so I installed the filter and performed the steps below. After installing the filter  I added a couple of new records. I noticed that the full text search pulled up the new records matching the criteria but did not return any pre-existing records. Could you please let me know the issue.Please note – currently I am using sql 2008 , but also would like to verify the same in sql 2005 as well.

Also could you please verify the steps below for installation in sql 2008 and sql 2005 and with different architectures (Eg windows 2003/2008, 32bit, 64 bit etc)


This was tested on VM image on 64 bit architecture Windows 200

Filter on web part not working for certain columns


Hi all,

I have a list of "Faults" - this contains the Shop Number that the fault was logged against (which is a lookup column to the "Shops" list), who logged the fault ("Created By") and the details of the fault ("Title").

If I add the list as a web part and filter by Created By, it works perfectly - I get multiple entries in the list for all faults logged by a certain person.

However, if I filter by a Shop Number - I only get a handful of entries in the list, going back a few days - anything older than that is simply not there.

Yet if I go to the main page for the Faults List (AllItems.aspx) and change to Datasheet view - the filter works perfectly, I can see EVERY entry for a particular Shop when filtering on Shop Number.

Any ideas? It only seems to happen when using a Web part OR a DFWP - as a result, I can't pass the Shop Number as a filter parameter to it, nor can the users see a complete history of faults when viewing individual shops.

I've no idea what has changed recently, other than deletng some custom views we had created in the Faults list - could this have caused a problem? Can the Faults list be "reset" somehow without losing any data? To clarify - it's ONLY happenning when the list is viewed as a web part of DFWP, when it's viewed in Datasheet m

Radiobuttonlist triggers updatepanel only a few times adn stops working


I have a radiobutton that triggers the updatepanel to display or not..

when the page loads, i can select yes adn it displays, i can select no and it disappears.. i hit yes it reappears.. but after like the 3rd time going back and fourth testing the functionality, it stops displaying all together.

Is there something i need to look at to find out what is going on?

Here is my code on the page and code behind

            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
            <div id="camDL" runat="server" visible="false">
                  CONTENT GOES HERE
                    <asp:AsyncPostBackTrigger ControlID="rblEnableCamDL" EventName="SelectedIndexChanged" />

        protected void rblEnableCamDL_SelectedIndexChanged(object sender, EventArgs e)
            if (rblEnableCamDL.SelectedValue == "1")
                camDL.Visible = true;
            if (rblEnableCamDL.SelectedValue == &qu

Sharepoint site randomly stops working


Hi.  We have a SPS 3.0 site running on Server 08 R2 which in turn runs on an ESX 4.0 host.  We have a mix of remote and local users and this issue only seems to apply to local users (Ones directly connected to our internal network).

What happens is randomly, they try to go to our Sharepoint site and they get a Website cannot be found error in IE.  If they leave it for a half hour or so it just starts working again.  It is a strange and annoying problem that we have been unable to solve so far.  There is nothing in the main event logs (ie. App, System, etc).  We get users to let us know as close to the minute as possible when the site stops working and we cannot locate anything at those times.

The Operating systems range from XP SP3 to Windows 7.  It also occurrs when using IE8 as well as several newer versions of Firefox.

We are still able to ping the internal IP of the site when this issue is occuring, but are not able to contact it via HTTPS.

Can anyone help us by giving us somewhere to start in troubleshooting this issue further?


Filter expression not working


Hi, I am using a GridView and I require the user to be able to filter using 2 controls. One simply filters the type of row - there is a column called action, and the user selects one of the distinct values from the database in a dropdown box, and the gridview only displays the rows with that value in the action column. On it's own this works perfect.

But I am also adding a textbox where the user can type in an ID of either the 'itemID', or the 'parentID'. This works fine even with the previous control.

Problem is, the dropdown box does not work when the textbox is empty (i.e. all ID's are being shown). If I choose a value and click Submit, it just doesn't do anything. Now if I am filtering by ID and then choose a value from the dropdown box, it works perfect.

Here is my filter expression and parameters of the datasource:


 <asp:SqlDataSource ID="SqlDataSource1" runat="server"  
        ConnectionString="cleared for privacy" 
        SelectCommand="SELECT * FROM [Audit] WHERE ([source] = @source)" FilterExpression="action like '{0}%' and (itemID like '{1}' or parentID like '{1}')"> 
            <asp:Parameter DefaultValue="LOGISTICS" Name="source&quo

Explorer View within Sharepoint 2007/IE7 stops working when activating an Office 2010 install.


Has anyone else experience this issue:

Office 2010 is installed on a machine with IE7 running on it.

Explorer view within Sharepoint 2007 and IE7 works fine

Office 2010 requires a product key change from a temporary key from the initial install to a permenant key.

The permenant key is installed and suddenly Explorer view within Shrepoint stops working?

Ajax enabled WCF Service stops working with Undefined error


 I have an Ajax Enabled WCF service that I call from Javascript.  It works fine, but often after I make unrelated changes to the website it will fail and Javascript will report an 'Undefined' error.  I can easily fix it by deleting the service, removing the system.serviceModel section of the Web.config and then recreating the service.  I don't have to change any of the references in the .aspx or .js files.  Also, the replacement service has identical code in the .config, .cs and .svc files (I don't see any differences).  This morning, I only made some cosmetic changes and the service stopped working again. 

Any insight into what I am doing wrong?

mdx - filter "not working" when i use equals zero


I'm filtering customers, depending on some other dimension and measure. If I use > , <, = with any number different than 0, it works fine. < and > works even with 0, but = "doesn't work"

this is my query>



dynamic set Segment0 as





Visual Studio - Debugging Stops Working


We keep having problems with the Visual Studio debugger (2005 and 2010).

It just stops hitting breakpoints and the only way to fix the problem is to close every open VS instance.

After all instances are closed, we can open a project in Visual Studio and the debugging breakpoints work again.

Any comments would be appreciated. 

The filter attribute not working



Sql DD 3.5 scaffold  - website(not project)

Why its not working when I call the filter like this?

public partial class OrderDetail { }
public class OrderDetailsMetaData
    [Filter(FilterControl = "FilterFKCustom")]
    public object Order { get; set; }

The filter is working only if I register the control on the page..

(The filter located on a folder name Filters under the DynamicData and not register in the web.config under controls><add..)


openrowset Microsoft.ACE.OLEDB.12.0 stops working after some days



I'm using Microsoft.ACE.OLEDB.12.0, in SQL Server 2005, to read and write, using openrowset, data from/to access files.

Everything works fine for some time but then just stop works. After this, i can't do nothing with openrowset. If i make a select * from openrowset the server doesn't stop executing.

My Microsoft.ACE.OLEDB.12.0 configurations are:



exec sp_configure 'show advanced options', 1



exec sp_configure 'Ad Hoc Distributed Queries', 1



EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1


EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1


EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0'
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