tag:blogger.com,1999:blog-6907873803403737979.post7844105416825034065..comments2023-10-16T12:48:46.251+01:00Comments on C# Bits: Cascading Filters – for Dynamic Data v1.0 (UPDATED)Stephen J. Naughtonhttp://www.blogger.com/profile/17435527974910745156noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-6907873803403737979.post-21738593497174086362009-10-29T09:56:43.543+00:002009-10-29T09:56:43.543+00:00Hi Wes, yes Expression are hard :( but the old Fut...Hi Wes, yes Expression are hard :( but the old Futures project still on codeplex has some good examples, ;-) that's where most of my code comes from :D<br /><br />SteveStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-66742386037308863332009-10-29T00:46:06.297+00:002009-10-29T00:46:06.297+00:00Thanks!! Your sample was a big help.
I haven'...Thanks!! Your sample was a big help.<br /><br />I haven't actually tried to implement the cascading filters yet but I had it bookmarked to try later when I ran into a situation where I needed an Expression to return a row. I'm having a difficult time understanding Expressions but your GetSelectedParent function does exactly what I needed. <br /><br />Now I just need to find a plausable place to insert cascading filters into the project :-)Wesnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-31197459215181942152009-04-15T11:29:00.000+01:002009-04-15T11:29:00.000+01:00Yes you are correct this has been updated by this ...Yes you are correct this has been updated by this article (as this version was not EF compatible) http://csharpbits.notaclue.net/2009/04/cascading-filters-and-fields-dynamic.html the new uses feature I found in the Preview 3 filter template ForeignKey.aspx.cs<br /><br />Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-20167318189837612582009-04-15T09:24:00.000+01:002009-04-15T09:24:00.000+01:00Hi Steve
I have a question in relation to your "G...Hi Steve<br /><br />I have a question in relation to your "GetQueryFilteredByParent" function. Correct me if I'm wrong, but as far as I understand it, it doesn't work for entity data modell where I would like to use the navigation properties to get a result?!<br /><br />A short example (1:n relation)<br /><br />table Customers<br />---------------<br />CustomerID (uniqueIdentifier)<br />Name (text)<br />Area (navigation property)<br /><br />table Areas<br />-----------<br />AreaID (uniqueIdentifier)<br />Name (text)<br />Customers (navigation property)<br /><br />What I would like to do now, is to show only customers that belong to a certain area using your cascading filter<br /><br />The problem is now, that something like:<br /><br />var customers = (From c In ctx.Customers Where c.Area == SelectedArea Select c);<br /><br />won't work. What should work is something like:<br /><br />var customers = (From c In ctx.Customers Where c.Area.AreaID == SelectedArea.AreaID Select c);<br /><br />But for this situtation I'm unable to build a proper "GetQueryFilteredByParent" function.<br /><br />It would be really fantastic, if you could help me out. I'm loosing my hair...<br /><br />Thank you very muchAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-74019432581116256582009-04-11T12:28:00.000+01:002009-04-11T12:28:00.000+01:00Hi Азамат, I've fixed all the downloads now :DReme...Hi Азамат, I've fixed all the downloads now :D<BR/><BR/>Remember you can message me no via Digby on my blog when I'm online, just ping me <BR/><BR/>Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-26460271688849945712009-04-11T12:06:00.000+01:002009-04-11T12:06:00.000+01:00This bug was due to keeping the DDL's empty until ...This bug was due to keeping the DDL's empty until the partent was populated :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-2352019340566603632009-04-11T12:04:00.000+01:002009-04-11T12:04:00.000+01:00Hi Азамат, you will need to add this to the line...Hi Азамат, you will need to add this to the line in the Page_Init where it tests the InitialValue the DropDownList1.Items.Count > 1 <BR/><BR/>I'm going to update the downloads now <BR/><BR/>Thanks for your vigilance :D<BR/><BR/>SteveStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-80330573597453470292009-04-11T11:41:00.000+01:002009-04-11T11:41:00.000+01:00Hi Азамат, you are right I will look into this but...Hi Азамат, you are right I will look into this but I will deal with it in the latest version.<BR/><BR/>http://csharpbits.notaclue.net/2009/04/cascading-filters-and-fields-dynamic.html as this is EF compatible<BR/><BR/>And I will post updates there :D<BR/><BR/>Steve :DStephen J. Naughtonhttps://www.blogger.com/profile/17435527974910745156noreply@blogger.comtag:blogger.com,1999:blog-6907873803403737979.post-18806123143130740972009-04-11T11:10:00.000+01:002009-04-11T11:10:00.000+01:00Hi, There are very useful articles about cascading...Hi, <BR/><BR/>There are very useful articles about cascading filters, great work.<BR/><BR/>But there are some issues with navigating from one entity page to another with filters. For example, from Developers page to RequieredPlots.<BR/>There is exception<BR/><BR/>DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.<BR/>Parameter name: value<BR/><BR/>[ArgumentOutOfRangeException: 'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items.<BR/>Parameter name: value]<BR/> System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource) +2713781<BR/> System.Web.UI.WebControls.ListControl.PerformSelect() +49<BR/> System.Web.UI.Control.DataBindChildren() +11024287<BR/> System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182<BR/> System.Web.UI.Control.DataBindChildren() +11024287<BR/> System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182<BR/> System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +674<BR/> System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +68<BR/> System.Web.DynamicData.FilterRepeater.DataBind() +31<BR/> System.Web.DynamicData.FilterRepeater.Page_InitComplete(Object sender, EventArgs e) +47<BR/> System.EventHandler.Invoke(Object sender, EventArgs e) +0<BR/> System.Web.UI.Page.OnInitComplete(EventArgs e) +11035598<BR/> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1674<BR/><BR/>Have you thought about this issues?Азаматhttps://www.blogger.com/profile/12220913133453082708noreply@blogger.com