Good day to all. How can I add several values ​​to a single field without creating a new line. For example

β„– Id Name 1 255 test1 2 100 test2 

How to add another value separated by comma to field 255. For example, 255.434. I tried through a for loop but there is a new line added.

Let's say there is such code:

 int [] array = new int[]{1,2,3,4,5,6,7,8,9,5,5,3,423,43,65,5,3,2}; Random s = new Random(); void Button1Click(object sender, EventArgs e) { for(int i =0;i<10;i++) { int rand = s.Next(0,10); for(int k=0;k<rand;k++) { Data_test_grid.Rows.Add(i,array[k]); } } } 

This code creates new fields .. But how to make the values ​​of k not be transferred to a new line but added to an existing field.

  • one
    And if through a simple string concatenation, try? - Timur Gazaleev
  • The data that you need to add to the fields is stored in an array (List). In an array at index 1, for example, 27 id, at index 2 4id. So that is unlikely to happen ... - Berianidze Luka
  • Do you need only certain ones to go together with a comma? or just sequentially? - Timur Gazaleev
  • It’s desirable to be self- separating, separated by a comma, because there should be a separation between id - Berianidze Luka Sept
  • @ αƒšαƒ£αƒ™αƒαƒ‘αƒ”αƒ αƒ˜αƒαƒœαƒ˜αƒ«αƒ” show the code of your output - Senior Pomidor

0