System.Windows.Forms.DataGridViewRowCollection.Add(int)

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

23 Examples 7

1. Example

Project: My-FyiReporting
Source File: FiltersCtl.cs
View license
private void bValueExpr_Click(object sender, System.EventArgs e)
		{
            if (dgFilters.CurrentCell == null)
                dgFilters.Rows.Add("", "Equal", "");
            DataGridViewCell dgc = dgFilters.CurrentCell;
			int cc = dgc.ColumnIndex;
			string cv = dgc.Value as string;

			if (cc == 1)
			{	// This is the FilterOperator
				DialogFilterOperator fo = new DialogFilterOperator(cv);
                try
                {
                    DialogResult dlgr = fo.ShowDialog();
                    if (dlgr == DialogResult.OK)
                        dgc.Value = fo.Operator;
                }
                finally
                {
                    fo.Dispose();
                }
			}
			else
			{
				DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _FilterParent, false);
                try
                {
                    DialogResult dlgr = ee.ShowDialog();
                    if (dlgr == DialogResult.OK)
                        dgc.Value = ee.Expression;
                }
                finally
                {
                    ee.Dispose();
                }
			}
		}

2. Example

Project: My-FyiReporting
Source File: SortingCtl.cs
View license
private void bValueExpr_Click(object sender, System.EventArgs e)
		{
            if (dgSorting.CurrentCell == null)
                dgSorting.Rows.Add("",true);

            DataGridViewCell dgc = dgSorting.CurrentCell;
            int cc = dgc.ColumnIndex;

            // >>>>>>>>>> 
            // the only column that should be edited is the first one ( "Sort expression" ) 
            if (cc != 0) 
                dgc = dgSorting.CurrentCell = dgSorting.CurrentRow.Cells[0];
            // <<<<<<<<<< 
            string cv = dgc.Value as string;

            using (DialogExprEditor ee = new DialogExprEditor(_Draw, cv, _SortingParent, false))
            {
                DialogResult dlgr = ee.ShowDialog();
                if (dlgr == DialogResult.OK)
                    dgc.Value = ee.Expression;
            }
		}

3. Example

Project: vsSolutionBuildEvent
Source File: Events.cs
View license
protected void fillComponents(ComponentAttribute attr, bool enabled, string className, DataGridView grid)
        {
            grid.Rows.Add(DomIcon.package, enabled, attr.Name, className, attr.Description);

            if(attr.Aliases == null) {
                return;
            }
            foreach(string alias in attr.Aliases)
            {
                int idx = grid.Rows.Add(DomIcon.alias, enabled, alias, className, String.Format("Alias to '{0}' Component", attr.Name));

                grid.Rows[idx].ReadOnly = true;
                grid.Rows[idx].Cells[1] = new DataGridViewCheckBoxCell() { Style = { 
                                                                               ForeColor = System.Drawing.Color.Transparent, 
                                                                               SelectionForeColor = System.Drawing.Color.Transparent }};
            }
        }

4. Example

Project: My-FyiReporting
Source File: SortingCtl.cs
View license
private void InitValues()
		{
			// Initialize the DataGrid columns
			dgtbExpr = new DataGridViewTextBoxColumn();
		
			dgtbDir = new DataGridViewCheckBoxColumn();

            dgSorting.Columns.Add(dgtbExpr);
            dgSorting.Columns.Add(dgtbDir);

			// 
			// dgtbExpr
			// 
			
			dgtbExpr.HeaderText = "Sort Expression";
            dgtbExpr.Width = 240;
			// Get the parent's dataset name
//			string dataSetName = _Draw.GetDataSetNameValue(_SortingParent);
//
//			string[] fields = _Draw.GetFields(dataSetName, true);
//			if (fields != null)
//				dgtbExpr.CB.Items.AddRange(fields);
			// 
			// dgtbDir
			// 
			dgtbDir.HeaderText = "Sort Ascending";
			dgtbDir.Width = 90;

			XmlNode sorts = _Draw.GetNamedChildNode(_SortingParent, "Sorting");

			if (sorts != null)
			foreach (XmlNode sNode in sorts.ChildNodes)
			{
				if (sNode.NodeType != XmlNodeType.Element || 
						sNode.Name != "SortBy")
					continue;
                dgSorting.Rows.Add(_Draw.GetElementValue(sNode, "SortExpression", ""),
				   _Draw.GetElementValue(sNode, "Direction", "Ascending") == "Ascending");
			}

            if (dgSorting.Rows.Count == 0)
                dgSorting.Rows.Add("", true);
        }

5. Example

View license
private void PrepareDataGridView(DataGridView dataGridView, string jsonString)
        {
           /n ..... /n //View Source file for more details /n }

6. Example

Project: XmlNotepad
Source File: FormSchemas.cs
View license
public int InsertRow(bool disabled, string targetNamespace, string filename) {
            SchemaItem item = new SchemaItem(disabled, targetNamespace, filename);
            int i = this.view.Rows.Add(item.Values);
            DataGridViewRow row = this.view.Rows[i];
            AttachItem(row, item);
            return i;
        }

7. Example

Project: Analysis-Services
Source File: TreeGridView.cs
View license
internal 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);
			}
		}

8. Example

Project: tcp-gecko-dotnet
Source File: watchlist.cs
View license
public void AddWatch(String name, UInt32[] address, WatchDataSize dataSize)
        {
            String dType;
            switch (dataSize)
            {
                case WatchDataSize.Bit8:
                    dType = "8 bit";
                    break;
                case WatchDataSize.Bit16:
                    dType = "16 bit";
                    break;
                case WatchDataSize.Bit32:
                    dType = "32 bit";
                    break;
                default:
                    dType = "Single";
                    break;
            }
            watchOut.Rows.Add(1);
            int row = watchOut.Rows.Count - 1;            
            watchOut.Rows[row].Cells[0].Value = name;
            watchOut.Rows[row].Cells[1].Value = "????????";
            watchOut.Rows[row].Cells[2].Value = dType;
            watchOut.Rows[row].Cells[3].Value = "????????";

            addressWatchList.Add(new WatchEntry(name, address, dataSize));
        }

9. Example

Project: BismNormalizer
Source File: TreeGridView.cs
View license
internal 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);
			}
		}

10. Example

Project: My-FyiReporting
Source File: FiltersCtl.cs
View license
private void InitValues()
		{
			// Initialize the DataGrid columns

            dgtbFE = new DataGr/n ..... /n //View Source file for more details /n }

11. Example

Project: XmlNotepad
Source File: FormSchemas.cs
View license
public void AddRows(IList<DataGridViewRow> rows) {
            DataGridViewRowCollection col = this.view.Rows;
            foreach (DataGridViewRow row in rows) {
                int i = col.Add(row);
                SchemaItem item = row.Tag as SchemaItem;
                if (item != null) {
                    items.Insert(i, item);
                }
            }
            SelectRows(rows);
        }

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

13. Example

Project: Open-Exam-Suite
Source File: AppDataManager.cs
View license
public static void LoadAppData(DataGridView dataGridView)
        {
            if(Settings.Default.FirstRun)
            {
                var suiteRootFolder = Application.StartupPath;
                var samplesFolder = Path.Combine(suiteRootFolder, "Samples");
                var gmatSample = Path.Combine(samplesFolder, "GMAT Sample.oef");
                var basicScienceSample = Path.Combine(samplesFolder, "Basic Science.oef");
                if(Settings.Default.ExamPaths == null)
                {
                    Settings.Default.ExamPaths = new StringCollection();
                }
                Settings.Default.ExamPaths.Add(gmatSample);
                Settings.Default.ExamPaths.Add(basicScienceSample);
                Settings.Default.FirstRun = false;
                Settings.Default.Save();
            }
            if (Settings.Default.ExamPaths == null) return;
            foreach(var path in Settings.Default.ExamPaths)
            {
                dataGridView.Rows.Add(Path.GetFileNameWithoutExtension(path), path);
            }
        }

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

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

16. 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;
                }
            }
        }

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

18. Example

Project: Ego-Engine-Modding
Source File: Form1.cs
View license
private void setupPage() {
            // Back out if the page has already been SetUp
            if/n ..... /n //View Source file for more details /n }

19. Example

Project: PKHeX
Source File: SAV_Inventory.cs
View license
private DataGridView GetDGV(InventoryPouch pouch)
        {
            // Add DataGrid
            /n ..... /n //View Source file for more details /n }

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

21. Example

Project: SqlNexus
Source File: fmParameters.cs
View license
public static bool GetReportParameters(LocalReport report, ILogger logger)
        {

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

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

23. Example

Project: tcp-gecko-dotnet
Source File: MemViewer.cs
View license
public void Update(bool fast)
        {
            MemoryStream miniDump = new MemoryStream();
    /n ..... /n //View Source file for more details /n }