System.Windows.Forms.DataGridViewRow.CreateCells(System.Windows.Forms.DataGridView, params object[])

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

44 Examples 7

1. Example

Project: EDDiscovery
Source File: UserControlJournalGrid.cs
private void AddNewJournalRow(bool insert, HistoryEntry item)            // second part of add history row, adds item to view.
        {
            string detail = "";
            if (item.EventDescription.Length > 0)
                detail = item.EventDescription;
            if (item.EventDetailedInfo.Length > 0)
                detail += ((detail.Length > 0) ? Environment.NewLine : "") + item.EventDetailedInfo;

            var rw = dataGridViewJournal.RowTemplate.Clone() as DataGridViewRow;
            rw.CreateCells(dataGridViewJournal, EDDiscoveryForm.EDDConfig.DisplayUTC ? item.EventTimeUTC : item.EventTimeLocal, "", item.EventSummary, detail);
            rw.Cells[JournalHistoryColumns.HistoryTag].Tag = item;

            int rownr = 0;

            if (insert)
            {
                dataGridViewJournal.Rows.Insert(rownr, rw);
            }
            else
            {
                rownr = dataGridViewJournal.Rows.Add(rw);
            }   

            rowsbyjournalid[item.Journalid] = dataGridViewJournal.Rows[rownr];
        }

2. Example

Project: EDDiscovery
Source File: UserControlTravelGrid.cs
private void AddNewHistoryRow(bool insert, HistoryEntry item)            // second part of add histo/n ..... /n //View Source file for more details /n }

3. Example

Project: Paket.VisualStudio
Source File: GeneralOptionsControl.cs
private void AddPackageSource(string source, string key)
        {
            var row = (DataGridViewRow)dgvAPIKeys.RowTemplate.Clone();
            row.CreateCells(dgvAPIKeys, source, key);
            dgvAPIKeys.Rows.Add(row);
        }

4. Example

Project: Analysis-Services
Source File: Deployment.cs
private void AddRow(string workItem, string status)
        {
            DataGridViewRow row = (DataGridViewRow)gridProcessing.RowTemplate.Clone();
            row.CreateCells(gridProcessing);
            row.Cells[0].Value = DeployImageList.Images[0];
            row.Cells[1].Value = workItem;
            row.Cells[2].Value = status;
            int rowIndex = gridProcessing.Rows.Add(row);
            gridProcessing.AutoResizeRow(rowIndex, DataGridViewAutoSizeRowMode.AllCells);
        }

5. Example

Project: Clipboarder
Source File: MainForm.cs
public void AddNewImageRow(ImageContent contentToAdd) {
            DataGridViewRow NewRow = new DataGridViewRow();
            NewRow.CreateCells(imageDataGrid);

            NewRow.Cells[0].Value = contentToAdd.index;
            NewRow.Cells[1].Value = contentToAdd.image;
            NewRow.Cells[2].Value = contentToAdd.time;

            //Adjusts height of a row
            NewRow.Height = contentToAdd.image.Height;

            imageDataGrid.Rows.Insert(imageDataGrid.RowCount, NewRow);
            MainTabControl.SelectedIndex = 1;
        }

6. Example

Project: Clipboarder
Source File: MainForm.cs
public void AddNewTextRow(TextContent contentToAdd) {
            DataGridViewRow NewRow = new DataGridViewRow();
            NewRow.CreateCells(textDataGrid);

            NewRow.Cells[0].Value = contentToAdd.index;
            NewRow.Cells[1].Value = contentToAdd.text;
            NewRow.Cells[2].Value = contentToAdd.time;

            textDataGrid.Rows.Insert(textDataGrid.RowCount, NewRow);
            MainTabControl.SelectedIndex = 0;
        }

7. Example

Project: BismNormalizer
Source File: Deployment.cs
private void AddRow(string workItem, string status)
        {
            DataGridViewRow row = (DataGridViewRow)gridProcessing.RowTemplate.Clone();
            row.CreateCells(gridProcessing);
            row.Cells[0].Value = DeployImageList.Images[0];
            row.Cells[1].Value = workItem;
            row.Cells[2].Value = status;
            int rowIndex = gridProcessing.Rows.Add(row);
            gridProcessing.AutoResizeRow(rowIndex, DataGridViewAutoSizeRowMode.AllCells);
        }

8. Example

Project: EDDiscovery
Source File: UserControlRoute.cs
private void AppendData(RoutePlotter.ReturnInfo info)
        {
            BeginInvoke((MethodInvoker)delegate
            {
                DataGridViewRow rw = dataGridViewRoute.RowTemplate.Clone() as DataGridViewRow;
                rw.CreateCells(dataGridViewRoute, 
                        info.name, 
                        double.IsNaN(info.dist) ? "" : info.dist.ToString("N2"),
                        info.pos == null ? "" : info.pos.X.ToString("0.00"),
                        info.pos == null ? "" : info.pos.Y.ToString("0.00"),
                        info.pos == null ? "" : info.pos.Z.ToString("0.00"),
                        double.IsNaN(info.waypointdist) ? "" : info.waypointdist.ToString("0.0"),
                        double.IsNaN(info.deviation) ? "" : info.deviation.ToString("0.0")
                        );

                rw.Tag = info.system;       // may be null if waypoint or not a system
                rw.HeaderCell.Value = info.pos != null ? (dataGridViewRoute.Rows.Count + 1).ToStringInvariant() : "-";
                dataGridViewRoute.Rows.Add(rw);
            });
        }

9. Example

Project: Rosin
Source File: ConfigControl.cs
private void ConfigControl_Load(object sender, EventArgs e)
        {
            List<RuleItem> ruleList = this.oInjection.queryRule();

            this.dataGridView.Rows.Clear();

            foreach (var oRule in ruleList)
            {
                DataGridViewRow dgvr = new DataGridViewRow();
                dgvr.CreateCells(this.dataGridView);
                dgvr.Cells[0].Value = Convert.ToBoolean(oRule.Enabled);
                dgvr.Cells[1].Value = oRule.Type;
                dgvr.Cells[2].Value = oRule.Match;
                dgvr.Cells[3].Value = oRule.Order;
                this.dataGridView.Rows.Add(dgvr);
            }
        }

10. Example

Project: Rosin
Source File: ConfigControl.cs
public void addItem(string type, string rule)
        {
            //??XML
            string order = this.oInjection.addRule(type.ToLower(), rule);

            DataGridViewRow dr = new DataGridViewRow();
            dr.CreateCells(this.dataGridView);
            dr.Cells[0].Value = true;
            dr.Cells[1].Value = type;
            dr.Cells[2].Value = rule;
            dr.Cells[3].Value = order;
            this.dataGridView.Rows.Add(dr);
        }

11. Example

Project: ElectronicObserver
Source File: DialogAlbumShipParameter.cs
private void InitView(int shipID)
		{

			var record = RecordManager.Instance.ShipParameter[shipID];

			if (record == null)
			{
				RecordManager.Instance.ShipParameter[shipID] = record = new ShipParameterRecord.ShipParameterElement();
			}


			var keys = RecordManager.Instance.ShipParameter.RecordHeader.Split(',');
			var values = record.SaveLine().Split(',');

			ParameterView.Rows.Clear();
			var rows = new DataGridViewRow[keys.Length];

			for (int i = 0; i < rows.Length; i++)
			{
				rows[i] = new DataGridViewRow();
				rows[i].CreateCells(ParameterView);
				rows[i].SetValues(keys[i], values[i]);
			}

			rows[0].ReadOnly = rows[1].ReadOnly = true;

			ParameterView.Rows.AddRange(rows);

		}

12. Example

Project: ElectronicObserver
Source File: DialogDevelopmentRecordViewer.cs
private void ButtonRun_Click(object sender, EventArgs e)
		{

			if (Searcher.IsBusy)
			{
				if (M/n ..... /n //View Source file for more details /n }

13. Example

Project: ElectronicObserver
Source File: DialogDropRecordViewer.cs
private void ButtonRun_Click(object sender, EventArgs e)
		{

			if (Searcher.IsBusy)
			{
				if (M/n ..... /n //View Source file for more details /n }

14. Example

Project: ElectronicObserver
Source File: DialogShipGroupFilter.cs
private DataGridViewRow GetExpressionViewRow(ExpressionList exp)
		{
			var row = new DataGridViewRow();
			row.CreateCells(ExpressionView);

			row.SetValues(
				exp.Enabled,
				exp.ExternalAnd,
				exp.Inverse,
				exp.InternalAnd,
				exp.ToString()
				);

			return row;
		}

15. Example

Project: ElectronicObserver
Source File: DialogShipGroupFilter.cs
private DataGridViewRow GetExpressionDetailViewRow(ExpressionData exp)
		{
			var row = new DataGridViewRow();
			row.CreateCells(ExpressionDetailView);

			row.SetValues(
				exp.Enabled,
				exp.LeftOperand,
				exp.RightOperand,
				exp.Operator
				);

			return row;
		}

16. Example

Project: ElectronicObserver
Source File: DialogShipGroupFilter.cs
private void UpdateConstFilterView()
		{

			List<int> values = ConstFilterSelector.SelectedIndex == 0 ? _group.InclusionFilter : _group.ExclusionFilter;

			ConstFilterView.Rows.Clear();

			var rows = new DataGridViewRow[values.Count];
			for (int i = 0; i < rows.Length; i++)
			{
				rows[i] = new DataGridViewRow();
				rows[i].CreateCells(ConstFilterView);

				var ship = KCDatabase.Instance.Ships[values[i]];
				rows[i].SetValues(values[i], ship?.NameWithLevel ?? "(???)");
			}

			ConstFilterView.Rows.AddRange(rows);

		}

17. Example

Project: ElectronicObserver
Source File: DialogShipGroupSortOrder.cs
private void ButtonLeftAll_Click(object sender, EventArgs e)
		{

			var addrows = new DataGridViewRow[DisabledView.Rows.Count];
			int i = 0;

			foreach (DataGridViewRow src in DisabledView.Rows)
			{
				addrows[i] = new DataGridViewRow();
				addrows[i].CreateCells(EnabledView);
				addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value, ListSortDirection.Ascending);
				addrows[i].Cells[EnabledView_Name.Index].Tag = src.Cells[DisabledView_Name.Index].Tag;
				addrows[i].Tag = src.Tag;
				i++;
			}

			DisabledView.Rows.Clear();
			EnabledView.Rows.AddRange(addrows);
			DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);

		}

18. Example

Project: ElectronicObserver
Source File: DialogShipGroupSortOrder.cs
private void ButtonRightAll_Click(object sender, EventArgs e)
		{

			var addrows = new DataGridViewRow[EnabledView.Rows.Count];
			int i = 0;

			foreach (DataGridViewRow src in EnabledView.Rows)
			{
				addrows[i] = new DataGridViewRow();
				addrows[i].CreateCells(DisabledView);
				addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value);
				addrows[i].Cells[DisabledView_Name.Index].Tag = src.Cells[EnabledView_Name.Index].Tag;
				addrows[i].Tag = src.Tag;
				i++;
			}

			EnabledView.Rows.Clear();
			DisabledView.Rows.AddRange(addrows);
			DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);

		}

19. Example

Project: ElectronicObserver
Source File: FormQuest.cs
private void ClearQuestView()
		{

			QuestView.Rows.Clear();

			{
				DataGridViewRow row = new DataGridViewRow();
				row.CreateCells(QuestView);
				row.SetValues(null, null, null, "(???)", null);
				QuestView.Rows.Add(row);
			}

		}

20. Example

Project: Office365APIEditor
Source File: AttachmentViewerForm.cs
private async void AttachmentViewerForm_Load(object sender, EventArgs e)
        {
            Text /n ..... /n //View Source file for more details /n }

21. Example

Project: Office365APIEditor
Source File: FolderViewerForm.cs
private async void GetContactItems()
        {
            try
            {
                var res/n ..... /n //View Source file for more details /n }

22. Example

Project: Office365APIEditor
Source File: FolderViewerForm.cs
private void CreatePropTable2(dynamic itemResult)
        {
            DynamicJson dynamicJsonObject = itemResult;
            
            try
            {
                foreach (KeyValuePair<string, object> item in itemResult)
                {
                    if (!dynamicJsonObject.IsDefined(item.Key))
                    {
                        // Exclude non dynamic props.
                        continue;
                    }

                    DataGridViewRow propRow = new DataGridViewRow();

                    string valueString = (item.Value == null) ? "" : item.Value.ToString();

                    propRow.CreateCells(dataGridView_ItemProps, new object[] { item.Key, valueString, "Dynamic" });

                    if (dataGridView_ItemProps.InvokeRequired)
                    {
                        dataGridView_ItemProps.Invoke(new MethodInvoker(delegate
                        {
                            dataGridView_ItemProps.Rows.Add(propRow);
                        }));
                    }
                    else
                    {
                        dataGridView_ItemProps.Rows.Add(propRow);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Office365APIEditor");
            }
        }

23. Example

Project: Office365APIEditor
Source File: MailboxViewerForm.cs
private async void GetMessageFolderProps(string FolderId, string FolderDisplayName)
        {
      /n ..... /n //View Source file for more details /n }

24. Example

Project: Office365APIEditor
Source File: MailboxViewerForm.cs
private async void GetContactFolderProps(string FolderId, string FolderDisplayName)
        {
      /n ..... /n //View Source file for more details /n }

25. Example

Project: Office365APIEditor
Source File: MailboxViewerForm.cs
private async void GetCalendarFolderProps(string FolderId, string FolderDisplayName)
        {
     /n ..... /n //View Source file for more details /n }

26. Example

Project: TraceLab
Source File: TLSimilarityMatrixEditor.cs
private void DisplayData()
        {
            var similarities = (TLSimilarityMatrix)Data;
            List<DataGridViewRow> rows = new List<DataGridViewRow>(similarities.Count);
            foreach (TLSingleLink link in similarities.AllLinks)
            {
                DataGridViewRow row = new DataGridViewRow();
                row.CreateCells(similaritiesGrid, link.SourceArtifactId, link.TargetArtifactId, link.Score);
                rows.Add(row);
            }

            similaritiesGrid.Rows.AddRange(rows.ToArray());
        }

27. Example

Project: ElectronicObserver
Source File: DialogConfiguration.cs
private void UpdateBGMPlayerUI()
		{

			BGMPlayer_ControlGrid.Rows.Clear();

			var rows = new DataGridViewRow[BGMHandles.Count];

			int i = 0;
			foreach (var h in BGMHandles.Values)
			{
				var row = new DataGridViewRow();
				row.CreateCells(BGMPlayer_ControlGrid);
				row.SetValues(h.Enabled, h.HandleID, h.Path);
				rows[i] = row;
				i++;
			}

			BGMPlayer_ControlGrid.Rows.AddRange(rows);

			BGMPlayer_VolumeAll.Value = (int)BGMHandles.Values.Average(h => h.Volume);
		}

28. Example

Project: ElectronicObserver
Source File: DialogConstructionRecordViewer.cs
private void ButtonRun_Click(object sender, EventArgs e)
		{

			if (Searcher.IsBusy)
			{
				if (M/n ..... /n //View Source file for more details /n }

29. Example

Project: ElectronicObserver
Source File: DialogShipGroupSortOrder.cs
private void ButtonLeft_Click(object sender, EventArgs e)
		{

			var selectedRows = DisabledView.SelectedRows;

			if (selectedRows.Count == 0)
			{
				System.Media.SystemSounds.Asterisk.Play();
				return;
			}

			var addrows = new DataGridViewRow[selectedRows.Count];
			int i = 0;

			foreach (DataGridViewRow src in selectedRows)
			{
				addrows[i] = new DataGridViewRow();
				addrows[i].CreateCells(EnabledView);
				addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value, ListSortDirection.Ascending);
				addrows[i].Cells[EnabledView_Name.Index].Tag = src.Cells[DisabledView_Name.Index].Tag;
				addrows[i].Tag = src.Tag;
				DisabledView.Rows.Remove(src);
				i++;
			}

			EnabledView.Rows.AddRange(addrows);
			DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);
		}

30. Example

Project: ElectronicObserver
Source File: DialogShipGroupSortOrder.cs
private void ButtonRight_Click(object sender, EventArgs e)
		{

			var selectedRows = EnabledView.SelectedRows;

			if (selectedRows.Count == 0)
			{
				System.Media.SystemSounds.Asterisk.Play();
				return;
			}

			var addrows = new DataGridViewRow[selectedRows.Count];
			int i = 0;

			foreach (DataGridViewRow src in selectedRows)
			{
				addrows[i] = new DataGridViewRow();
				addrows[i].CreateCells(DisabledView);
				addrows[i].SetValues(src.Cells[DisabledView_Name.Index].Value);
				addrows[i].Cells[DisabledView_Name.Index].Tag = src.Cells[EnabledView_Name.Index].Tag;
				addrows[i].Tag = src.Tag;
				EnabledView.Rows.Remove(src);
				i++;
			}

			DisabledView.Rows.AddRange(addrows);
			DisabledView.Sort(DisabledView_Name, ListSortDirection.Ascending);
		}

31. Example

Project: ElectronicObserver
Source File: FormQuest.cs
void Updated()
		{

			if (!KCDatabase.Instance.Quest.IsLoaded) return;

			QuestView.SuspendLayout(/n ..... /n //View Source file for more details /n }

32. Example

Project: ElectronicObserver
Source File: FormShipGroup.cs
private DataGridViewRow CreateShipViewRow(ShipData ship)
		{

			if (ship == null) return null;

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

33. Example

Project: PKHeX
Source File: KChart.cs
private void PopEntry(int index)
        {
            var p = SAV.Personal[index];

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

34. Example

Project: Office365APIEditor
Source File: FolderViewerForm.cs
private async void GetMessageItemsInMsgFolderRoot()
        {
            // I don't know why but it/n ..... /n //View Source file for more details /n }

35. Example

Project: Office365APIEditor
Source File: FolderViewerForm.cs
private async Task<bool> GetMessageItems(string TargetFolderID)
        {
            // Retur/n ..... /n //View Source file for more details /n }

36. Example

Project: Office365APIEditor
Source File: FolderViewerForm.cs
private async void GetCalendarItems()
        {
            try
            {
                var re/n ..... /n //View Source file for more details /n }

37. Example

Project: SMEncounterRNGTool
Source File: MainForm_Search.cs
private DataGridViewRow getRow(int i, RNGResult result)
        {
            int d = i - (int)Time_/n ..... /n //View Source file for more details /n }

38. Example

Project: TraceLab
Source File: TLArtifactsCollectionEditor.cs
private 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());
        }

39. Example

Project: ElectronicObserver
Source File: DialogEquipmentList.cs
private void UpdateView()
		{

			var ships = KCDatabase.Instance.Ships.Values;
			var equipments = /n ..... /n //View Source file for more details /n }

40. Example

Project: xenadmin
Source File: NetworkPickerPage.cs
private void AddVIFRow(VIF vif)
		{
            var row = new VifRow(vif);
            XenAPI.Networ/n ..... /n //View Source file for more details /n }

41. Example

Project: ElectronicObserver
Source File: DialogEquipmentList.cs
private void UpdateDetailView(int equipmentID)
		{

			DetailView.SuspendLayout();

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

42. Example

Project: ElectronicObserver
Source File: DialogLocalAPILoader2.cs
private void LoadFiles(string path)
		{

			if (!Directory.Exists(path)) return;

			CurrentPath = path;

			APIView.Rows.Clear();

			var rows = new LinkedList<DataGridViewRow>();

			foreach (string file in Directory.GetFiles(path, "*.json", SearchOption.TopDirectoryOnly))
			{

				var row = new DataGridViewRow();
				row.CreateCells(APIView);

				row.SetValues(Path.GetFileName(file));
				rows.AddLast(row);

			}

			APIView.Rows.AddRange(rows.ToArray());
			APIView.Sort(APIView_FileName, ListSortDirection.Ascending);

		}

43. Example

Project: ElectronicObserver
Source File: DialogAntiAirDefense.cs
private void Updated()
		{

			ShipData[] ships = GetShips().ToArray();
			int formation = Formation/n ..... /n //View Source file for more details /n }

44. Example

Project: QTTabBar
Source File: FileHashComputerForm.cs
public void ShowFileHashForm(string[] paths) {
            if(!fCancellationPending) {
             /n ..... /n //View Source file for more details /n }