Last post Mar 03, 2010 07:10 AM by sbakshi
Mar 02, 2010 05:06 AM|sbakshi|LINK
I am new to dynamic data site. I struck with a requirement. I want to do something like following query:
select * from Products Where CategoryId in (1,2,3);
Where 1,2,3 are the categories we select from Filter repeater Category column.
For doing this I update the code to change dropdownlist to ListBox, and changes in "SelectedValue" property. But I am not able to get the required result, as LinqDataSource <WhereParameters> is not able to qeuery in above specified way.
Any sort of help is appriciated.
Mar 02, 2010 07:35 AM|Kevin Alkema|LINK
Sitanshu, Are you using vs2008 or 2010 RC? If you're using 2010 RC you should look into using the new QueryExtender like:
<asp:QueryExtender ID="qe1" runat="server" TargetControlID="EntityDataSource1">
<asp:SearchExpression DataFields="field1,field2,etc" SearchType="Contains" />
If you're sing 2008 you could use the the whereparamters like at this post
Mar 02, 2010 07:54 AM|sbakshi|LINK
Thanks for the reply, but I am using VS2008.
Mar 02, 2010 09:09 AM|sjnaughton|LINK
Hi Sbakshi, if you are using Linq to SQL you could use JHosh Heyes's Dynamic Data Filtering on Codeplex
Mar 02, 2010 11:21 AM|sbakshi|LINK
Thanks for the reply, it will work for me.
Mar 03, 2010 04:59 AM|sbakshi|LINK
I got what I want, but when I implement it, I didn't get the actual result. I am not getting anything in the filter area when I implement dynamic data filter.
Please help in this regards. I do not have search.aspx and current.aspx pages, do I need to create them?
Mar 03, 2010 05:41 AM|sjnaughton|LINK
Hi Sbakshi, see Dynamic Data Filtering – Installation where I document adding DD filtering to your site.
Mar 03, 2010 07:10 AM|sbakshi|LINK
Thanks a ton Sjnaughton.