locked
Why i don't see the data in listView? RRS feed

  • Question

  • User371145 posted

    Hi,

    i create a listview as you can see:

                        </TextCell>
    
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
    

    AND insert data in it as below:

    listaDati.ItemsSource = new string[] { "mono", "monodroid", "monotouch", "monorail", "monodevelop", "monotone", "monopoly", "monomodal", "mononucleosis" };

    i dont recive any ERROR but the there isn't data in listView.

    Can you help me?

    THANKS

    Tuesday, July 31, 2018 2:41 PM

Answers

  • User369520 posted

    Can't see your TextCell definition, but I assume you are doing something like this

    <TextCell Text="{Binding}"/>

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, July 31, 2018 2:49 PM

All replies

  • User369520 posted

    Can't see your TextCell definition, but I assume you are doing something like this

    <TextCell Text="{Binding}"/>

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, July 31, 2018 2:49 PM
  • User180523 posted

    Please fix your post using markdown so the site parser doesn't eat your code. https://redpillxamarin.com/2016/12/13/faq-frequently-asked-questions/

    The answer to "why isn't my data updating" 99% of the time is always:

    Your binding isn't what you think it is. Your binding is broken.

    Either the page doesn't have its binding context set... the ViewModel is null... or something else to that affect. Take an hour and go through this series. Work it, not just read it. Build the sample application. That should give you a better understanding about binding, and BindingContext. http://redpillxamarin.com/2018/03/12/2018-101-vs2017-new-solution/

    Tuesday, July 31, 2018 2:50 PM
  • User371145 posted

    Bushbert: THANKS THANKS

    Tuesday, July 31, 2018 2:54 PM