About 919,000 results
Open links in new tab
  1. c# - Splitting a string, then writing into datagridview rows

    Jan 9, 2017 · I want to split the string and then write the separated strings into a datagridview, I have tried: string[] array = _text.Split(','); table.Rows.Add(array[0], array[1], array[2], array[3]); datagridview1.DataSource = table;

  2. c# - How to split data into datagridview - Stack Overflow

    Jul 29, 2016 · I need to split values from two columns into a datagridview. You can see a screenshot of my values here: I need to split match and result columns to have a column for every value. This is my code: Class: using System; public class Bet. public string Match { get; set; } public string Result { get; set; } public List<string> Odds { get; set; }

  3. c# - Split String to DataGridview Loop - Stack Overflow

    Feb 27, 2021 · You could do this like… dataGridView1.Rows.Add(split[0],split[1],split[2]); Put the code that splits the line and adds the row to the grid inside a while loop that reads each line in the file. The loop ends when the last line has been read.

  4. Import data from a text file into a datagrid view - Microsoft Q&A

    Jan 2, 2023 · @AMER SAID , Welcome to Microsoft Q&A, you could use string.split and linq method to import data from a text file into a datagridview. var lines= File.ReadAllLines("test.txt"); . var list = (from m in lines.ToList() . select new Example . id = m.Split(new string[] { ",", ":" }, StringSplitOptions.None)[1].Replace("\"", ""), .

  5. C# DataGridView – Add Text From Textbox to DataGridView On Button

    In this tutorial I'll show you how to add data from textbox into DataGridView. Firstly I designed the Windows Form Application as following the picture. I added three textboxes, a button and a gridview. I named textboxs as txtName, txtLastName, txtAge. Also I named the button and the gridview as btnAdd, dataGridViewList. If you finish …

  6. How to Add a Textbox Value to Gridview in C# - C# Corner

    In this tutorial, you will learn how to bind data from textbox to gridview in C#, in detail. Displaying data with a tabular format is a task you are likely to perform frequently. The DataGridView is designed to be a complete solution for displaying data with tabular format in Windows Forms.

  7. .net - Textbox Split and process C# - Stack Overflow

    Jan 2, 2018 · To split TextBox to lines, you can rely on TextBox.Lines, for downloading the string from a url, you can rely on DownloadStringTaskAsync and at last for data-binding to DataGridView you can rely on List<T>. Then the code can …

  8. Split cells in datagridview C# - Microsoft Q&A

    Jun 8, 2021 · For splitting cells you will need to find a custom DataGridView. In regards to different colors in the same cell, this is not supported in a standard DataGridView, this means custom painting as per the following or custom column/cell as per this page.

  9. Insert multiple values from textbox and show them into a datagridview

    In this blog we will know how to insert multiple values from textbox and show them into a datagridview.

  10. Learn How to Transfer TextBox Input to DataGridView in C# ... - YouTube

    In this tutorial, I'll walk you through the process of taking input from a TextBox and displaying it in a DataGridView.