private void MoveManyRecords(DataGridView dtL, DataGridView dtR, int iColToCheck) { if (dtL.CurrentCell == null) return; int iCurrentRowIndex = 0, i = 0; int iLastRow = 0; iCurrentRowIndex = dtL.CurrentCell.RowIndex; string strColToCheckValue = dtL[iColToCheck, iCurrentRowIndex].Value.ToString(); int j = 0; while (j < dtL.Rows.Count) { if (dtL[iColToCheck, j].Value.ToString().Equals(strColToCheckValue)) { dtR.Rows.Add(); iLastRow = dtR.Rows.Count - 1; for (i = 0; i < dtL.Columns.Count; i++) { dtR[i, iLastRow].Value = dtL[i, j].Value; } dtR.Rows[iLastRow].Selected = true; dtR.CurrentCell = dtR.Rows[iLastRow].Cells[1]; dtL.Rows.RemoveAt(j); } else { j++; } } }
Twitter Bookmarklet and Tweet This Page Link - Moopz Here's the code javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('src','http://moopz.com/tweetbm.js');document.body.appendChild(e)})())
Comments
Post a Comment