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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Grid add row and edit only few cells from the row. Thingworx version : 9.5.0-b143

Vimal_Rawat
14-Alexandrite

Grid add row and edit only few cells from the row. Thingworx version : 9.5.0-b143

Hi,

 

i am working on a requirement where i need create, delete and edit a row in a grid widget.

Creating/adding a new row is working fine but i am having problem in restricting edit option.

 

I have 4 columns in my grid col_a, col_b,col_c and col_d. Out of these 4 columns, col_a and col_b are keys for my data shape so should be not be allowed for editing. And only col_c and col_d should provide edit option.

 

currently if i modify column properties and make keep col_c and col_d as editable then i am not getting col_a and col_b when i try to add a row. If i keep all 4 columns as editable then i cannot restrict user to edit col_a and col_b which are key fields.

3 REPLIES 3
slangley
23-Emerald III
(To:Vimal_Rawat)

Hi @Vimal_Rawat 

 

Give these steps a try:

 

  1. Set Editable Properties: In the Mashup Builder, select the Grid widget and navigate to the Properties panel. Set the IsEditable property to True to enable editing for the grid.
  2. Configure Column Editability:
  • For col_a and col_b, ensure that the Editable checkbox is not selected in the column configuration. This will prevent these key columns from being edited.
  • For col_c and col_d, select the Editable checkbox to allow users to edit these columns.
  1. Adding Rows: If col_a and col_b are not appearing when adding a new row, ensure that these columns are included in the grid's data source and are set to be visible. Check the ShowAllColumns property or the column visibility settings in the grid configuration to ensure they are displayed.
  2. Validation: To further ensure that users cannot edit col_a and col_b, consider implementing validation rules that prevent changes to these fields.

By following these steps, you should be able to successfully restrict editing for col_a and col_b while allowing edits for col_c and col_d. For more detailed guidance, refer to Editing Data within the Grid Widget in the ThingWorx Help Center.

 

Please let us know if you have further questions.

 

Regards.

 

--Sharon

Vimal_Rawat
14-Alexandrite
(To:slangley)

I have this grid with 4 columns that are visible. i have added the option '+Add' to add a new row.

Vimal_Rawat_0-1763023389350.png

Currently i have made only column 'FriendlyProgramName' and 'CycleTime' as 'editable'. so i get option to edit only these two columns when i hover over it.

But when i try to click on '+Add' i see only columns 'FriendlyProgramName' and 'CycleTime', whereas i need all the four columns when creating new row.

Vimal_Rawat_1-1763023805250.png


What i want to achieve is:

1) while creating a new row i want to provide details for all the column.

2) while editing only 'FriendlyProgramName' and 'CycleTime' should be available for edit.

slangley
23-Emerald III
(To:Vimal_Rawat)

Hi @Vimal_Rawat 

 

Can you send some screenshots and recreation steps.  It would also be helpful for you to provide the mashup and supporting entities so we can test it here.

 

If you'd rather not share artifacts here, I'm happy to open a case on your behalf.

 

Regards.

 

--Sharon

Announcements


Top Tags