private void UpdateList() { try { DataTable aDT = ItemsMgmt.SelectAllTouchScreenItems(); if (aDT != null) { if (aDT.Rows.Count > 0) { foreach (DataRow aRow in aDT.Rows) { TeldgView.ClearSelection(); int RowNum = TeldgView.Rows.Add(); TeldgView.Rows[RowNum].Cells["Barcode"].Value = aRow["Barcode"].ToString(); TeldgView.Rows[RowNum].Cells["Description"].Value = aRow["Description"].ToString(); TeldgView.Rows[RowNum].Cells["PricePerUnit"].Value = aRow["SellPrice"].ToString(); TeldgView.Rows[RowNum].Cells["AvalQty"].Value = aRow["Qty"].ToString(); TeldgView.Rows[RowNum].Selected = true; } } } } catch (Exception ex) { MessageBox.Show(MsgTxt.UnexpectedError + "\n IN [UpdateList] \n Exception: \n" + ex.ToString() + "\n" + MsgTxt.FormWillCloseNowTxt, MsgTxt.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error); throw; } }