Skip to main content
12-Amethyst
Jan 28, 2021 8:01 AM UTC

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);
 		}
 }

 

5 replies

5-Regular Member
Jan 24, 2021 1:50 PM UTC

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

Translate
5-Regular Member
Jan 24, 2021 1:52 PM UTC
SP_971578412-AmethystAuthorAnswer
12-Amethyst
Jan 28, 2021 8:01 AM UTC

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);
 		}
 }

 

Translate
Support
Jan 29, 2021 9:53 PM UTC

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

Translate
12-Amethyst
Jan 30, 2021 9:41 AM UTC

Hi @slangley 

 

I have already accepted the solution...

 

 

Thanks & Regards, 

Shashi Preetham

Translate