Login Register
Sunday, February 05, 2012
You are here : Forum
 
Forums Minimize
 
ForumForumForumForumIndoo Grid DNN ...Indoo Grid DNN ...Filter and joined tableFilter and joined table
Previous Previous
 
Next Next
New Post
 7/25/2010 12:11 AM
 

Hi all,

I've run into some unexpected behaviour. I have a grid with a foreignkey i display in the gridVIEW through "Join another table data on this column". This works as it displays the related name instead of the key which is in the table that feeds the grid. However; i tried applying a filter (types 1,2,4) on this field but the grid refuses to look at the name (from the joined table) for filtering. It keeps filtering on the foreign key column. I also tried putting the name in the "Filter additional column list" like this: joinedtablename.name but that doesn't help either.

If i use the dropdown as filter (option 5) the querystring (depending on how you set the use column from maintable i recall) shows the filter you applied as the actual value from the joined table and this works. Trouble here is that i want to be able to filter on part of the name...

Example:

table 1: productid (primary key), storeid (foreign key), productname

Table2: Storeid (primary key), storename

indoo grid set off table 1 with a join to table 2 in the gridview for the storeid column. It neatly displays the storename in the gridview but i can;t get it to filter on this name

How can i get indoo to filter on the value behind the foreign key?

Alexander

New Post
 7/25/2010 12:48 AM
 

I do that all the time and never see that behavior. Do you have that foreignkey in the gridView more than once where it is not joined?

New Post
 7/27/2010 12:00 AM
 

Nope, just this one field. I must admit the grid is based on a view and the join is to another view, but i give in the correct join and value field. Should work.

New Post
 7/27/2010 12:02 AM
 
 Modified By admlange  on 7/26/2010 11:05:18 PM

could of course be a problem with the value field, which is defined by the view and, in sql server mgt studio, gives a value of nvarchar(303), which is of course a bit strange. I'll try casting it to an nvarchar(500) which should be the max... Plus the query (if shown) says it tries to do the vw_purchasepath.puchaseid = indoo_param..... in stead of being vw_purchasepath.displayname= indoo_param..... That behaviour could be part of the value field being sort of flexible, but it should work i.m.h.o.

Alexander

New Post
 7/28/2010 3:54 PM
 

Here is the query:

@indoo_sqlp_sql_Parameter1 = hand

SELECT * FROM (SELECT Row_number() OVER (ORDER BY vw_PurchasePriceList.PurchasePriceListID ASC) AS grid_ViewRownumTable,vw_PurchasePriceList.PurchasePriceListID AS grid_ViewTmpkey ,vw_PurchasePriceList.PurchasePriceListID AS gridViewViewColumn_id,vw_PurchasePriceList.PurchasePriceListID AS gridViewEditColumn_id,vw_PurchasePriceList.PurchasePriceListID AS gridViewDeleteColumn_id,vw_PurchasePriceList.PriceListID,vw_purchasepath_0.displayname,vw_PurchasePriceList.Date_From,vw_PurchasePriceList.Date_To,vw_PurchasePriceList.Geverifieerd,vw_PurchasePriceList.Formuleprijs,vw_PurchasePriceList.Actief,vw_PurchasePriceList.ModifiedDate,vw_PurchasePriceList.ModifiedBy,vw_PurchasePriceList.CreatedDate,vw_PurchasePriceList.CreatedBy,vw_PurchasePriceList.Price FROM vw_PurchasePriceList LEFT OUTER JOIN vw_purchasepath vw_purchasepath_0 ON vw_PurchasePriceList.PurchaseID = vw_purchasepath_0.PurchaseID WHERE (PriceListID=126 and actief <>0) AND ((((vw_PurchasePriceList.PurchaseID) LIKE '%'+@indoo_sqlp_sql_Parameter1+'%')))) as t_grid_ViewRownumTable WHERE (t_grid_ViewRownumTable.grid_ViewRownumTable <= 10)

The grey part is what should be: vw_purchasepath.displayname like .....

Anybody

Alexander

Previous Previous
 
Next Next
ForumForumForumForumIndoo Grid DNN ...Indoo Grid DNN ...Filter and joined tableFilter and joined table

  
Buy it Minimize

 

 

  
Home | Demo | Custom Solutions | Downloads | Forum | Company
 
Privacy Statement | Terms Of Use
 
Copyright 2008-2009 IndooLab d.o.o.