Declined
Last Updated: 25 Jan 2021 11:59 by ADMIN
Vardan
Created on: 21 Jan 2021 12:02
Category: UI for Xamarin
Type: Bug Report
0
[RadListView] [Grouping] Blank item for an empty group

Hi folks.

 

I am using the rad list view with grouping in my application. There are some cases when the list has empty groups (That's ok because according to the application's logic I can move items between groups). The problem is that the empty group it's not actually "Empty". It has a blank item which is not desirable behavior for me. I have a list view "item tapped" event which navigates the user to the details screen and when I tap on the empty group's item the application throws an exception because the list item is blank. I have attached a sample app according to this example and GIF files showing the issue.

 

Steps To Reproduce

 

  1. Download the zip file
  2. Open The app
  3. Add necessary Telerik dlls (Can't send dlls with the sample because of size)
  4. Tap on empty item


    Versions

    1. Xamarin Forms 5.0.0.1874
    2. Telerik Controls 2020.3 (latest)
    3. IDE Visual studio 2019

     

    4 comments
    ADMIN
    Didi
    Posted on: 25 Jan 2021 11:59

    Hi Vardan,

    Please note that the behavior you have initially reported in this feedback item is related to the situation that the ListView displays a blank item, doesn't hide it, and an exception occurs. As I explained the blank item is expected for the ListView control, the behavior also occurs in the Xamarin CollectionView.

    From your last reply you have mentioned a button inside the listview itemtemplate, a converter, so it seems that you have a different page definition. -> As a next step, I can suggest you open a support ticket and attach a stripped-down version of the project you are working on, so I can be aware of the exact setup you have. Then I can research the case further and check whether this behavior is expected.

    Thank you for the understanding.

    Regards,
    Didi
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

    Vardan
    Posted on: 25 Jan 2021 09:35
    Hi Didi.Thank you for your response. I know that's the current logic that has implemented. Even it is correct, it works not correctly. Let me explain why. Suppose anyway I decided to hide blank lines for the empty groups. And suppose my Item template cell consists of one label and one button wrapped with stack layout. So what I do to hide a blank item for the empty group. I use a visibility converter or a data trigger in the stack layout and bind visibility to the "name" property. The problem is that the button does not hide in the blank item on IOS and I have to add the same visibility converter for the inner button as well. So I use the same visibility converter twice (for parent view and for child view). That's very strange for me.
    ADMIN
    Didi
    Posted on: 25 Jan 2021 09:16

    Hi Vardan,

    Thank you for the provided files and detailed explanation of the behavior. 

    I understand your point, still, this is how the ListView handles the items and the behavior you are observing is expected. 

    Empty item will be visualized because it is a valid item no matter whether there is a value for the name property.

    This is an item that the Telerik UI for Xamarin RadListView 

     

    new City {Name = null, Country = "Empty Item", Description = null},

     

    and

    Xamarin.Forms CollectionView:

    Cities.Add(new CountryGroup("Empty Item", new List<City>
    {
        new City
        {
            Name = null,
            Description = null
        },
    }));

    will display as an empty item. 

    I have changed the status of the bug report to declined. As the behavior is expected. 

    I hope the provided information was helpful.

    Regards,
    Didi
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

    Vardan
    Posted on: 21 Jan 2021 12:05
    For my side the empty groups should not have blank items,