Generic Browse Dialog


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)Advanced StrataFrame User (630 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have been using the Browse Dailog on a few screens and its working out very well. Typically I use it with a text Box , say to do a look up on a cutomer file. The user would enter text into the text box, and I first do an exact lookup on the Customer table to see if the cutomer number exists. If it does, I don't call the Browse Dialog. If it does not, i assume the user has entered 'part' of the name and I call a browse dialog with a few colums ftom the customer file set up. All this is working perfectly.

Now I find  I need this funtionality on say 20 forms. What I had started to do was repeat the same text box and browse dialog on each form, but thought there must be a better way . Some guidance of setting up a Customer Lookup class (based on a text Box that calls the browse dialog) that I can then drop on each of my forms.I can manage searching the tables etc but not sure how to set up the BrowseDialog in code as opposed to from within a form.

Pseudo code of the sort of thing I'm lookin at would be:

public class Textbox : MicroFour.StrataFrame.UI.Windows.Forms.Textbox
{
private System.Drawing.Color originalBackgroudColour;
protected override void OnEnter(EventArgs e)
{
//-- Run Base Class Code
base.OnEnter(e);
protected override void OnLeave(EventArgs e)
{
//-- Run the Base Code for the textbox
base.OnLeave(e);
// Pseudo Code
SearcCustomer(this.tetBox)
If NotFound
{Call BrowseDialog}
}
} // End textBox

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ger Cannoll - 14 Years Ago
Edhy Rijo - 14 Years Ago
Ivan George Borges - 14 Years Ago
Ger Cannoll - 14 Years Ago
             You're welcome, Gerard. ;)
Ivan George Borges - 14 Years Ago
Ger Cannoll - 14 Years Ago
Ivan George Borges - 14 Years Ago
                         Hi Ivan. I will plough ahead then and see if I can develop a small...
Ger Cannoll - 14 Years Ago
                         I just took a look at the sample (nice Ivan) and then tried to...
Greg McGuffey - 14 Years Ago
                             Hi Greg. Many thanks for this and particulalrly taking the time to...
Ger Cannoll - 14 Years Ago
                                 My pleasure. Let me know if you need more clarification or if you come...
Greg McGuffey - 14 Years Ago
Ger Cannoll - 14 Years Ago
Greg McGuffey - 14 Years Ago
Ger Cannoll - 14 Years Ago
Greg McGuffey - 14 Years Ago
                         Hi Greg.. Did'nt realise there was so much in Reflection so I am...
Ger Cannoll - 14 Years Ago
                             Gerard,

This is actually a good way to start understanding...
Greg McGuffey - 14 Years Ago
                                 I have Kernel_BOLibrary referenced as I can access the Business...
Ger Cannoll - 14 Years Ago
                                     There has got to be some issue with references/bo names. In cases...
Greg McGuffey - 14 Years Ago
                                         Ok Greg.... will give that a try .
Ger Cannoll - 14 Years Ago
                                         Hi Greg. I took your advice and have set up two projects to come as...
Ger Cannoll - 14 Years Ago
                                             I'll take a look at this either later today or tomorrow.
Greg McGuffey - 14 Years Ago
                                                 Hi. just wondering if this has dropped off the radar ??
Ger Cannoll - 14 Years Ago
                                                     Ah...oops. I'll take a look at it today. Sorry for the delay.
Greg McGuffey - 14 Years Ago
                                                         You were really, really close. :D

You had done two things...
Greg McGuffey - 14 Years Ago
                                                             Thanks for that Greg. I feel I am making progress now. I am at the...
Ger Cannoll - 14 Years Ago
                                                                 Just wondering...any thoughts on this ??
Ger Cannoll - 14 Years Ago
                                                                     If you decide to go this route, and configure the BrowseDialog in code...
Greg McGuffey - 14 Years Ago
                                                                         I have changed the code now, and am getting the browse dialog screen...
Ger Cannoll - 14 Years Ago
                                                                             Check that you set the FieldType correctly. This must match the type...
Greg McGuffey - 14 Years Ago
                                                                                 I changed to DbType.String but it did not make any difference. After...
Ger Cannoll - 14 Years Ago
                                                                                     No problem. I had forgot that dictionaries are by default case...
Greg McGuffey - 14 Years Ago
                                                                                         I am having a problem setting aproperty of the Browse programatically....
Ger Cannoll - 14 Years Ago
                                                                                             Any ideas on this ??
Ger Cannoll - 14 Years Ago
                                                                                                 Hi Gerard. Have you tried dealing with the FormLayout property? Also,...
Ivan George Borges - 14 Years Ago
                                                                                                     Yes I tried to use the FormLayout proerty but could not find a...
Ger Cannoll - 14 Years Ago
                                                                                                         Have you tried having a look at a BD resource file (its .resx) and...
Ivan George Borges - 14 Years Ago
                                                                                                             Where would I find the BD resource file and what should I be looking...
Ger Cannoll - 14 Years Ago
                                                                                                                 When you adjust the form layout there are several things you can do:...
Greg McGuffey - 14 Years Ago
                                                                                                                     Hi Gerard. Did I say resource file?! And by that you didn't...
Ivan George Borges - 14 Years Ago
                                                                                                                         I wondered what you were talking about.... :blink:
Greg McGuffey - 14 Years Ago
                                                                                                                             On times like this just hit me on the head so I come back to normal......
Ivan George Borges - 14 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search