C1TrueDBGrid

Posted by: s.wortmann on 22 December 2020, 7:19 pm EST

    • Post Options:
    • Link

    Posted 22 December 2020, 7:19 pm EST - Updated 3 October 2022, 2:27 pm EST

    Hi there,

    I’m in need of the following:

    Multiple Rows have been selected (this is not the problem)

    My Question:

    How can I go only through the selected rows, to get for example the Value of Column 0 (“ID”), to use these Values for other operations:

    Maybe with an For Each … Statement ?

    It would be great to get a response.

    Best regards.

    Stephan Wortmann

  • Posted 23 December 2020, 3:18 pm EST

    Hi Stephan,

    You can use the traverse the collection and fetch the data from the selected rows from the index of the rows. Here is the suggested code:

    for(int i = 0; i < c1TrueDBGrid1.SelectedRows.Count; i++)
     {
      Console.WriteLine(c1TrueDBGrid1[c1TrueDBGrid1.SelectedRows[i], 0]);
     }
    

    If you need any other help, please let me know.

    Regards,

    Prabhat Sharma.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels