CustomFilter for TypedList relation

Posts   
 
    
KDanil
User
Posts: 1
Joined: 15-Jan-2007
# Posted on: 15-Jan-2007 16:40:48   

Hi all!

I generated typedlist from llblgen UI (I'm using adapter mode). I'm using GridView with LLBLGenProDataSource2 on the web form. I need to assign CustomFilter to the TypedList relation at runtime. Generated TypedList contais only one method to get IRelationPredicateBucket GetRelationInfo(). I got RelationPredicateBucket object and assigned CustomFilter to the relation. But method GetRelationInfo() creates new object for its private field _filterBucket = new RelationPredicateBucket(); BuildRelationSet(); return _filterBucket; and LLBLGenProDataSource2 control is using this method for Databinding. So I lose assigned CustomFilter as DataBinding happen after my assignment.

I deleted two lines from the mothod to round this problem. //_filterBucket = new RelationPredicateBucket(); //BuildRelationSet(); return _filterBucket; But it is not very good, as I modified generated code. Could someone help me with this problem? Thanks.

jbb avatar
jbb
User
Posts: 267
Joined: 29-Nov-2005
# Posted on: 15-Jan-2007 17:03:14   

Hello,

you can inherits your typed list and modify the getrelationinfo. Or as it is partial classe, you can create another file where you will modify the method and it won't be deleted after generation.