System.Windows.Forms.DataGridViewRowCollection.Add(params object[])

Here are the examples of the csharp api class System.Windows.Forms.DataGridViewRowCollection.Add(params object[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

25 Examples 7

1. Example

Project: vsSolutionBuildEvent
Source File: EventsFrm.cs
View license
protected void addFilterFromSniffer(DataGridView sniffer, DataGridView filter)
        {
            if(sniffer.Rows.Count < 1 || sniffer.SelectedRows.Count < 1 || !filter.Enabled) {
                return;
            }
            DataGridViewRow rc = sniffer.SelectedRows[0];
            filter.Rows.Add(rc.Cells[dgvCESnifferColumnGuid.Name].Value,
                            rc.Cells[dgvCESnifferColumnId.Name].Value, 
                            rc.Cells[dgvCESnifferColumnCustomIn.Name].Value,
                            rc.Cells[dgvCESnifferColumnCustomOut.Name].Value,
                            rc.Cells[dgvCESnifferColumnEnum.Name].Value);
        }

2. Example

View license
private void loadGridData(DataGridView datagrid, List<string> data)
		{
			foreach (var rowvalue in data) 
			{
				datagrid.Rows.Add(rowvalue);
			}
		}

3. Example

Project: tgc-viewer
Source File: TgcUserVars.cs
View license
public void addVar(string name)
        {
            dataGrid.Rows.Add(name, "");
        }

4. Example

Project: EDDiscovery
Source File: UserControlStats.cs
View license
void StatToDGV(DataGridView datagrid,  string title, string[] data, bool showEmptyLines = true)
        {
            object[] rowobj = new object[data.Length + 1];
            bool empty = true;

            rowobj[0] = title;
            for (int ii = 0; ii < data.Length; ii++)
            {
                rowobj[ii + 1] = data[ii];
                if (!data[ii].Equals("0") && !data[ii].Equals("0.00"))
                    empty = false;
            }

            if (showEmptyLines ||empty ==false)
                datagrid.Rows.Add(rowobj);
        }

5. Example

Project: EDDiscovery
Source File: UserControlStats.cs
View license
void StatToDGV(DataGridView datagrid, string title, int[] data)
        {
            object[] rowobj = new object[data.Length + 1];

            rowobj[0] = title;
            for (int ii = 0; ii < data.Length; ii++)
                rowobj[ii + 1] = data[ii].ToString();

            datagrid.Rows.Add(rowobj);
        }

6. Example

Project: OsEngine
Source File: AlertMessageManager.cs
View license
private static void CreateGrid()
        {
            _grid = new DataGridView();

            _gri/n ..... /n //View Source file for more details /n }

7. Example

View license
private void CreateTable()
        {
            _grid = new DataGridView();

            _grid.Allo/n ..... /n //View Source file for more details /n }

8. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void CreateTableTabsSimple()
        {
            _gridTableTabsSimple = new DataGridView()/n ..... /n //View Source file for more details /n }

9. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void CreateTableOptimizeFazes()
        {
            _gridFazes = new DataGridView();

    /n ..... /n //View Source file for more details /n }

10. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void CreateTableParametrs()
        {
            _gridParametrs = new DataGridView();

    /n ..... /n //View Source file for more details /n }

11. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void CreateTableFazes()
        {
            _gridFazesEnd = new DataGridView();

         /n ..... /n //View Source file for more details /n }

12. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void CreateTableResults()
        {
            _gridResults = new DataGridView();

        /n ..... /n //View Source file for more details /n }

13. Example

View license
private void CreateTable()
        {
            _securitiesNamesGrid = new DataGridView();

       /n ..... /n //View Source file for more details /n }

14. Example

Project: pgina
Source File: ConfigurationUI.cs
View license
private void AddToOrderList(IPluginBase plug, DataGridView dgv)
        {
            if (!viewContainsPlugin(dgv, plug.Uuid.ToString()))
            {
                dgv.Rows.Add(new object[] { plug.Uuid.ToString(), plug.Name });
            }
        }

15. Example

Project: lessmsi
Source File: MainForm.cs
View license
public void SetTableViewGridDataSource(IEnumerable<object[]> values)
		{
			msiTableGrid.Rows.Clear();
			foreach (var row in values)
			{
				msiTableGrid.Rows.Add(row);
			}
		}

16. Example

View license
private void AddRow(PlayerChangeType type,
                            DataGridView table,
                            IDictionary<int, PlayerChangeType> dic,
                            bool addLock = true)
        {
            string key = EnumHelper.GetName(type);
            int index = addLock ? table.Rows.Add(key, 0, false) : table.Rows.Add(key, 0);
            dic.Add(index, type);
            Translation.AddTranslationAction(key, s => table.Rows[index].Cells[0].Value = s);
            PlayerParameters.Add(type, table.Rows[index]);
        }

17. Example

View license
private void AddRow(MaidChangeType type,
                            DataGridView table,
                            IDictionary<int, MaidChangeType> dic,
                            bool addLock = true)
        {
            string key = EnumHelper.GetName(type);
            int index = addLock ? table.Rows.Add(key, 0, false) : table.Rows.Add(key, 0);
            dic.Add(index, type);
            Translation.AddTranslationAction(key, s => table.Rows[index].Cells[0].Value = s);
            MaidParameters.Add(type, table.Rows[index]);
        }

18. Example

Project: OsEngine
Source File: MarketDepthPainter.cs
View license
public void CreateGlass()
        {
            try
            {
                _glassBox = new Da/n ..... /n //View Source file for more details /n }

19. Example

Project: GerberTools
Source File: LayerList.cs
View license
public void UpdateLoadedStuff()
        {
            dataGridView1.Rows.Clear();
            foreach(var a in Document.Gerbers)
            {
                List<string> V = new List<string>();
                V.Add(a.visible ? "1" : "0");
                V.Add(a.Color.ToArgb().ToString());
                V.Add(Path.GetFileName(a.File.Name));
                V.Add(a.File.Layer.ToString());
                V.Add(a.File.Side.ToString());

                dataGridView1.Rows.Add(V.ToArray());
            };
        }

20. Example

View license
private void PopulateClaimsGrid(IDictionary<string, object> dictionary, DataGridView grid)
        {            
            foreach (string key in dictionary.Keys)
            {
                switch (key)
                {
                    case "nbf":
                    case "exp":
                        double d = double.Parse(dictionary[key].ToString());
                        DateTime dt = new DateTime(1970, 1, 1).AddSeconds(d);
                        grid.Rows.Add(key, dt);
                        break;
                    case "actortoken":
                        //actortoken is a JsonWebToken type
                        JsonWebToken token = (JsonWebToken)dictionary[key];
                        string formatted = string.Format("{0}.{1}.{2}", token.Header, token.Body, token.Signature);

                        grid.Rows.Add(key, formatted);
                        
                        //Show the actor token in the second data grid view
                        dataGridView2.Visible = true;
                        PopulateClaimsGrid(token.BodyClaims, dataGridView2);
                        break;
                    default:
                        grid.Rows.Add(key, dictionary[key]);
                        break;
                }

            }
        }

21. Example

Project: ContrAlto
Source File: Debugger.cs
View license
public void LoadSourceCode(MicrocodeBank bank, string path)
        {
            if (path == null)
            {
                throw new ArgumentNullException(path, "Microcode path must be specified.");
            }

            DataGridView view = bank == MicrocodeBank.ROM0 ? _rom0SourceViewer : _rom1SourceViewer;

            using (StreamReader sr = new StreamReader(path))
            {
                while (!sr.EndOfStream)
                {
                    string line = sr.ReadLine();

                    SourceLine src = new SourceLine(line);

                    int i = view.Rows.Add(
                        false,  // breakpoint
                        GetTextForTask(src.Task),
                        src.Address,
                        src.Text);

                    // Give the row a color based on the task
                    view.Rows[i].DefaultCellStyle.BackColor = GetColorForTask(src.Task);

                    // Tag the row based on the PROM address (if any) to make it easy to find.
                    if (!String.IsNullOrEmpty(src.Address))
                    {
                        view.Rows[i].Tag = Convert.ToUInt16(src.Address, 8);
                    }
                }
            }

            // Ensure the UI view gets refreshed to display the current MPC source
            Refresh();
        }

22. Example

Project: Urbanization
Source File: EvaluationForm.cs
View license
private static void AddLabelValue(string label, string value, DataGridView gridView)
        {
            gridView.BeginInvoke(new MethodInvoker(() =>
            {
                var match = gridView.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells[0].Value.ToString() == label);
                if (match != null)
                {
                    match.Cells[1].Value = value;
                    gridView.UpdateCellValue(1, gridView.Rows.IndexOf(match));
                }
                else
                {
                    gridView.Rows.Add(label, value);
                }
            }));
        }

23. Example

View license
private void fill(DataGridView grid, string filter = null)
        {
            if(!String.IsNullOrWhiteSpace(filter)) {
                filter = filter.ToLower();
            }

            grid.SuspendLayout();
            grid.Rows.Clear();
            foreach(EnvDTE.Command cmd in _commands)
            {
                if(String.IsNullOrWhiteSpace(cmd.Name) || (filter != null && !cmd.Name.ToLower().Contains(filter))) {
                    continue;
                }
                grid.Rows.Add(cmd.Name);
            }
            grid.ResumeLayout();
            labelPropCount.Text = grid.Rows.Count.ToString();
        }

24. Example

Project: Troschuetz.Random
Source File: FormMain.cs
View license
private void ButtonTestGenerators_Click(object sender, EventArgs e)
        {
            this.dataG/n ..... /n //View Source file for more details /n }

25. Example

Project: Troschuetz.Random
Source File: FormMain.cs
View license
void ButtonTestGenerators_Click(object sender, EventArgs e)
        {
            dataGridViewGenera/n ..... /n //View Source file for more details /n }