4 Replies Latest reply on Nov 17, 2015 12:52 AM by alexe RSS
    js802686 Newbie

    Thingworx mashup and widget related queries

    1)How to display editable controls within Grid column? E.g. drop down selection or calendar control so that user can select value. As of now we are able to get only textbox as editable control.

    2) For textbox control within grid we are facing another issue. Such Editable textbox value within grid value is not passed to service as parameter. It is passing value which is bind to grid but not the editable one. This is required to update editable value from Grid to database.

    3)How can grid rows can be interchanged? E.g. Select a grid row and drag it at other place that will change selected grid row index. Is the same functionality achieved on button click like Move Up/Move Down?

    4)We have applied validation expression on button which is firing but in case of invalid value it is not preventing user to save record in database. How can we correct this?

      • Re: Thingworx mashup and widget related queries
        paic Collaborator

        1. This is not possible in the Grid widget

        2. You can only pass the entire Grid as a parameter, you can't pass a row or single cell

        3. This is not possible in the Grid widget, even move up/down would be very difficult unless you are maintaining some index

        4. Validation is not a prevention, we recommend server side validation in all cases, but if need be, you can use the expression widget and the validator widget to do actual client side validation.

         

        To achieve some of the functionality that you are looking for, you might be able to do it with a repeater, but that will likely be inefficient. A different approach to your design would be recommended within the scope of the existing widgets, else you will need to create custom widgets.

        • Re: Thingworx mashup and widget related queries
          qn Communicator

          Hi,

           

          Depending on the data type passing to Grid, some of your problem could be solved, but outside the Grid. Stream or DataTable could help in your case.

          2) For textbox control within grid we are facing another issue. Such Editable textbox value within grid value is not passed to service as parameter. It is passing value which is bind to grid but not the editable one. This is required to update editable value from Grid to database.

           

          You can add some Display Value (editable) which display the infos of the selected row of the Grid. In this case, you can retrieve, one by one, the values concerned.

           

          3)How can grid rows can be interchanged? E.g. Select a grid row and drag it at other place that will change selected grid row index. Is the same functionality achieved on button click like Move Up/Move Down?

          You can add an index for your infos, as Pai said, then change this index by a service (binded to the button Move Up/Move Down) and refresh the display

           

          4)We have applied validation expression on button which is firing but in case of invalid value it is not preventing user to save record in database. How can we correct this?

          As the problem (2), you can validate the entry for each field.