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

  • SEARCH
  • Home
  • 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 6092921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:30:03+00:00 2026-05-23T12:30:03+00:00

hihi i have a question that i want to ask about c# and window

  • 0

hihi
i have a question that i want to ask about c# and window form

  1. i have this data… A,B,C; A1,B1,C1; A2,B2,C2; (this data is not hardcoded, it can continue to change, when more data insert come in) , i select this database column which is name as ColABC , and i retrieve and put in the datagridview ,
    So is possible to always get the middle data?….but it is always this format record1 data, record1 data, record1; record2 data, record3 data, record…and so i want this data all the middle value retrieve out to this become this B,B1,B2…….so on…

    ID |  ColABC
     1 |  A,B,C; A1,B1,C1; A2,B2,C2;
    

This is like my DataGridView, the above.

The only thing i know is use split by ; first then by ,.

Is there any direct way?

Something like this, I try:

string[] doll = null;
doll = Convert.ToString(DGV.CurrentRow.Cells[0].Value).Split(';');

Basically like example the above code, doll get the ” A,B,C; A1,B1,C1; A2,B2,C2; ” this data which i retrieve from datagridview, so if i declare roll[0] it will give me “A,B,C”, like what i mention above the data will change so how am i get the middle value always??

  • 1 1 Answer
  • 1 View
  • 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-05-23T12:30:03+00:00Added an answer on May 23, 2026 at 12:30 pm
    var input = "A,B,C; A1,B1,C1; A2,B2,C2;";
    var resultList = Regex.Matches(input, @".*?,(.*?),.*?;")
        .Cast<Match>()
        .Select(arg => arg.Groups[1].Value)
        .ToList();
    
    var firstValue = resultList[0];
    var secondValue = resultList[1];
    
    // bind to a combobox
    comboBox1.DataSource = resultList;
    
    var comaSeparatedString = string.Join(",", resultList);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anybody tell me how are exceptions handled in PHP? I have this code
Can someone help me figure out why the json array I have is not
The java have a script manager that allow java calling javascript, like this: import
Hihi all, I have implement a mechanism for the above (in the question title),
I have a node with some data: <something>Blah blah (Hello World) hihi</something> When I
Hi Hi have a working website on localhost that I want to move online.
Hihi all, I am pretty new in iPhone dev. I have follow some tutorial
I am wondering why $(this) does not work after a jQuery ajax call. My
<html> <head> <style> .100PercentHeight{ } </style> </style> <body> <div class='100PercentHeight'>hihi</div> </body> </html> How can
I have a simple problem I can't seem to find an answer to. I

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.