Help understanding BrowseDialog inheritance


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Well basically I have several forms which use the same Parent Table, I want to have a single BrowseDialog class to be reused by each form, but the key here is that each form will use different SearchFields from the same Parent Table.



So in this case for each form some SearchFields will always be reused and some will be unique, as well as the BrowseResultsLayout which will have some common fields and some unique.



Due to the similarities, I though of using a single BrowseDialog base class (like in the StrataFlix sample) but when I drop an instance of my BD class in each form and manually adjust the SearchFields and BrowseResultsLayout properties, when I run the form those properties revert back to their original value in the base class.




Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
First, let me understand. You are wanting to create a base browse dialog that all of your other browse dialogs, correct? Or, are you just wanting to class your existing BD so that you can reuse them over and over again.



In teh case of the first, which I think you are getting at, there are times when you will have to override the property (or you are setting a property) in the Load or constructor of the class. If this is a property and you are overwriting base logic, then you may need to create an internal private, override the property, and implement your logic.



What properties specifically are you getting at here?
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,



Just in case this message was overlook, please see if you can help me out here.



Thanks!

Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
I have a base BrowseDialog I want to use in other similar forms that share the same search table but with different fields. Ok I created my base class BDBase and setup all possible search fields in SearchFields property and also setup the BrowseResultsLayout.



So far so good. Now I create another class and inherited from BDBase and in the designer, I removed the fields I don't need from SearchFields and BrowseResultsLayout. When I add an instance of this class in my form, those 2 properties are reset to the default values in BDBase class.



What am I doing wrong? Also is this the correct approach to reuse the BrowseDialog?

Edhy Rijo

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