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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How to save the edited grid data in the table of database?

Priyatosh
5-Regular Member

How to save the edited grid data in the table of database?

Hi,

 

I have done the following binding, but still the edited data is not saving in the data base, the binding I have given in the below picture.

 

could you provide some solution?

 

Thanks in advance

6 REPLIES 6
nmutter
14-Alexandrite
(To:Priyatosh)

You need to pass EditedTable to your Table_Update service. The table will contain the modified data which you need to do with what you need:

 

nmutter_0-1663103068783.png

Most likely you also just want to call the Table_Update service on EditCompleted event (not on all events you have configured in the screenshot).

 

Also see:

AdvancedGridsProperties.html "EditCompleted" and "EditedTable"

 

Hope that helps!

Priyatosh
5-Regular Member
(To:nmutter)

HI @nmutter ,

 

Thanks for the reply.

 

I was trying to bind as you said and after binding the grid is not editable.

 

I have attached the binding picture here, kindly go through it and provide me a solution.

 

Thanks in advance

nmutter
14-Alexandrite
(To:Priyatosh)

I dont see that "EditedTable" is bound and passed to the Table_Update service of yours. Maybe this post will help https://community.ptc.com/t5/ThingWorx-Developers/Editing-an-grid/m-p/514615/highlight/true#M11105 .

Careful when reading help guides related to "grids" as there are different types of grid widgets across various versions of ThingWorx such as "Grid", "Tree Grid Advanced", and "Grid Advanced".  I had recently did some testing with config tables and an editable grid for which I used "Grid Advanced".  I changed it to a "Tree Grid" and saw the same issue where it was no longer editable in each row despite checking the (2) edit-related config properties of the widget.  If you application / use case allows, try the same thing with "Grid Advanced".

 

The attached image shows my binding example, maybe it will be helpful.  I am passing the edit and delete tables to other on-mashup grid advanced widgets to explore the function of the widget.  That is the only reason there are (3) grid advanced widgets shown.  "gridadvanced-16" is the primary.

--UPDATE--

I couldn't edit because the grid column was not configured as "Editable"...so, it was doing what it was told to do, ha.

This checkbox is in the "Configure Grid Columns" menu for the widget.

All the column fields were not editable by default.

After selecting the "Editable" checkbox, I could edit in the grid.

swstevens_0-1663869373359.png

 

nmutter
14-Alexandrite
(To:swstevens)

Your initial issue was that the edited table was not saved (figuring you could already edit the table). The cause - at least one of them - was that you did not bind the "EditedTable" parameter of the grid. Was that your issue and is it resolved now? Not clear for me.

Top Tags