Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Devexpress Xamarin controls

Hi. I am experiencing weird behaviour related to Devexpress. I have implemented GridControl which should in my case act as a simple list (To utilize the LoadMore event). Everything works as expected, except when I scroll down in the list and back to the top some of the items that disappear during scrolling down is suddenly changed into different items from the list. The ItemSource is not changed when this occurs so it is only the view that behaves strangely. Why does this happen? I have tried adding AllowSort="false" to the GridControl in the XAML file, but with no luck. What I have at this moment is:

...
xmlns:dxGrid="clr-namespace:DevExpress.Mobile.DataGrid;assembly=DevExpress.Mobile.Grid.v15.1"
...

<dxGrid:GridControl
    x:Name="grid"
    ItemsSource="{Binding Customers}"
    ColumnHeadersVisibility="false"
    RowHeight="60"
    IsReadOnly="True"
    RowTap="OnSelectedCustomer"
    IsLoadMoreEnabled="True"
    LoadMore="OnLoadMoreCustomers">

    <dxGrid:GridControl.Columns >
        <dxGrid:TemplateColumn FieldName="FullName">

            <dxGrid:TemplateColumn.DisplayTemplate>
                <DataTemplate>
                    <Grid BindingContext="{Binding Source}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Label Text="{Binding FullName}" TextColor="White" Font="Bold, 20" Grid.Row="0" />
                        <Label Text="{Binding Email}" TextColor="White" Font="Normal" Grid.Row="1"/>
                    </Grid>
                </DataTemplate>
                </dxGrid:TemplateColumn.DisplayTemplate>

            </dxGrid:TemplateColumn>
    </dxGrid:GridControl.Columns>

</dxGrid:GridControl>

Customers is an OberservableCollection placed in the ViewModel like this


The OnSelectedCustomer event is placed in the code-behind and it looks like this


What I get from the Application Output while scrolling is this..


Answers

  • ArVinothArVinoth INMember ✭✭
    edited December 2016

    I'm also facing same issue while doing scroll last two there rows get hided.

    and suggest me any way to stop the load after all data get loaded in the grid. it's very helpful to fix the previous issue which asked by us.

    Thanks,
    Vinoth

Sign In or Register to comment.