in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

SelectionMode = CheckBox and only allow 1 column to be selected at a time

Last post 04-11-2008 12:36 AM by C1_JohnAd. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-09-2008 11:34 AM

    SelectionMode = CheckBox and only allow 1 column to be selected at a time

    I have my list control's SelectionMode set to "CheckBox"

    If one row is selected and another row is selected I would like to automatically remove the selection of the previous checkbox.

     How do I do this?

    Filed under: ,
  • 04-11-2008 12:36 AM In reply to

    Re: SelectionMode = CheckBox and only allow 1 column to be selected at a time

    Hello,
     
    I would suggest you to try the following code snippet.
     

    Private Sub C1List1_SelChange(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles C1List1.SelChange

            Me.C1List1.SelectedIndices.Clear()

    End Sub

    Above code clears the currectly selected rows before user selection in the SelChange() event of C1List.

    I believe this should work for you.

    Regards,

    Allen Smith
    <daktmacfan> wrote in message news:203655@10.0.1.98...

    I have my list control's SelectionMode set to "CheckBox"

    If one row is selected and another row is selected I would like to automatically remove the selection of the previous checkbox.

     How do I do this?



    http://helpcentral.componentone.com/cs/forums/p/74888/203655.aspx#203655

Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.