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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

how to Add checkbox in grid to select rows in grid to pass the data to service?

Ru
14-Alexandrite
14-Alexandrite

how to Add checkbox in grid to select rows in grid to pass the data to service?

hello,

i have added a checkboxes in a grid.

Bind the service to the grid and then i have bind EditedTable of grid to infotable input parameter(Workout_id) of the DB service to pass the Workout_id. 

 I set iseditable and multiselect property of grid to true, and also set the true value to editable in configure grid columns.

But after that the checkboxes has set default value true. I don't want default value true for checkboxes.

so is there any way where i can set default value false to checkboxes? here i have shared attachments, please refer for your better understanding.

 

Regards,

Ruchika

 

ACCEPTED SOLUTION

Accepted Solutions
sbt
15-Moonstone
15-Moonstone
(To:Ru)

So lets assume that GetInfoToGrid will return a infotable with the datashape has "Name" & "IsTrue" columns to the grid.

Your service output should be like

for(var i=0;i<5;i++)

{

var newEntry = new Object();

newEntry .Name= "somename";
newEntry .IsTrue = false; // always set to false when returned via service so that the check box is set to false
result.AddRow(newEntry1);

}

 

View solution in original post

5 REPLIES 5
sbt
15-Moonstone
15-Moonstone
(To:Ru)

Just ensure that the datatype of the column that you want to make it as checkbox is of type Boolean. Go to column rendering of the grid configuration and make it has checkbox.

If you want all the data rows set default to false, the data which is getting bound to grid should have the column set to false from the service itself. And you can use the edited table of the grid for further processing.

 

Thanks 

Ru
14-Alexandrite
14-Alexandrite
(To:sbt)

Thanks for response,

I wanted to ask how i set default column value to false from service

 

sbt
15-Moonstone
15-Moonstone
(To:Ru)

So lets assume that GetInfoToGrid will return a infotable with the datashape has "Name" & "IsTrue" columns to the grid.

Your service output should be like

for(var i=0;i<5;i++)

{

var newEntry = new Object();

newEntry .Name= "somename";
newEntry .IsTrue = false; // always set to false when returned via service so that the check box is set to false
result.AddRow(newEntry1);

}

 

slangley
23-Emerald II
(To:Ru)

Hi @Ru.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Thank you for your participation in our community.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:Ru)

Hi @Ru.

 

I have marked the Accepted Solution for this post.  If you disagree that it is the solution, please let me know.

 

Regards.

 

--Sharon

Announcements


Top Tags