Hi,
I've never had consistent luck adding rows to a dataview reference... I'd update the view directly and not use the variable...
Regards,
Mark
I've never had consistent luck adding rows to a dataview reference... I'd update the view directly and not use the variable...
Regards,
Mark
--- In vantage@yahoogroups.com, "altyrocks" <alty_rocks@...> wrote:
>
> I'm trying to add a quotedtl record to an existing quote. My code is below. When I go to update the record, it tells me that the row has been modified by another user and that I need to refresh. When I refresh, it zeros out my orderqty but keeps the part number that I set in the previous code line. I'm not sure what's going on.
>
> private static void SaveQuoteRecord()
> {
> DataTable myDataTable = edvQuoteDtl.dataView.Table;
> EpiDataView myEpiDataView = EpiDataView)oTrans.EpiDataViews["QuoteDtl"];
>
> while (freePartNumber.Count != 0)
> {
> if (myEpiDataView.Row != -1)
> {
> int quoteNum = (int)myEpiDataView.dataView[myEpiDataView.Row]["QuoteNum"];
>
> oTrans.GetNewQuoteDtl();
>
> myEpiDataView.dataView[myEpiDataView.Row].BeginEdit();
> myDataTable.Rows[myDataTable.Rows.Count - 1]["PartNum"] = freePartNumber[0];
> myDataTable.Rows[myDataTable.Rows.Count - 1]["OrderQty"] = freePartAmount[0];
> }
> freePartNumber.Remove(freePartNumber[0]);
> freePartAmount.Remove(freePartAmount[0]);
> }
> }
>