for i:=1 to cxGridTv.Controller.SelectedRecordCount do
begin
  Dm.C_Khxs_D.Append;
  cxGrid_Khxs.GetColumnByFieldName('Isn').EditValue:=DM.C_Khxs_Public.FieldByName('店内码').AsString;
  cxGrid_Khxs.GetColumnByFieldName('CmdtNo').EditValue:=DM.C_Khxs_Public.FieldByName('商品条码').AsString;
  cxGrid_Khxs.GetColumnByFieldName('CmdtName').EditValue:=DM.C_Khxs_Public.FieldByName('商品名称').AsString;
  cxGrid_Khxs.GetColumnByFieldName('Spec').EditValue:=DM.C_Khxs_Public.FieldByName('规格').AsString;
  cxGrid_Khxs.GetColumnByFieldName('Unit').EditValue:=DM.C_Khxs_Public.FieldByName('单位').AsString;
  cxGrid_Khxs.GetColumnByFieldName('Qty').EditValue:='1';
  cxGrid_Khxs.GetColumnByFieldName('Price').EditValue:=DM.C_Khxs_Public.FieldByName('批发价').AsString;
  DM.C_Khxs_Public.Prior;
end;出现的问题:
一、不是按我所选中的记录增加到表;
二、不是按所选中顺序的记录增加到表;
请各位大哥赐教;谢谢