Search Support
-
Naveen semwalFebruary 9, 2018 at 1:48 am #4972
I am using table control to display list of addresses. As we have lot of fields in address object , we have created a modal and we show all the data in a modal and user can either insert or update data using modal. But whenever I update data of a row using modal and after that try to delete updated row. I get error as shown in attached screen shot. Row data gets deleted but row HTML remains inside the table.
for updating I am using below mentioned code-
var rowData = {
addressLine1:${AddressDetails_AddressLine1}.getData(),
addressLine2:${AddressDetails_AddressLine2}.getData(),
addressLine3:${AddressDetails_AddressLine3}.getData(),
addressType:{name:${AddressDetails_AddressType}.getItemText(${AddressDetails_AddressType}.getSelectedItem()),value:${AddressDetails_AddressType}.getData()},
city:{name:cityName,value:${AddressDetails_City}.getData()},
pincode:{name:pincodeName,value:${AddressDetails_Pincode}.getData()},
collectionArea:{name:${AddressDetails_CollectionsArea}.getItemText(${AddressDetails_CollectionsArea}.getSelectedItem()),value:${AddressDetails_CollectionsArea}.getData()},
mailingAddress:{name:${AddressDetails_MailingAddress}.getItemText(${AddressDetails_MailingAddress}.getSelectedItem()),value:${AddressDetails_MailingAddress}.getData()},
propertyStatus:{name:${AddressDetails_PropertyStatus}.getItemText(${AddressDetails_PropertyStatus}.getSelectedItem()),value:${AddressDetails_PropertyStatus}.getData()},
state:{name:stateName,value:${AddressDetails_State}.getData()},
currentAddressStayDuration:{years:${AddressDetail_CurrentAddressYear}.getData(),months:${AddressDetail_CurrentAddressMonth}.getData()},
currentCityStayDuration:{years:${AddressDetail_CurrentCityYear}.getData(),months:${AddressDetail_CurrentCityMonth}.getData()},
isGSTAddress:isGST,
district:${AddressDetails_District}.getData(),
landmark:${AddressDetails_Landmark}.getData(),
landline:${AddressDetails_Landline}.getData(),
mobile1:${AddressDetails_MobileNo1}.getData(),
mobile2:${AddressDetails_MobileNo2}.getData()};
console.dir(rowData);
var i =${AddressDetail_RowIndex}.getData();
${Data1}.getData().put(i,rowData);
When I insert a row, I don’t get any issues while deletion. Only when I update the row I get delete issue. I guess after updating the row I have to sync the table data or something . As it is done internally while adding a new row.
** Adding a modal section and binding it to selected row index is not an option for me due to performance and functional issues.
Please let me know how this can be achieved.
Thanks
SPARK SupportFebruary 9, 2018 at 9:15 am #4976Hello Naveen,
This issue is being caused by the fact that put() is overwriting the associated Table functions for that row, and is not a defect with SPARK. The Table does provide an available setData() method.
If you have an urgent requirement for this functionality, please feel free to contact our Sales Team regarding an Engagement in developing a custom solution. Also, please be advised that we do offer Expert Services on a monthly subscription basis for guidance in implementation and development.
Regards,
SPARK Support
-
|
You must be logged in to reply to this topic.