C1 FlexGrid combo closeup

Posted by: f.ctnzrt on 28 September 2019, 1:11 am EST

    • Post Options:
    • Link

    Posted 28 September 2019, 1:11 am EST

    Hi

    For c1Flexgrid vers. 4.0.X (VB.net) I need to know in the index in combo closeup (events) of the selected list. See events:

    Private Sub Fg2_ComboCloseUp(sender As Object, e As C1.Win.C1FlexGrid.RowColEventArgs) Handles fg2.ComboCloseUp


    In the activeX version there is the possibility to check index the

    celltextdispay, celltext etc.


    In the net version you can not ‘more’ do this (as activex):

    fg.ColComboList(1) = “#1;Full time|#23;Part time|#65;Contractor|#78;Intern|#0;Other”

    and check in the id (1,23,65,78) events

    Could you provide an example

    Thanks

  • Posted 30 September 2019, 4:58 am EST

    Hello,

    ComboCloseUp event fires when the dropdown editor of the FlexGrid closes and takes event argument as RowColEventArgs that have Row and Col property which represents the index of that cell but when getting the DisplayData of that cell, it returns the previous value on that cell not the currently selected value because value is assigned after the dropdown is closed.

    In place of ComboCloseUp event you can use the AfterEdit of FlexGrid to get the selected value when the dropdown is closed.

    I am attaching a sample demonstrating the same, please have a look.

    Regards,

    Prabhat Sharma.

    FlexGridDropDownCloseDemo.zip

  • Posted 2 October 2019, 10:27 am EST - Updated 4 October 2022, 12:44 am EST

    Hi

    Thanks for the reply you can see attached image

  • Posted 3 October 2019, 12:27 am EST

    Hello,

    You can achieve your desired behavior in WinForms’ FlexGrid using the DataMap property where Key part of DataMap is assign as Data for cell and Value part as DataDisplay.

    More more information please go through the given link :

    https://help.grapecity.com/componentone/NetHelp/c1flexgrid/webframe.html#C1.Win.C1FlexGrid.4~C1.Win.C1FlexGrid.RowCol~DataMap.html

    I modified the last attached sample demonstrating the same, please have a look.

    Regards,

    Prabhat Sharma.

    FlexGridDropDownCloseDemo1.zip

  • Posted 3 October 2019, 12:02 pm EST - Updated 4 October 2022, 12:45 am EST

    Hi Sharma

    Thanks for answer

    thanks for the answers I ask you for a last help see the attachment.



    filippo

  • Posted 3 October 2019, 11:55 pm EST

    Hello,

    1 : To show the list not in the ordered position you can use ListDictionary in place of Hashtable.

        Dim list As ListDictionary = New ListDictionary()
    
    

    2 : To set the height of the DropDown take Editor of the cell as ComboBox in SetupEditor event of FlexGrid as given in code snippet below :

    Private Sub C1FlexGrid1_SetupEditor(sender As Object, e As C1.Win.C1FlexGrid.RowColEventArgs) Handles C1FlexGrid1.SetupEditor
            If e.Col = 1 Then
                Dim cb As ComboBox = C1FlexGrid1.Editor
                cb.DropDownStyle = ComboBoxStyle.DropDownList
                cb.IntegralHeight = False
                cb.DropDownHeight = 60
            End If
        End Sub
    

    Please refer to the attached sample demonstrating both of your requirements.

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

    Regards,

    Prabhat Sharma.

    FlexGridDropDownCloseDemo2.zip

Need extra support?

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

Learn More

Forum Channels