It really was not that difficult to add a custom field to the line items. In the table, we added a new TemplateField column added the field to both the ItemTemplate and the EditItemTemplate.
<%# Eval("SERVICE_DATE_C") %>
Hi ,
I follow your instruction as below but still I'm not able to save the update .
I'm using 2.1
We then added code to methods grdMain_RowUpdating and LoadLineItems. We mostly just copied the code that managed the DESCRIPTION field and did the exact same thing for SERVICE_DATE_C. Just search EditLineItemsView.ascx.cs for "DESCRIPTION" and add your custom field to the next line.
In order for the custom field to get updated when the Order is saved, you will have to use our function to add the custom field to the system. The following function performs an alter table to add the actual field to the custom table, and it adds a record to the FIELDS_META_DATA table, which is required for automatic updating of custom fields.
exec dbo.spFIELDS_META_DATA_Insert null, null, 'SERVICE_DATE', 'Service Date', 'SERVICE_DATE', 'ORDERS_LINE_ITEMS', 'date', null, 0, 0, null, null, 0;
This is where it gets more complicated. The EditLineItemsView.ascx manages the edit of the table, but it does not manage saving the data to the database. Saving the data is handled in the EditView of Quotes, Orders or Invoices.
We have a new build coming out in the next few days that will handling the saving for you. Please contact our support staff directly if you are interested in getting an advanced copy for testing.