System.Windows.Forms.DataGridViewRowCollection.Clear()

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

52 Examples 7

1. Example

Project: tgc-viewer
Source File: TgcUserVars.cs
View license
public void ClearVars()
        {
            dataGrid.Rows.Clear();
        }

2. Example

Project: OsEngine
Source File: PositionController.cs
View license
private void ClearPositionsGrid()
        {
            if (_gridOpenDeal.InvokeRequired)
            {
                _gridOpenDeal.Invoke(new Action(ClearPositionsGrid));
                return;
            }

            _gridOpenDeal.Rows.Clear();
            _gridCloseDeal.Rows.Clear();
        }

3. Example

Project: ares
Source File: RasterGridView.cs
View license
public void Clear()
        {
            Rows.Clear();
            Columns.Clear();
        }

4. Example

Project: pgina
Source File: ConfigurationUI.cs
View license
private void LoadPluginOrderListFromReg<T>(DataGridView grid) where T : class, IPluginBase
        {
            grid.Rows.Clear();
            List<T> plugins = PluginLoader.GetOrderedPluginsOfType<T>();
            foreach (IPluginBase plug in plugins)
            {
                AddToOrderList(plug, grid);
            }
        }

5. 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);
			}
		}

6. Example

Project: tcp-gecko-dotnet
Source File: MemSearch.cs
View license
public void Reset()
        {
            NewSearch = true;
            InitialSearch = false;
            nxButton.Enabled = false;
            prvButton.Enabled = false;
            resLab.Text = "";
            //resList.Clear();
            resultAddressList.Clear();
            undoList.Clear();
            gView.Rows.Clear();
            if (newDump != null)
            {
                //newDump.dumpStream.Close();
                //newDump.dumpStream.Dispose();
                newDump = null;
            }
            if (oldDump != null)
            {
                //oldDump.dumpStream.Close();
                //oldDump.dumpStream.Dispose();
                oldDump = null;
            }
            if (undoDump != null)
            {
                //undoDump.dumpStream.Close();
                //undoDump.dumpStream.Dispose();
                undoDump = null;
            }

            dumpNum = 0;
        }

7. Example

Project: tcp-gecko-dotnet
Source File: watchlist.cs
View license
public void Clear()
        {
            addressWatchList.Clear();
            watchOut.Rows.Clear();
        }

8. Example

Project: ACT.TPMonitor
Source File: ACTTabpageControl.cs
View license
private void SetColorSetting()
        {
            dataGridViewColor.Rows.Clear();
            string[] rows = textBoxColors.Text.Split('|');
            for (int i = 0; i < rows.Length; i++)
            {
                dataGridViewColor.Rows.Insert(i, rows[i].Split(':'));
            }
        }

9. Example

Project: OsEngine
Source File: JournalUi.xaml.cs
View license
private void PaintOpenPositionGrid(List<Position> positionsAll)
        {
            _openPositionGrid.Rows.Clear();

            for (int i = 0; i < positionsAll.Count; i++)
            {
                if (positionsAll[i].State != PositionStateType.Done)
                {
                    _openPositionGrid.Rows.Insert(0, GetRow(positionsAll[i]));
                }
            }
        }

10. Example

Project: OsEngine
Source File: JournalUi.xaml.cs
View license
private void PaintClosePositionGrid(List<Position> positionsAll)
        {
            _closePositionGrid.Rows.Clear();

            for (int i = 0; i < positionsAll.Count; i++)
            {
                if (positionsAll[i].State == PositionStateType.Done)
                {
                    _closePositionGrid.Rows.Insert(0, GetRow(positionsAll[i]));
                }
            }
        }

11. Example

View license
private void LoadSecOnTable()
        {
            if (!Host.CheckAccess())
            {
                Host.Dispatcher.Invoke(new Action(LoadSecOnTable));
                return;
            }

            _grid.Rows.Clear();

            if (SecToSubscrible == null ||
                SecToSubscrible.Count == 0)
            {
                return;
            }

            for (int i = 0; SecToSubscrible != null && SecToSubscrible.Count != 0 && i < SecToSubscrible.Count; i++)
            {

                DataGridViewRow nRow = new DataGridViewRow();

                nRow.Cells.Add(new DataGridViewTextBoxCell());
                nRow.Cells[0].Value = SecToSubscrible[i].Symbol;

                nRow.Cells.Add(new DataGridViewTextBoxCell());
                nRow.Cells[1].Value = SecToSubscrible[i].Exchange;

                nRow.Cells.Add(new DataGridViewTextBoxCell());
                nRow.Cells[2].Value = SecToSubscrible[i].SecType;

                nRow.Cells.Add(new DataGridViewTextBoxCell());
                nRow.Cells[3].Value = SecToSubscrible[i].LocalSymbol;

                nRow.Cells.Add(new DataGridViewTextBoxCell());
                nRow.Cells[4].Value = SecToSubscrible[i].PrimaryExch;

                _grid.Rows.Add(nRow);
            }
        }

12. Example

Project: OsEngine
Source File: OsDataSetUi.xaml.cs
View license
private void ReloadSecuritiesOnTable()
        {
            _grid.Rows.Clear();
            List<string> names = _set.SecuritiesNames;

            for (int i = 0;names != null &&  i < names.Count; i++)
            {
                DataGridViewRow row = new DataGridViewRow();
                row.Cells.Add(new DataGridViewTextBoxCell());
                row.Cells[0].Value = names[i];

                _grid.Rows.Insert(0, row);
            }
        }

13. Example

Project: SQLMonitor
Source File: OutlookGrid.cs
View license
private void FillGrid(IOutlookGridGroup groupingStyle)
        {

            ArrayList list;
      /n ..... /n //View Source file for more details /n }

14. Example

View license
private void PaintGrid()
        {
            if (_myGridView.InvokeRequired)
            {
       /n ..... /n //View Source file for more details /n }

15. Example

Project: OsEngine
Source File: TesterServerUi.xaml.cs
View license
private void PaintGrid()
        {
            if (_myGridView.InvokeRequired)
            {
       /n ..... /n //View Source file for more details /n }

16. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void PaintTableTabsIndex()
        {
            if (_gridTableTabsSimple.InvokeRequired)
  /n ..... /n //View Source file for more details /n }

17. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void PaintTableOptimizeFazes()
        {
            if (_gridFazes.InvokeRequired)
            {
                _gridFazes.Invoke(new Action(PaintTableOptimizeFazes));
                return;
            }

            _gridFazes.Rows.Clear();

            List<OptimizerFaze> fazes = _master.Fazes;

            if (fazes == null ||
                fazes.Count == 0)
            {
                return;
            }

            for (int i = 0; i < fazes.Count; i++)
            {
                DataGridViewRow row = new DataGridViewRow();

                row.Cells.Add(new DataGridViewTextBoxCell());
                row.Cells[0].Value = i+1;

                DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();
                cell.Value = fazes[i].TypeFaze;
                row.Cells.Add(cell);

                DataGridViewTextBoxCell cell2 = new DataGridViewTextBoxCell();
                cell2.Value = fazes[i].TimeStart.ToShortDateString();
                row.Cells.Add(cell2);

                DataGridViewTextBoxCell cell3 = new DataGridViewTextBoxCell();
                cell3.Value = fazes[i].TimeEnd.ToShortDateString();
                row.Cells.Add(cell3);

                DataGridViewTextBoxCell cell4 = new DataGridViewTextBoxCell();
                cell4.Value = fazes[i].Days;
                row.Cells.Add(cell4);

                _gridFazes.Rows.Add(row);
            }
        }

18. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void PaintTableFazes()
        {
            if (_gridFazesEnd.InvokeRequired)
            {
                _gridFazesEnd.Invoke(new Action(PaintTableFazes));
                return;
            }

            _gridFazesEnd.Rows.Clear();

            List<OptimizerFaze> fazes = _master.Fazes;

            if (fazes == null ||
                fazes.Count == 0)
            {
                return;
            }

            for (int i = 0; i < fazes.Count; i++)
            {
                DataGridViewRow row = new DataGridViewRow();

                row.Cells.Add(new DataGridViewTextBoxCell());
                row.Cells[0].Value = i + 1;

                DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();
                cell.Value = fazes[i].TypeFaze;
                row.Cells.Add(cell);

                DataGridViewTextBoxCell cell2 = new DataGridViewTextBoxCell();
                cell2.Value = fazes[i].TimeStart.ToShortDateString();
                row.Cells.Add(cell2);

                DataGridViewTextBoxCell cell3 = new DataGridViewTextBoxCell();
                cell3.Value = fazes[i].TimeEnd.ToShortDateString();
                row.Cells.Add(cell3);

                DataGridViewTextBoxCell cell4 = new DataGridViewTextBoxCell();
                cell4.Value = fazes[i].Days;
                row.Cells.Add(cell4);

                _gridFazesEnd.Rows.Add(row);
            }
        }

19. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void PaintTableResults()
        {
            if (_gridResults.InvokeRequired)
            /n ..... /n //View Source file for more details /n }

20. Example

View license
private void ReloadSecurityTable()
        {
            if (_spread.Tabs == null)
            {
                return;
            }

            _grid1.Rows.Clear();

            for (int i = 0; i < _spread.Tabs.Count; i++)
            {
                DataGridViewRow row = new DataGridViewRow();

                row.Cells.Add((new DataGridViewTextBoxCell()));
                row.Cells[0].Value = "A"+i;


                row.Cells.Add(new DataGridViewTextBoxCell());
                if (string.IsNullOrWhiteSpace(_spread.Tabs[i].NamePaper))
                {
                    row.Cells[1].Value = "?????";

                }
                else
                {

                    row.Cells[1].Value = _spread.Tabs[i].NamePaper;

                }
                _grid1.Rows.Add(row);
            }
        }

21. Example

Project: OsEngine
Source File: GlobalPosition.cs
View license
public void ClearJournals()
        {
            try
            {
                if (_grid.InvokeRequired)
                {
                    _grid.Invoke(new Action(ClearJournals));
                    return;
                }

                for (int i = 0; _journals != null && i < _journals.Count; i++)
                { // ???????????? ?? ?????????? ???????
                    _journals[i].PositionChangeEvent -= journal_PositionChangeEvent;
                }

                _journals = null;
                _grid.Rows.Clear();
            }
            catch (Exception error)
            {
                SendNewLogMessage(error.ToString(), LogMessageType.Error);
            }
        }

22. Example

Project: llilum
Source File: StackTraceView.cs
View license
private void UpdateUI()
        {
            StackFrame currentStackFrame = m_owner.SelectedStackFr/n ..... /n //View Source file for more details /n }

23. Example

Project: llilum
Source File: ThreadsView.cs
View license
public Hst.Forms.HostingSite.NotificationResponse ExecutionStateChangeNotification( Hst.Forms.Hostin/n ..... /n //View Source file for more details /n }

24. Example

Project: QTTabBar
Source File: FileHashComputerForm.cs
View license
private void ClearRows() {
            dgvHash.SuspendLayout();
            dgvHash.Rows.Clear();
            dgvHash.ResumeLayout();
            colorIndex = 0;
            dicResult.Clear();
            cMatched_Prv = cErr_Prv = 0;
        }

25. Example

Project: OsEngine
Source File: AlertMaster.cs
View license
private void PaintGridBox()
        {
            try
            {
                if (_isPaint == false)
                {
                    return;
                }

                GridViewBox.Rows.Clear();

                for (int i = 0; _alertArray != null && _alertArray.Count != 0 && i < _alertArray.Count; i++)
                {

                    DataGridViewRow nRow = new DataGridViewRow();

                    nRow.Cells.Add(new DataGridViewTextBoxCell());
                    nRow.Cells[0].Value = i;

                    nRow.Cells.Add(new DataGridViewTextBoxCell());
                    nRow.Cells[1].Value = _alertArray[i].TypeAlert;

                    nRow.Cells.Add(new DataGridViewTextBoxCell());
                    if (_alertArray[i].IsOn)
                    {
                        nRow.Cells[2].Value = "On"; 
                    }
                    else
                    {
                        nRow.Cells[2].Value = "Off"; 
                    }
                   

                    GridViewBox.Rows.Add(nRow);
                }
            }
            catch (Exception error)
            {
                SendNewMessage(error.ToString(), LogMessageType.Error);
            }
        }

26. Example

View license
private void PaintOrders()
        {
            try
            {
                if (_positionHost/n ..... /n //View Source file for more details /n }

27. Example

Project: OsEngine
Source File: NewSecurityUi.xaml.cs
View license
private 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());
        }

28. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void PaintTableParametrs()
        {
            if (_gridParametrs.InvokeRequired)
        /n ..... /n //View Source file for more details /n }

29. Example

Project: XmlNotepad
Source File: FormSchemas.cs
View license
void LoadSchemas() {
            if (this.cache == null) {
                if (this.Site != null) {
                    this.cache = (SchemaCache)this.Site.GetService(typeof(SchemaCache));
                }
            }
            items.Clear();
            DataGridViewRowCollection col = this.dataGridView1.Rows;
            col.Clear();
            if (this.cache != null) {
                foreach (CacheEntry e in this.cache.GetSchemas()) {
                    Uri uri = e.Location;
                    string filename = uri.IsFile ? uri.LocalPath : uri.AbsoluteUri;
                    SchemaItem item = new SchemaItem(e.Disabled, e.TargetNamespace, filename);
                    items.Add(item);
                    int i = col.Add(item.Values);
                    col[i].Tag = item;
                }
            }
        }

30. Example

View license
private 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();
        }

31. 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());
            };
        }

32. Example

Project: FunctionHacker
Source File: DataGridViewCall.cs
View license
public void setData(oFunction functionBase, oSingleData measuredData)
        {

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

33. Example

View license
private void PaintTable()
        {
            _grid.Rows.Clear();

            for (int i = 0; i &/n ..... /n //View Source file for more details /n }

34. Example

View license
private void RePaintPortfolio()
        {
            try
            {
                if (_positionHost.Child == null)
                {
                    return;
                }

                if (!_positionHost.CheckAccess())
                {
                    _positionHost.Dispatcher.Invoke(RePaintPortfolio);
                    return;
                }

                // ??????? ?????? ?????? ? ?????

                _gridPosition.Rows.Clear();

                if (_portfolios == null)
                {
                    return;
                }

                // ?????????? ???????? ?? ??????????
                for (int i = 0; _portfolios != null && i < _portfolios.Count; i++)
                {
                    PaintPortfolio(_portfolios[i]);
                }
            }
            catch (Exception error)
            {
                SendNewLogMessage(error.ToString(), LogMessageType.Error);
            }
        }

35. Example

Project: OsEngine
Source File: ServerMasterUi.xaml.cs
View license
private void RePaintSourceGrid()
        {
            if (_gridSources.InvokeRequired)
            /n ..... /n //View Source file for more details /n }

36. Example

View license
private void PaintTable()
        {
            if (_securitiesNamesGrid.InvokeRequired)
           /n ..... /n //View Source file for more details /n }

37. Example

Project: llilum
Source File: BreakpointsView.cs
View license
public void UpdateUI()
        {
            ProcessorHost svc; m_owner.Host.GetHostingService( out /n ..... /n //View Source file for more details /n }

38. Example

View license
private 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);
        }

39. Example

Project: OsEngine
Source File: OsDataMaster.cs
View license
private void RePaintSourceGrid()
        {
            if (_gridSources.InvokeRequired)
            /n ..... /n //View Source file for more details /n }

40. Example

Project: OsEngine
Source File: OsDataMaster.cs
View license
private void RePaintSetGrid()
        {
            try
            {
                if (_gridset.I/n ..... /n //View Source file for more details /n }

41. Example

Project: OsEngine
Source File: OptimizerUi.xaml.cs
View license
private void PaintTableTabsSimple()
        {
            if (_gridTableTabsSimple.InvokeRequired)
 /n ..... /n //View Source file for more details /n }

42. 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();
        }

43. Example

Project: Tibialyzer
Source File: SelectProcessForm.cs
View license
private void refreshProcesses() {
            processView.Rows.Clear();
            processMap.Clear();
            Process[] currentProcesses = Process.GetProcesses();
            foreach (Process p in currentProcesses) {
                Image image = null;
                if (p.MainWindowTitle != null && p.MainWindowTitle.Length > 0) {
                    try {
                        Icon ico = Icon.ExtractAssociatedIcon(p.MainModule.FileName);
                        image = ico.ToBitmap();
                    } catch {
                    }
                }

                var row = new DataGridViewRow();
                var processIcon = new DataGridViewImageCell();
                processIcon.Value = image != null ? image : StyleManager.GetImage("executable.png");
                var name = new DataGridViewTextBoxCell();
                name.Value = p.ProcessName;
                var title = new DataGridViewTextBoxCell();
                title.Value = p.MainWindowTitle;
                var id = new DataGridViewTextBoxCell();
                id.Value = p.Id;
                row.Cells.Add(processIcon);
                row.Cells.Add(name);
                row.Cells.Add(title);
                row.Cells.Add(id);
                row.Height = 48;
                row.ReadOnly = true;
                processMap.Add(row, p);
                processView.Rows.Add(row);
            }
        }

44. Example

Project: Ego-Engine-Modding
Source File: Form1.cs
View license
private void showHideDifferencesToolStripMenuItem_Click(object sender, EventArgs e)
        {
      /n ..... /n //View Source file for more details /n }

45. Example

Project: tcp-gecko-dotnet
Source File: MemSearch.cs
View license
private void PrintPageAlt()
        {
            // Make sure we don't go before the first page...
/n ..... /n //View Source file for more details /n }

46. Example

Project: EDDiscovery
Source File: TravelHistoryFilter.cs
View license
public static void FilterGridView(DataGridView vw, string searchstr)
        {
            vw.Suspen/n ..... /n //View Source file for more details /n }

47. Example

Project: KeeThief
Source File: EcasUtil.cs
View license
public static void ParametersToDataGridView(DataGridView dg,
			IEcasParameterized p, IEcasObject ob/n ..... /n //View Source file for more details /n }

48. 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 }

49. 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 }

50. Example

Project: vsSolutionBuildEvent
Source File: Events.cs
View license
public void fillComponents(DataGridView grid)
        {
            grid.Rows.Clear();
            f/n ..... /n //View Source file for more details /n }