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

How do I select multiple row in grid advance?

SOLVED
Highlighted
Garnet

How do I select multiple row in grid advance?

Hello,

            I'm using thingworx 9.0 version ,I add one boolean field in Datashape and Set isEditable property of the grid advance.but when i select checkbox is not selected please suggest how do i  I select multiple rows by using checkbox in grid advance? 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How do I select multiple row in grid advance?

Hello @RM12,


This will not work with Selected Rows output data of the service. You will need to write your own custom code using the EditedTable property of the grid to manipulate the data in a custom service using the code snippet provided.

 

Thanks,

Emmanuel

View solution in original post

6 REPLIES 6
Highlighted

Re: How do I select multiple row in grid advance?

Hello @RM12,

 

You can achieve this by following the steps below:

 

  1. Click on the top left corner arrow on Advanced Grid, and go to Configure Grid Columns
  2. Select the boolean field and check Editable under Cell Editing Options

In run time, user will select the desired rows in the grid by checking the boxes. You can then have a Submit button on the mashup for whenever customer is done selecting the rows to activate a service to analyze the data.

 

Keep in mind you will need to manipulate this data in a custom service using the Edited Table infotable property of Advanced Grid as parameter. This means you will need to parse all rows in the table to verify which ones have the boolean field equal to true and populate a temporary infotable with these rows if you want to return only the selected rows as output.

 

Regards,

Emmanuel

Highlighted

Re: How do I select multiple row in grid advance?

Thanks for your reply, I tried with 2 steps

   1 ) I create service for grid ( I  store data into DB, also stores member ID parameter data) and bind that service to grid advance and click on Configure Grid Columns I select parameter which I want .In one parameter (Member ID) ,click on Column Renderer & State Formatting  and set  boolean renderer in checkbox format and check Editable under Cell Editing Options and check IsEditable Property after View  mashup It has already checking checkbox with default value is 1 .please refer 1st attachment.

2) 2nd steps, which I already discuss In datashape I add one definition  and select boolean field and check Editable under Cell Editing Options and Set isEditable property  I want to pass multiple  ID through grid advance by checking checkbox.Is This Method is suitable?? please refer 2nd attachment. 

 

I have many members and members ID  which is stored in the DB.I want to pass multiple  ID(Member ID) through grid advance by checking checkbox.I follow 1st step,but it has already checking checkbox.

How do I pass multiple ID through grid advance by checking multiple checkbox??

Can We add checkbox in grid advance with different way ??

Hope you understand the story..Please suggest.

 

Highlighted

Re: How do I select multiple row in grid advance?

Hi @RM12,

 

The second method is suitable. You will need to pass EditedTable property of the grid to the service and query yourInfotable to verify which rows have the Select column equal to true. The resulting tempInfotable will contain ONLY the selected rows based on Select column. Find helpful code snippet below:

 

 

// create query for Select column == true
var query = {
  "filters": {
    "fieldName": "Select",
    "type": "EQ",
    "value": true
  }
};

// apply query
// tempInfotable is the infoTable containing ONLY rows whole Select == true
var tempInfotable = Resources["InfoTableFunctions"].Query({
  t: yourInfotable,
  query: query 
});

 

 

Then, you can parse through tempInfotable to get Member ID for each row.

 

Thanks, 

Emmanuel

Re: How do I select multiple row in grid advance?

Thanks for your reply ,I followed your step about the checkbox but  it is not working. I have used your code snippet and bind service for testing I have taken two grid in 1 st grid I bind all data of service and in 2nd grid I bind selected rows of that service and take one button and bind click event to that service but when I checking checkbox member id is not select it automatically get uncheck checkbox please refer below attachment

Highlighted

Re: How do I select multiple row in grid advance?

Hello @RM12,


This will not work with Selected Rows output data of the service. You will need to write your own custom code using the EditedTable property of the grid to manipulate the data in a custom service using the code snippet provided.

 

Thanks,

Emmanuel

View solution in original post

Highlighted

Re: How do I select multiple row in grid advance?

Thanks Emmanuel, It works 

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!