Change Default Title of a Search Window


(Jason Woods) #1

I would like to change the default title of a search window. I am currently using:
Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "OrderDtlSearchAdapter", out recSelected, true, whereClause, true);
I know how to add and remove columns from the list, but not change the actual title (in this case the title is “Order Line Detail Search”)

(Jose C Gomez) #2

Maybe not the answer you are looking for but what about invoking a Quick Search that you already named?

(Haso Keric) #3

I know to override the Base Search you can do:

private void oTrans_adapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
    switch (args.MethodName)
        case "GetRows":
        case "GetList":
            // Set Search Column to Display (Override Base)
            EpiSearchBase adapterSearchForm = oTrans_adapter.SearchForm;
            //adapterSearchForm.Width = 500;
            if (adapterSearchForm != null)
                adapterSearchForm.Text = "Search";
                // Parameters: Data Column Name, Column Header Text, Width, Is Result, Position
                adapterSearchForm.SetEpiSearchColumn(new EpiSearchColumn("Key1", "Batch ID", 30, true, 0), true);
                adapterSearchForm.SetEpiSearchColumn(new EpiSearchColumn("Character01", "Description", -1, false, 1), true);
                adapterSearchForm.SetEpiSearchColumn(new EpiSearchColumn("Key2", "Type", -1, false, 2), true);
                adapterSearchForm.SetEpiSearchColumn(new EpiSearchColumn("Key3", "Sub-Type", -1, false, 3), true);

Therefore I am wondering if you can do something like this to your search, perhaps only if you use the Adapter to call it up and not the Helper Method.

(Jason Woods) #4

This code works great if there is already an adapter. However, that is obviously not the case here.

(Haso Keric) #5

Yep, thats why I stated perhaps you should include the Adapter OrderDtlSearchAdapter and not use the listLookup but call the Search yourself?