How do I filter a business object by a custom property?


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
When I attempt to filter a BO on a custom property, the debugger tells that the specified column does not exist.  It is true that it cannot be found in the DB, but it is on the BO.  Is there a trick to filtering on a custom property?

Thanks,
Bill

Replies
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
With the textboxes, the values are showing up properly as I navigate through the BO.

The grid has a BBS datasource that points to the exact same BO.  All of the fields in the grid are blank.

(preparing to look for a towel to throw in)

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)StrataFrame VIP (1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Hi Ivan,

Thanks for the input.  The only real difference is that my properties are read-only; therefore, no set portion.  I have done exactly what you did...except I did not put the add column code in both methods of the BO (initialize and refilled).  I will try that.

Bill

Paul Chase
Paul Chase
Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)Advanced StrataFrame User (542 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
That is good, if it work's without the BBS then you know it is a BBS issue and not a business object issue.

What happens when you use a BBS is that it creates a new instance of the busines object for every row. However it does not carry over any custom properties etc that are to the new instance.for instance if you have a property called foo in you business object and its value has been set to "Something" what the business binding source create a new instance of the Bo for that row the property foo's value with be nothing.

If that is what is happening then you can fix it by creating a BBS that is customized to your business object type. If you rthink this is where your problem is i can send you a copy of one I modified.

Paul

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Bill Cunnien - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Bill Cunnien - 16 Years Ago
Greg McGuffey - 16 Years Ago
Bill Cunnien - 16 Years Ago
                         A custom property shows up in the field list when creating a browse...
Bill Cunnien - 16 Years Ago
Peter Jones - 16 Years Ago
Bill Cunnien - 16 Years Ago
Greg McGuffey - 16 Years Ago
Bill Cunnien - 16 Years Ago
                 Guys, can I do this? foreach ( DataRow dr in this...
Bill Cunnien - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Peter Jones - 16 Years Ago
Bill Cunnien - 16 Years Ago
Charles R Hankey - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Bill Cunnien - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                         [quote]Thanks for pulling out the French. English just wasn't getting...
Greg McGuffey - 16 Years Ago
Bill Cunnien - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                         Thanks, Trent! Man, I am getting tired...past midnight here. Still...
Bill Cunnien - 16 Years Ago
                             I added the code below into the CurrentDataTableRefilled method:...
Bill Cunnien - 16 Years Ago
                                 If I put a break on the first line of the code in the custom property,...
Bill Cunnien - 16 Years Ago
                                     Well, you need to have data in the colReqQty for the filter to work,...
Greg McGuffey - 16 Years Ago
                                         The fire is already crackling loudly under my feet. I'll go through...
Bill Cunnien - 16 Years Ago
                                         Fascinating. Bewildering. Frustrating. There are three custom...
Bill Cunnien - 16 Years Ago
                                             Some more thoughts (do I smell something burning?)....:P
...
Greg McGuffey - 16 Years Ago
                                                 Bill, I think that you are trying to make this too complicated. I...
Trent L. Taylor - 16 Years Ago
                                                     One other point that I saw in regards to your grid...if you do not...
Trent L. Taylor - 16 Years Ago
                                                 Here is my actual custom property code. Please criticize at will. I...
Bill Cunnien - 16 Years Ago
                                                     Hey Bill. Just in case it might help you see what Trent told you about...
Ivan George Borges - 16 Years Ago
                                                     Bill,

You might try doing something real simply like just...
Greg McGuffey - 16 Years Ago
                                                         Paul: I have a very similar setup on my InvoiceBO with the...
Bill Cunnien - 16 Years Ago
                                                             BILL, if you would read my previous post, there is ONLY one...
Trent L. Taylor - 16 Years Ago
                                                                 Also, if you read Ivan's post, he has posted some code that shows an...
Trent L. Taylor - 16 Years Ago
                                                                     [quote][b]Trent L. Taylor (06/26/2008)[/b][hr]Also, if you read Ivan's...
Bill Cunnien - 16 Years Ago
                                                                         If your customer property work's fine with textbox's but not with a...
Paul Chase - 16 Years Ago
                                                                             [quote][b]Paul Chase (06/26/2008)[/b][hr]If your customer property...
Bill Cunnien - 16 Years Ago
                                                                         Hey Bill. Don't even know wether this would make a difference or not,...
Ivan George Borges - 16 Years Ago
                                                                             Thanks for reviewing the code, Ivan. Yup, just left it out, since I am...
Bill Cunnien - 16 Years Ago
                                                                                 I thought I would try to wrap up this thread with a play-by-play of...
Bill Cunnien - 16 Years Ago
                                                                                     Glad you got it going, Bill! ;) [quote]There are a couple of...
Ivan George Borges - 16 Years Ago
                                                                                         Since the form's purpose is to display information only, I set the...
Bill Cunnien - 16 Years Ago
                                                                 The threecolumns (which areblank)are dragged from the available...
Bill Cunnien - 16 Years Ago
                                                 Bill, Try taking the business binding source out of the equation,...
Paul Chase - 16 Years Ago
                                                     With the textboxes, the values are showing up properlyas I navigate...
Bill Cunnien - 16 Years Ago
                                                         Hi Ivan, Thanks for the input. The only real difference is that my...
Bill Cunnien - 16 Years Ago
                                                             That is good, if it work's without the BBS then you know it is a BBS...
Paul Chase - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search