Author Topic: finding missing items  (Read 2360 times)

ONEITSS

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 27
    • View Profile
finding missing items
« on: October 24, 2016, 01:47:10 am »
Hi,
I have a column in grid, and i have custom array with data, is there any way i can findout missing items in grid from given arrary.

Example:
Grid column H.No = A1,B1,C1,F1
custom array has A1,C1,D1,E1

i need to get D1,E1 since these are exists in custom array but not exists in grid column data.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: finding missing items
« Reply #1 on: October 24, 2016, 07:34:22 am »
I'm not sure about the format of data in your column. Can you please share a jsfiddle to help better understand your question.

Base jsfiddle: http://jsfiddle.net/5yg81u60/

ONEITSS

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: finding missing items
« Reply #2 on: October 24, 2016, 07:44:12 pm »
thanks for your reply.

from your given example: assume that you have javascript arrary with company names 
usercompanies=['Exxon Mobil','ONEITSS']

now i want to findout which are exists in usercompanies list and not exists in grid company column.

expected result from above example should be ONEITSS since Exxon Mobil is already exists in grid.

thx

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: finding missing items
« Reply #3 on: October 24, 2016, 10:12:02 pm »
There is no inbuilt API of grid to do it, you have to do it manually by iterating over the array of rows and find the non matching values.