By Edhy Rijo - 6/7/2009
Hi Trent,
I have a BrowseDialog (BD) class which I need to use in 2 forms showing different columns in the BrowseResultsLayout. All the inheritance is working find, I am able to drop an instance of my BD on each form and it works just fine, problem is that in a 2nd form I just need to show 3 columns instead of showing the 5 columns created in the class.
For the search fields there is no problem because I can set these up by code using the BD.SearchFields property and works find, but I have not find a way to remove columns from the instance in my form, is there a trick to do that? or would I be required to create the BD on each forms instead?
|
By Trent L. Taylor - 6/7/2009
If the browses are the same with the exception of the results layout, then you will definitely want to have a single class that is inherited from the BD and then just programmatically modify the results. The results is a collection so you can just modify the collection in code. if you open the designer file of the BD class you created, you will see the BrowseResultsLayout property is just a collection and you can see what the designer has done. So it would just be a matter of removing these in an even prior to the BD being shown.
|
By Edhy Rijo - 6/7/2009
Thanks, I will check the designer file and test for the best event to remove the column not needed in this form.
|
|