C1List

Posted by: s.wortmann on 7 September 2018, 10:15 am EST

    • Post Options:
    • Link

    Posted 7 September 2018, 10:15 am EST - Updated 4 October 2022, 2:14 am EST

    Hi,

    I have the following Situation:

    C1List with Checkbox, bound to a Dataview with 2 Columns

    (1st Col. = lfdNr = integer, 2nd Col. = Benutzer)

    works fine, no Problem

    Here is my question:

    How can I retrieve the values of the 1st Col. (lfdNr) of all checked rows?

    I’m able to get the quantity of the checked rows with:

    C1List1.SelectedIndices.Count()

    But how do I receive the values of the 1st Col with that Information )

    A short VB example would be great.

  • Posted 10 September 2018, 2:58 am EST

    Hi s.wortmann,

    You need to fetch index of selected rows and later use those indexes in C1List1.GetItemText(row,0) method to fetch values of first column(or any column).

    Please see the sample code given below:

    For Each row As Integer In C1List1.SelectedIndices

    listBox1.Items.Add(C1List1.GetItemText(row, 0))
    

    Next

    Thanks,

    +Manindra

  • Posted 10 September 2018, 5:12 am EST

    Hello,

    Thanks, Manindra.

    C1List’s GetItemText ( http://help.grapecity.com/componentone/NetHelp/c1list/webframe.html#C1.Win.C1List.4~C1.Win.C1List.ListBase.C1ListBase~GetItemText.html) method helps to fetch value at a particular cell. This can be used to fetch values related to only the selected items by looping through the indices of these.

    A sample has been attached for your reference.

    Best Regards,

    Esha

    prj_C1List.zip

Need extra support?

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

Learn More

Forum Channels