cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Thingworx mashup and widget related queries

js802686
3-Visitor

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?

4 REPLIES 4
paic
1-Newbie
(To:js802686)

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.

qn
1-Newbie
1-Newbie
(To:paic)

Hi,

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.

I'd like to know how I can retrieve the code of  an existing widget in order to custom it.

Thank you

alexe1
1-Newbie
(To:qn)

This thread is a good place to start on modifying/creating your own widgets, and by modify I mean copy and modify under a new widget name. I would not change the existing code of current widgets

Documentation on Custom Widget

qn
1-Newbie
1-Newbie
(To:js802686)

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.

Top Tags