• 0

[VB/VB .NET] Access entire row from 2D array


Question

Should be simple but I just can't seem to get it. :whistle:

I have a 2D array with 22 rows and 4 columns. The application has to display certain rows depending on which options are selected. How can I display entire rows at a time without having to access the row cell by cell?

Thanks!

7 answers to this question

Recommended Posts

  • 0

I have a drop drown box and several check boxes. What is displayed in the large text box depends on what is selected in the drop down box or what is selected through the check boxes. The information is pulled through the click of a button which checks the drop down box and check box selections.

What would be the best way to go about it?

  • 0
  On 05/04/2010 at 02:58, Crackler said:

How can I display entire rows at a time without having to access the row cell by cell?

By not putting it in a 2D-array. What's currently in your array?
  On 05/04/2010 at 03:07, Crackler said:

I have a drop drown box and several check boxes. What is displayed in the large text box depends on what is selected in the drop down box or what is selected through the check boxes. The information is pulled through the click of a button which checks the drop down box and check box selections.

What would be the best way to go about it?

This is waaaaaaaay too vague. You're gonna have to be more specific about what kind of data you're trying to access and display.
  • 0

Each row has the following information:

Year - Movie - Actor - Adjusted Box Office

I have 22 rows of this information and each check box has one of the actor's names. For each actor chosen I have to display each row which contains their name. I wanted to know if I could reference the entire row instead of having to do (1, 0), (1, 1), (1, 2), (1 ,3) to get one row.

Less vague now? :blush:

  • 0

Sorry, Crackler, but I'm still wickedly confused about what exactly you're doing. Any sane individual would create a class or struct that has those 4 pieces of information as members.

But you're still just leaving too much information out for me to even begin to understand the specific problem. What datatypes are you using? How is the data being displayed? What control is being used to display the data? What's the data source? Christ, just post some code for us.

And most importantly: why does it matter that you have to make 4 index calls to get a row of data?? A computer does that in millseconds and it's not exactly difficult code.

I must be missing something.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • Week One Done
      SmileWorks Dental earned a badge
      Week One Done
    • Community Regular
      vZeroG went up a rank
      Community Regular
    • Collaborator
      Snake Doc earned a badge
      Collaborator
    • Week One Done
      Snake Doc earned a badge
      Week One Done
    • One Month Later
      Johnny Mrkvička earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      582
    2. 2
      ATLien_0
      199
    3. 3
      Michael Scrip
      199
    4. 4
      +FloatingFatMan
      129
    5. 5
      Xenon
      125
  • Tell a friend

    Love Neowin? Tell a friend!