Here are the examples of the csharp api class System.Windows.Forms.DataGridViewRowCollection.AddRange(params System.Windows.Forms.DataGridViewRow[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
7 Examples
0
1. Example
View licenseprivate void DisplayData() { var artifacts = (TLArtifactsCollection)Data; List<DataGridViewRow> rows = new List<DataGridViewRow>(artifacts.Count); foreach (TLArtifact art in artifacts.Values) { DataGridViewRow row = new DataGridViewRow(); row.CreateCells(artifactsGrid, art.Id, art.Text); rows.Add(row); } artifactsGrid.Rows.AddRange(rows.ToArray()); }
0
2. Example
View licenseprivate void ReloadSecurityTable() { if (ComboBoxClass.SelectedItem == null) { return; } _grid.Rows.Clear(); List<DataGridViewRow> rows = new List<DataGridViewRow>(); for (int i = 0; _securities != null && i < _securities.Count; i++) { if (ComboBoxClass.SelectedItem.ToString() != "All" && _securities[i].NameClass != ComboBoxClass.SelectedItem.ToString()) { continue; } if (_securities[i].NameFull== null || _securities[i].NameFull[0] == '\'' && _securities[i].NameFull[1] == '\'' && _securities[i].NameFull.Length == 2) { continue; } DataGridViewRow row = new DataGridViewRow(); row.Cells.Add(new DataGridViewTextBoxCell()); row.Cells[0].Value = _securities[i].Name; row.Cells.Add(new DataGridViewTextBoxCell()); row.Cells[1].Value = _securities[i].NameFull; rows.Add(row); } _grid.Rows.AddRange(rows.ToArray()); }
0
3. Example
View licenseprivate void deleteButton_Click(object sender, EventArgs e) { dgv.ColumnHeaderMouseClick -= dgv_ColumnHeaderMouseClick; filterTextBox.Text = ""; dgv.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(dgv_ColumnHeaderMouseClick); List<DataGridViewRow> rows = new List<DataGridViewRow>(); foreach (DataGridViewRow row in dgv.Rows) { rows.Add(row); } dgv.SuspendDrawing(); dgv.Rows.Clear(); foreach (DataGridViewRow row in rows) row.Visible = true; dgv.Rows.AddRange(rows.ToArray()); dgv.ResumeDrawing(); popup.Hide(); }
0
4. Example
View licensepublic void setData(oFunction functionBase, oSingleData measuredData) { this.fu/n ..... /n //View Source file for more details /n }
0
5. Example
View licenseprivate void filterTextBox_TextChanged(object sender, EventArgs e) { // Unsubscribe from event while filter is working //filterTextBox.TextChanged -= filterTextBox_TextChanged; List<DataGridViewRow> rows = new List<DataGridViewRow>(); foreach (DataGridViewRow row in dgv.Rows) { rows.Add(row); } dgv.SuspendDrawing(); dgv.Rows.Clear(); foreach (DataGridViewRow row in rows) { row.Visible = false; if (((string)row.Cells[colIndex].Value).StartsWith(filterTextBox.Text, StringComparison.CurrentCultureIgnoreCase) || ((string)row.Cells[colIndex].Value).Contains(filterTextBox.Text.ToLower())) { row.Visible = true; } } dgv.Rows.AddRange(rows.ToArray()); dgv.ResumeDrawing(); //filterTextBox.TextChanged +=new EventHandler(filterTextBox_TextChanged); }
0
6. Example
View licenseprivate void showHideDifferencesToolStripMenuItem_Click(object sender, EventArgs e) { /n ..... /n //View Source file for more details /n }
0
7. Example
View licensepublic static void FilterGridView(DataGridView vw, string searchstr) { vw.Suspen/n ..... /n //View Source file for more details /n }