Skip to main content
Best answer by SP_9715784

Hi, 

 

Got the Simple Solution,

 

1. Make Sure the Thing BaseTemplate is DataTable
2. Such that we can find lot of Services DeleteDataTableEntries, DeleteDataTableEntry and DeleteDataTableEntriesByKey.
3. For me the Row in the Grid got deleted for all the three services.
4. Create a Checkbox Column in the GRID and make it "Editable" and put the default value as False.

 

The Grid's Edited Table is the INPUT for the following Service

 

for (var i= 0;i<EditedTable.length;i++)
 {
	 var row = EditedTable.rows[i];
 if(row.CheckBox ===true)
 {
		 var values = me.CreateValues();
 values.Column1 = row.Column1;
 values.Column2 = row.Column2;
 values.Column3 = row.Column3;
 values.Column4 = row.Column4;
 var params1={
 values:values
 };
 Things["DataTable_Name"].DeleteDataTableEntry(params1);
 		}
 }

 

3 replies

5-Regular Member
January 24, 2021

Hi @SP_9715784 

 

Thank you for opening this thread on community. Are you using infotable to populate data on grid?

 

Check this thread if it helps:

https://community.ptc.com/t5/ThingWorx-Developers/selected-row-remove-on-infotable/td-p/664766?posno=9&q=delete%20selected%20row&source=search

 

regards,

Mohit

5-Regular Member
January 24, 2021
SP_971578412-AmethystAuthorAnswer
12-Amethyst
January 28, 2021

Hi, 

 

Got the Simple Solution,

 

1. Make Sure the Thing BaseTemplate is DataTable
2. Such that we can find lot of Services DeleteDataTableEntries, DeleteDataTableEntry and DeleteDataTableEntriesByKey.
3. For me the Row in the Grid got deleted for all the three services.
4. Create a Checkbox Column in the GRID and make it "Editable" and put the default value as False.

 

The Grid's Edited Table is the INPUT for the following Service

 

for (var i= 0;i<EditedTable.length;i++)
 {
	 var row = EditedTable.rows[i];
 if(row.CheckBox ===true)
 {
		 var values = me.CreateValues();
 values.Column1 = row.Column1;
 values.Column2 = row.Column2;
 values.Column3 = row.Column3;
 values.Column4 = row.Column4;
 var params1={
 values:values
 };
 Things["DataTable_Name"].DeleteDataTableEntry(params1);
 		}
 }

 

Community Manager
January 29, 2021

Hi @SP_9715784.

 

Glad you found a solution!

 

For the benefit of others in the community, please mark your last post as the Accepted Solution.

 

Regards.

 

--Sharon

12-Amethyst
January 30, 2021

Hi @slangley 

 

I have already accepted the solution...

 

 

Thanks & Regards, 

Shashi Preetham