locked
Details modal picker filtering RRS feed

  • Question

  • Hi,

    1. Firstly, I recognize that Modal Picker Windows does not have filter textbox. If you have too many options, It can be problem. You must customise every window. Alternatively, Lightswitch can generate a filtered combobox. How can I solve that problem?

    2. How can I do custom search more criteria for a list ?  Button click etc.?

    Thanks

    Friday, November 23, 2012 6:50 AM

All replies

  • Hi Nurkmez

    This will help I hope :) .

    1- Create your screen as you like it fit 

    2- Add Data Item -> Query -> Select your table (All) -> Ok

    3- Edit the query for the table you just create to match your needs (For now think that you have one parameter that you make the filter with)

    4- Add Dialog -> Drag the parameter and the table to the dialog

    5- The table will be a List -> Select the Summary filed of the table -> properties -> Edit Post Render Code -> add this code 

        $(element).parent().click(function () {

            contentItem.screen.TheRelatedTable.selectedItem.TheFiled = contentItem.screen.TheTable.selectedItem;
        });
        $(element).parent().dblclick(function () {

    // Thanks to 

    // Michael Zlatkovsky (MSFT)

    // http://social.msdn.microsoft.com/Forums/en-US/lightswitchhtml/thread/b224a8d2-752c-48f4-86e1-8d0bf9b3332b/        

    var $okButton = $(element).parents(".msls-dialog-frame:first").find("div:.msls-ok-button");
            $okButton.click();
        });

    6- Under the Filed you need the Filtered Model Piker Window -> Add Button -> Choose an exist method -> showDialog -> Select the dialog you just create

    7- Run the application -> go to the screen click the button -> type your text and hit enter it will filter the list

    8- dblclick on the desired item

    9- have fun

    10- I hope it helps

    • Proposed as answer by Tarek Eladly Tuesday, December 18, 2012 11:37 AM
    Saturday, December 8, 2012 10:20 AM