foreach (DataRowView r in lstLotesTX.SelectedItems) { MiVariable = MiVariable+ r.Row[0].ToString() + "', '"; }