Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8091449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:04:04+00:00 2026-06-05T20:04:04+00:00

I have two dgvs and two buttons. dgv1.rows[0].Cells[14].Value is (multiline): r – red wh

  • 0

I have two dgvs and two buttons.
dgv1.rows[0].Cells[14].Value is (multiline):
r – red
wh – white
y – yellow
So, divider is not “-” but ” – ” (space line space)

btn1.Click should split this content so that each line go to separate row (dgv2 is not multiline) and so that left side of dividers go into Columns[0] and right side of dividers go into Columns[1]:
r red
wh white
y yellow
gd gold //user can add this row or delete some another (in dgv2, not in dgv1)

btn2.Click should join this content again and rewrite dgv1 (with the same divider)
Any idea, please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:04:06+00:00Added an answer on June 5, 2026 at 8:04 pm

    Using Linq, you can take each line of multiline textbox and split by space and - then remove empty lines will give you list of items.

    var list = textBox1.Lines.Select(s => s.Split(" -".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)).ToList();
    

    if you want to join them again you can use string join as

    var list2 = list.Select(s => string.Join(" - ", s)).ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows form that has two DataGridViews (DGVs) that will hold 25,000+
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two tables and want to compare rows on sqlite like this table1
I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two identical tables and need to copy rows from table to another.
I have two buttons play and stop. When I click play I want the
Have two variables both containing integers: var input; var value; Need to perform arithmetic
I have two lists of the same type. That type does not have an
Have two folders with approx. 150 java property files. In a shell script, how
I have two tables images2 and image_data So the goal is to have 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.