Author Topic: Get ID for dropdown while dragging through rows  (Read 1387 times)

Sivakumar

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 32
    • View Profile
Get ID for dropdown while dragging through rows
« on: August 27, 2020, 08:57:55 pm »
Hi,

I am unable to get ID's (ShipViaId) for dragged rows in the ShipVia column in the updateList. Below is the URL for the jsfiddle:
Also, please refer to the code section for the addList, updateList for the data that I'm getting after dragging the rows

https://jsfiddle.net/oa0nvky5/

However, I am getting the ShipViaId for the row from where the dragging has started and not the subsequent rows.
As I am not getting the ShipViaId for other rows, I am unable to save the ID's of the dropdowns.

In my implementation, I need to fetch the ID's for 5 columns with dropdown but I am unable to do so as the drag-to-copy feature is not working as per expectations.

Code: [Select]
{
  addList: [],
  deleteList: [],
  oldList: [{
  ShipVia: undefined,
  ShipViaId: undefined
}, {
  ShipVia: undefined
}, {
  ShipVia: undefined
}],
  updateList: [{
  CustomerName: "Vins et alcools Chevalier",
  Freight: 32.38,
  OrderDate: "07/04/1996",
  OrderID: 10248,
  ProductName: "Queso Cabrales",
  Quantity: 12,
  RequiredDate: "08/01/1996",
  rowID: 1,
  ShipAddress: "59 rue de l'Abbaye",
  ShipCity: "Reims",
  ShipCountry: "France",
  ShipName: "Vins et alcools Chevalier",
  ShippedDate: "07/16/1996",
  ShipPostalCode: "51100",
  ShipRegion: null,
  ShipVia: "Speedy Express",
  ShipViaId: "SE",
  UnitPrice: 14
}, {
  CustomerName: "Vins et alcools Chevalier",
  Freight: 32.38,
  OrderDate: "07/04/1996",
  OrderID: 10248,
  ProductName: "Singaporean Hokkien Fried Mee",
  Quantity: 10,
  RequiredDate: "08/01/1996",
  rowID: 2,
  ShipAddress: "59 rue de l'Abbaye",
  ShipCity: "Reims",
  ShipCountry: "France",
  ShipName: "Vins et alcools Chevalier",
  ShippedDate: "07/16/1996",
  ShipPostalCode: "51100",
  ShipRegion: null,
  ShipVia: "Speedy Express",
  UnitPrice: 9.8
}, {
  CustomerName: "Vins et alcools Chevalier",
  Freight: 32.38,
  OrderDate: "07/04/1996",
  OrderID: 10248,
  ProductName: "Mozzarella di Giovanni",
  Quantity: 5,
  RequiredDate: "08/01/1996",
  rowID: 3,
  ShipAddress: "59 rue de l'Abbaye",
  ShipCity: "Reims",
  ShipCountry: "France",
  ShipName: "Vins et alcools Chevalier",
  ShippedDate: "07/16/1996",
  ShipPostalCode: "51100",
  ShipRegion: null,
  ShipVia: "Speedy Express",
  UnitPrice: 34.8
}]
}


Let me know if any additional information is required from my end.

Regards,
Uttam

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Get ID for dropdown while dragging through rows
« Reply #1 on: August 28, 2020, 01:45:22 pm »
By default the autoFill doesn't associate id and values.

Please check this example to map id and values with autoFill.

https://paramquery.com/pro/demos/datamap


BTW your jsfiddle is off topic.