Here are the examples of the csharp api class System.Windows.Forms.DataGridViewRowCollection.Insert(int, int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
0
1. Example
View licensepublic void InsertRow(int i, DataGridViewRow row) { this.view.Rows.Insert(i, row); if (row.Tag != null) { AttachItem(row, row.Tag as SchemaItem); } }
0
2. Example
View licenseinternal protected virtual void SiteNode(TreeGridNode node, int index) { if (index < base.Rows.Count) { base.Rows.Insert(index, node); } else { // for the last item. base.Rows.Add(node); } }
0
3. Example
View licenseinternal protected virtual void SiteNode(TreeGridNode node, int index) { if (index < base.Rows.Count) { base.Rows.Insert(index, node); } else { // for the last item. base.Rows.Add(node); } }
0
4. Example
View licensestatic private void InsertOrUpdate(DataGridView grid, int Id, string[] row) { Contract.Requires(grid != null); int index = 0; if (TryFindProcInRows(grid, Id.ToString(), out index)) { var rowIsSelected = grid.CurrentRow.Index == index; grid.Rows.RemoveAt(index); grid.Rows.Insert(index, row); if (rowIsSelected) { // TODO: how do we set a row? } } else { grid.Rows.Insert(0, row); } }