Xamarin.Android Flexgrid column types

Posted by: chris on 1 February 2021, 9:18 am EST

    • Post Options:
    • Link

    Posted 1 February 2021, 9:18 am EST

    Is there a built-in option/example for adding a combo box type column? I would like to add one limited to the list and one where they can also type if selection is not present.

  • Posted 1 February 2021, 7:52 pm EST

    Hi Chris

    You can add a combobox type column in the C1 Xamarin flexGrid. FlexGrid Column provides you an option of DataMap property which shows you the list of items set as the ItemSource DataMap of the flexgrid column

     grid.Columns["CountryID"].DataMap = new GridDataMap() { ItemsSource = Customer.GetCountries(), DisplayMemberPath = "Value", SelectedValuePath = "Key" };
    

    For reference please have a look at the attached video, also you can refer to the ColumnDefinitions sample of the FlexGrid101 sample, which you can find at the below location

    “Documents\ComponentOne Samples\Xamarin\CS\XF”

    Please let me know if you need any other help.

    Thanks

    DataMap.zip

  • Posted 2 February 2021, 5:30 am EST

    Thanks, is there any better documentation available? The current documentation just looks like it was autgenerated and simply states what it is, for example the DataMap Itemsource just states syntax. Where can i find out what the fields are for? itemsource wants a key value pair if int,string but what is the int for? The string I assume will be what is displayed, is int just a counter? and what is displaymemberpath? I think selectedvaluepath will show the selected item highlighted when dropping down?

  • Posted 2 February 2021, 7:04 am EST

    I don’t see a way to allow a user to type in a value if the needed item is in the drop down list, is this possible?

  • Posted 3 February 2021, 1:21 am EST

    Hi Chris

    Please have a look at the below documentation, which explains the SeletedValuePath and DisplayMemberPath.

    https://www.grapecity.com/componentone/docs/xamarin/online-forms/DataMapping.html

    Please let me know if you need any other help.

    Thanks

  • Posted 3 February 2021, 5:47 am EST

    OK, thanks, I was looking at some other documentation.

    I still need to know if there is an option to have a dropdown list and allow typing.

  • Posted 4 February 2021, 6:13 am EST

    I still need to know if there is an option to have a dropdown list and allow typing.

  • Posted 4 February 2021, 8:48 am EST

    Hi Chris

    We can only see the values in the dropdown of any cell using the DataMap property. Currently, DataMap does not allow typing/editing of values similar to that of Combobox.

    Please let me know if you need any other help.

    Thanks

Need extra support?

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

Learn More

Forum Channels