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

<br />...
public ObservableCollection<Customer> Customers {
    get { return CustomerDataManager.GetInstance ().GetCustomers (); } 
}
...

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

<br />private async void OnSelectedCustomer(object sender, RowEventArgs e) {

    CustomerDataManager manager = CustomerDataManager.GetInstance ();
    manager.SetSelectedCustomer (e.RowHandle);

    await this.Navigation.PushAsync (new CustomerView());
}

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

<br />[ViewRootImpl] ViewPostImeInputStage ACTION_DOWN
[art] Explicit concurrent mark sweep GC freed 4551(322KB) AllocSpace objects, 3(54KB) LOS objects, 48% free, 16MB/32MB, paused 524us total 21.276ms
[Mono] GC_OLD_BRIDGE num-objects 135 num_hash_entries 164 sccs size 164 init 0.00ms df1 0.34ms sort 0.15ms dfs2 0.55ms setup-cb 0.19ms free-data 0.20ms links 55/55/55/27 dfs passes 354/219
[Mono] GC_MINOR: (Nursery full) pause 8.00ms, total 8.10ms, bridge 24.34ms promoted 272K major 1968K los 2088K
[ViewRootImpl] ViewPostImeInputStage ACTION_DOWN
[libEGL] call to OpenGL ES API with no current context (logged once per thread)
[ViewRootImpl] ViewPostImeInputStage ACTION_DOWN
[art] Explicit concurrent mark sweep GC freed 2913(214KB) AllocSpace objects, 0(0B) LOS objects, 48% free, 16MB/32MB, paused 526us total 20.033ms
[Mono] GC_OLD_BRIDGE num-objects 267 num_hash_entries 12435 sccs size 6039 init 0.00ms df1 41.50ms sort 4.27ms dfs2 9.91ms setup-cb 0.95ms free-data 20.30ms links 23284/23284/5772/1 dfs passes 35986/29323
[Mono] GC_MINOR: (Nursery full) pause 48.71ms, total 48.83ms, bridge 58.84ms promoted 80K major 2048K los 2088K
[ViewRootImpl] ViewPostImeInputStage ACTION_DOWN
[ViewRootImpl] ViewPostImeInputStage ACTION_DOWN
[art] Explicit concurrent mark sweep GC freed 1254(41KB) AllocSpace objects, 0(0B) LOS objects, 48% free, 16MB/32MB, paused 532us total 18.912ms
[Mono] GC_OLD_BRIDGE num-objects 259 num_hash_entries 259 sccs size 259 init 0.00ms df1 0.63ms sort 0.03ms dfs2 0.70ms setup-cb 1.39ms free-data 0.23ms links 0/0/0/0 dfs passes 518/259
[Mono] GC_MINOR: (Nursery full) pause 6.80ms, total 6.93ms, bridge 24.70ms promoted 64K major 2112K los 2118K

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.