ChildAutoFilterOption not working


Author
Message
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have problem as above. Any ideas?



I have attached sample project that using latest SF library.



Thank you
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

After some debugging, I found that, when ChildBO.Add() called, ChildBO.Filter is always "1=0" even thought ParentBusinessObject is set. It cause error when I try to set default value.



Any ideas? Urgent!



Thank you
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

One thing very strange is, in BO.NewRow(), _CurrentRowIndex is always -1 even thought lnRowIndex which is 0 has been assigned to it.



'-- Set the row index to the index of the new row

_CurrentRowIndex = lnRowIndex

Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Chan,

I have not seen your posted sample project, but I do know that when you are using any filter and you are adding records, you should set the filter off before adding then re-add the filter after adding.

There are several post related to this issue in the forums, do a search using the Filter keyword and you will find better explanations and sample code for this kind of issue.

Edhy Rijo

Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank you for reply.



In fact, I don't explicitly set Bo.Filter. I just let SF to manage it.

What I want is, since my ChildBO.ParentRelationship and ParentBO.ChildAutoFilterOption have been set, it should auto filter relavent records for me.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Chan,

I don't remember all the details about ChildAutoFilterOption, but search the forums using "ChildAutoFilterOption" and you will find messages about this.

Edhy Rijo

Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have solve this by calling FilterChildRecords() after every ParentBO.Add() called. I found that in SF source code, FilterChildRecords() only been called in Save(), SaveByForm(), ChildAutoFilterOption setter method, Filter setter method and Navigate().



Why doesn't it been called in Add() and DeleteCurrentRow()?



Please advice.

Thank you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search