Telerik Forums
UI for Xamarin Forum
1 answer
1.0K+ views

Hello,

I want a listeView, and when I click on an item, layout expands smoothy to show details. 

So I decided to use RadExpander as ItemTemplate. But its not working very well. 

1. When I click on an item, it doesnt expand. I have to refresh the layout to see the expand (I refresh with scroll/unscroll). And then I can see it expand/reduce.

2.When I scroll/unscroll, its like if wrong data is displayed on cells. New text is superimposed with old text. 

 

Code below to reproduce (testing on android device).

I am open to any advice to achieve a smoothy expand on listview. 

Thanks.

[XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class CurTestPage : ContentPage
    {
        public CurTestPage ()
        {
            InitializeComponent ();
 
            var list = new List<string>();
 
            for (int i = 0; i < 100; i++)
            {
                list.Add(i.ToString());
            }
 
            listView.ItemsSource = list;
 
 
        }
         
    }
<?xml version="1.0" encoding="utf-8" ?>
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
             xmlns:abstractions="clr-namespace:CarouselView.FormsPlugin.Abstractions;assembly=CarouselView.FormsPlugin.Abstractions"
             x:Class="Portwin.Tests.CurTestPage">
 
    <ListView x:Name="listView" HasUnevenRows="True">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <telerikPrimitives:RadExpander x:Name="expander">
                        <telerikPrimitives:RadExpander.Header>
                            <telerikPrimitives:ExpanderHeader>
                                <Label Text="{Binding .}" />
                            </telerikPrimitives:ExpanderHeader>
                        </telerikPrimitives:RadExpander.Header>
                        <telerikPrimitives:RadExpander.Content>
                            <Label Text="{Binding .}" />
                        </telerikPrimitives:RadExpander.Content>
                    </telerikPrimitives:RadExpander>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
 
</ContentPage>
Yana
Telerik team
 answered on 01 May 2019
5 answers
198 views

Hi there,

I am using RadDataForm as a read-only Sheet to display certain detail information. That works pretty nice on android, but for iOS the layout makes it almost impossible to read any data (see attachment).

 

So my questions are:

- are there any possibities to use a line-break on iOS for long text cells?

- are there any possibilities to modify the text size. I know it is possible for the header, but it would also be needed for the value.

 

Regards,

Yana
Telerik team
 answered on 01 May 2019
4 answers
135 views
I have a ListView where I am trying to sort by three columns: NumRejected, DueDate, Number. I have three sort descriptors:

MyListView.SortDescriptors.Add(
    new PropertySortDescriptor
    {
        PropertyName = "NumRejected",
        SortOrder = SortOrder.Descending
    }
);

MyListView.SortDescriptors.Add(
    new PropertySortDescriptor
    {
        PropertyName = "DueDate",
        SortOrder = SortOrder.Ascending
    }
);

MyListView.SortDescriptors.Add(
    new PropertySortDescriptor
    {
        PropertyName = "Number",
        SortOrder = SortOrder.Ascending
    }
);


This works until there is a null value for DueDate. What I'm trying to do is: if there is a null for DueDate don't apply that SortDescriptor, just move on to the next. So for example I have three results in the ListView with values in all columns, they get sorted by NumRejected first, then DueDate then Number. If I also have some results with no DueDate I want them to be sorted NumRejected then Number, ignoring the DueDate. These should be below the three with DueDates. 

At the moment a null on DueDate is being treated as the lowest value for that column, so they are at the top of the list.

I think a DelegateSortDescriptor might be the way to go, but I can't find any examples how to use that.
Alan
Top achievements
Rank 1
 answered on 29 Apr 2019
13 answers
940 views

I would like to say that recently we purchased Telerik.UI.for.Xamarin and added Telerik Nuget in our app. It works fine after integration and configured with our app. But App build fails on Xamarin Mobile Center (https://mobile.azure.com) with Telerik.UI.for.Xamarin. This happens when we try to create build.

Error: System.InvalidOperationException: Unable to find version '2017.1.10301.12' of package 'Telerik.UI.for.Xamarin'.

Full details are below:

System.InvalidOperationException: Unable to find version '2017.1.10301.12' of package 'Telerik.UI.for.Xamarin'.
2017-03-08T19:08:50.6756150Z   at NuGet.PackageHelper.ResolvePackage (NuGet.IPackageRepository repository, System.String packageId, NuGet.SemanticVersion version) [0x0006f] in <5168bb31f82348f797e7feef070997dc>:0 
2017-03-08T19:08:50.6770660Z   at NuGet.Commands.RestoreCommand.RestorePackage (NuGet.IFileSystem packagesFolderFileSystem, System.String packageId, NuGet.SemanticVersion version, System.Boolean packageRestoreConsent, System.Collections.Concurrent.ConcurrentQueue`1[T] satellitePackages) [0x000b2] in <572a211d3d4d428f91d5f3ddc03e5849>:0 
2017-03-08T19:08:50.6785020Z   at NuGet.Commands.RestoreCommand+<ExecuteInParallel>c__AnonStorey0+<ExecuteInParallel>c__AnonStorey1.<>m__0 () [0x0002c] in <572a211d3d4d428f91d5f3ddc03e5849>:0 
2017-03-08T19:08:50.6798310Z   at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x00012] in <8f2c484307284b51944a1a13a14c0266>:0 
2017-03-08T19:08:50.6811850Z   at System.Threading.Tasks.Task.Execute () [0x00016] in <8f2c484307284b51944a1a13a14c0266>:0 
2017-03-08T19:08:50.6824940Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6837750Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6850480Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6863490Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6876180Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6888880Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6901680Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6914440Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6927490Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6939880Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6953100Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6965990Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6978710Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.6991540Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7004610Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7017310Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7030220Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7043160Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7055840Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7090570Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7103710Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7116690Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7129430Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7142260Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7154970Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7167920Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7180830Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7193640Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7206460Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7219190Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7232450Z namedmutex_create: error creating mutex handle
2017-03-08T19:08:50.7427260Z ##[section]Finishing: Restore Nuget

 

Francis
Top achievements
Rank 1
 answered on 25 Apr 2019
2 answers
101 views

Hi,

In calendar multi day view I can see two Thursdays as day names and can't see the Sunday.

Attached the image.

Thanks

 

 

Didi
Telerik team
 answered on 25 Apr 2019
1 answer
90 views

I want to show total number of elements and number of currently loaded elements in the text property of a label which is inside the DataTemplate of LoadOnDemandRowTemplate.

Setting up Text={Binding ViewModel.TotalNumberOfProducts } for the Label does't seem to work as BindingContext of the LoadOnDemandRowTemplate seems different from the pages's binding context. I couldn't figure out the correct way of implementing this with binding. Can you help?

Lance | Senior Manager Technical Support
Telerik team
 answered on 24 Apr 2019
4 answers
432 views

 

I currently have a GRID with data with four columns (Hour, "Yesterday's Price", "Current Price", "Tomorrow's Price")
but they ask me that the price columns can be 1 day or more days.
How can I BINDING the columns?

 

(VIew FILE)

<telerikDataGrid:RadDataGrid x:Name="DataGrid"
                                             AutoGenerateColumns="False" 
                                             ItemsSource="{Binding EnergyPriceValues}"    >
                    <telerikDataGrid:RadDataGrid.Columns>
                        <telerikDataGrid:DataGridTextColumn  CanUserGroup ="False"   CanUserFilter="False" CanUserEdit="False"  PropertyName="Date"            HeaderText="{Binding TitleColDate}"  />
                        <telerikDataGrid:DataGridTextColumn  CanUserGroup ="False"  CanUserFilter="False" CanUserEdit="False" PropertyName="YesterdayValue"       HeaderText="{Binding TitleColYesterday}"  />
                        <telerikDataGrid:DataGridTextColumn  CanUserGroup ="False"  CanUserFilter="False" CanUserEdit="False" PropertyName="TodayValue"           HeaderText="{Binding TitleColToday}"  >
                            <telerikDataGrid:DataGridTextColumn.CellDecorationStyle>
                                <telerikDataGrid:DataGridBorderStyle BackgroundColor="Aqua"  />
                            </telerikDataGrid:DataGridTextColumn.CellDecorationStyle>
                        </telerikDataGrid:DataGridTextColumn>
                        <telerikDataGrid:DataGridTextColumn CanUserGroup  ="False"  CanUserFilter="False" CanUserEdit="False" PropertyName="TomorrowValue"        HeaderText="{Binding TitleColTomorrow}"  />
                    </telerikDataGrid:RadDataGrid.Columns>
                  
                </telerikDataGrid:RadDataGrid>

-------------------------------------

(In ViewModel, fill the object "EnergyPriceValues")

           EnergyPriceValues.Add(new GridEnergyPrices()
                {
                    Date = DateValue.Hour.ToString () ,
                    YesterdayValue = Math.Round(_energyYesterday[i].value, 2).ToString(),
                    TodayValue = Math.Round(_energyPriceToday[i].value, 2).ToString(),
                    TomorrowValue = Math.Round(_energyTomorrow[i].value, 2).ToString()
                });

-----------------------------------------

Thank you in advance :-)

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 23 Apr 2019
1 answer
147 views

I would like the ability to be able to go to another view and pass the id of the row clicked within the data grid I no I used to be able to do this in winforms and asp.net but the xamrain version elludes me any ideas would be most great-full. Say my id would be items id in the below grid how would i pass that to another view.

 

<telerikGrid:RadDataGrid AutoGenerateColumns="False"     UserEditMode="Cell" UserFilterMode="Disabled"   x:Name="deliveryItemsGrid">
               <telerikGrid:RadDataGrid.Columns>
 
                   <telerikGrid:DataGridTextColumn PropertyName="StockDescription"
               HeaderText="StockDescription" >
                   </telerikGrid:DataGridTextColumn>
                   <telerikGrid:DataGridTextColumn PropertyName="Price"
               HeaderText="Price" >
                   </telerikGrid:DataGridTextColumn>
                   <telerikGrid:DataGridTextColumn PropertyName="Qty"
               HeaderText="Qty" >
                   </telerikGrid:DataGridTextColumn>
                   <telerikGrid:DataGridBooleanColumn PropertyName="isDelivered"></telerikGrid:DataGridBooleanColumn>
                    
                    
               </telerikGrid:RadDataGrid.Columns>
 
           </telerikGrid:RadDataGrid>
 
<telerikGrid:RadDataGrid AutoGenerateColumns="False"     UserEditMode="Cell" UserFilterMode="Disabled"   x:Name="deliveryItemsGrid">
               <telerikGrid:RadDataGrid.Columns>
 
                   <telerikGrid:DataGridTextColumn PropertyName="StockDescription"
               HeaderText="StockDescription" >
                   </telerikGrid:DataGridTextColumn>
                   <telerikGrid:DataGridTextColumn PropertyName="Price"
               HeaderText="Price" >
                   </telerikGrid:DataGridTextColumn>
                   <telerikGrid:DataGridTextColumn PropertyName="Qty"
               HeaderText="Qty" >
                   </telerikGrid:DataGridTextColumn>
                   <telerikGrid:DataGridBooleanColumn PropertyName="isDelivered"></telerikGrid:DataGridBooleanColumn>
                    
                    
               </telerikGrid:RadDataGrid.Columns>
 
           </telerikGrid:RadDataGrid>
Didi
Telerik team
 answered on 23 Apr 2019
1 answer
67 views

I xamrain I made a short jinq video to explain what is going wrong. Basically, the reference is being destroyed on every rebuild in visual studio 2019.

Only in the shared code libary, i might add which is the one i need to be an able to reference the dll as that is where my shared code base is this is a standard xamrian project and should work within it.
https://www.screencast.com/t/tGLZwRnXa6
Nikolay
Telerik team
 answered on 23 Apr 2019
1 answer
135 views

Dear Telerik,

we created an Application in Xamarin.Form.
Our customer asked us to make besides an android version, a Windows 10 desktop version.

We have some problems using the mouse (double click and swipe behavior) instead of touch.
In general it is hard to find the right spot where the controls recognize a mouse-action.

1)  RadTreeView
a) how to select a treeitem (RadTreeView) with double click  ?
b) is it possible to highlight the selected row ?(in this case we could add an OK and Cancel button on the bottom of the page)

 

2) RadListView

a) the buttons (delete , edit) in ItemSwipeContentTemplate are only accessible if the mouse-pointer is in the upper-left corner.
Is it possible to swipe with the mouse when clicked on cell, now matter where ?

b) double click on a cell is only registered when click some regions.

 

Could you help us out ?

 

Regards,

Henry

 

 

 

Yana
Telerik team
 answered on 22 Apr 2019
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?