none
Multiple Lines Per Record - VB2019 DataGridView RRS feed

  • Question

  • Hi:

    Is it possible to display multiple lines of data for each record in a DataGridView?

    For example:

    Record #1     xxxxxxxxxxxxxxx    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

                        xxxxxxxxxxxxxxxxxx     xxxxxxxxxxx     xxxxxxxxxxxx

    Record #2     xxxxxxxxxxxxxxx    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

                        xxxxxxxxxxxxxxxxxx     xxxxxxxxxxx      xxxxxxxxxxxx

    Thanks

         

    Saturday, June 29, 2019 2:38 PM

Answers

  • Hello,

    That is usually done by grouping rows, if interested I have a custom DataGridView which you set the DataSource to a DataTable where the first column is the key to the grouping.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, June 29, 2019 10:07 PM
    Moderator

All replies

  • Hi

    Looks to me like a suitable use for a BindingNavigator and a Form layed out with (say) a RichTextBox, or multiple TextBoxes. See the code I posted to another question - there is code for a stand alone project example.


    Regards Les, Livingston, Scotland


    • Edited by leshay Saturday, June 29, 2019 3:03 PM
    Saturday, June 29, 2019 3:02 PM
  • Hello,

    That is usually done by grouping rows, if interested I have a custom DataGridView which you set the DataSource to a DataTable where the first column is the key to the grouping.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, June 29, 2019 10:07 PM
    Moderator
  • I am interested in the custom DataGridView that you mentioned.

    Thanks

    Friday, July 19, 2019 6:16 PM