Telerik Forums
UI for Xamarin Forum
1 answer
307 views

Hello
I am trying to get my DataGrid to use a method whenever a cell in the grid is selected. I have tried to use the GestureRecognizers to get the functionality but my method. Am i approaching this the wrong way? Or is there something that I am missing?

This is what I have right now for the xaml DataGrid:

<ScrollView Grid.Row="2" IsClippedToBounds="True">
                    <telerikGrid:RadDataGrid AutoGenerateColumns="False" x:Name="AssignedRolesList" Margin="10,5,0,10" SelectionMode="Single" SelectionUnit="Cell">
                        <telerikGrid:RadDataGrid.GestureRecognizers>
                            <TapGestureRecognizer Tapped="GoToOperationalPeriods"/>
                        </telerikGrid:RadDataGrid.GestureRecognizers>
                        <telerikGrid:RadDataGrid.GroupDescriptors>
                            <common:PropertyGroupDescriptor PropertyName="RoleName" />
                        </telerikGrid:RadDataGrid.GroupDescriptors>
                        <telerikGrid:RadDataGrid.Columns>
                            <telerikGrid:DataGridTextColumn PropertyName="OperationalPeriodName" HeaderText="Assigned Roles" HeaderStyle="{StaticResource DataGridHeader}" />
                        </telerikGrid:RadDataGrid.Columns>
                    </telerikGrid:RadDataGrid>
                </ScrollView>

 

 

This is what my function is on the backend:

private void GoToOperationalPeriods(object sender, EventArgs e)
        {
            RoleOperationalPeriodsDto selectedCell = (RoleOperationalPeriodsDto)AssignedRolesList.SelectedItem;
            Navigation.PushAsync(new ViewOperationalPeriods(selectedCell.OperationalPeriodId), true);
        }

 

 

Thanks,

Evan

 

 

 

 

 

Yana
Telerik team
 answered on 01 Dec 2017
2 answers
161 views

When the page loads all group headers are collapsed and the list of items below them are shown. Is there an option to load the page with the group headers closed and items under them hidden.

<Grid>
    <telerikGrid:RadDataGrid AutoGenerateColumns="False"
                             UserEditMode="Cell"
                             x:Name="grid">
        <telerikGrid:RadDataGrid.Columns>
            <telerikGrid:RadDataGrid.GroupDescriptors>
                <common:PropertyGroupDescriptor PropertyName="HeaderName"/>
            </telerikGrid:RadDataGrid.GroupDescriptors>
             
            <telerikGrid:DataGridTemplateColumn>
                <telerikGrid:DataGridTemplateColumn.CellContentTemplate>
                    <DataTemplate>
                        <Label Text="{Binding ItemName}" />
                    </DataTemplate>
                </telerikGrid:DataGridTemplateColumn.CellContentTemplate>
            </telerikGrid:DataGridTemplateColumn>
             
        </telerikGrid:RadDataGrid.Columns>
    </telerikGrid:RadDataGrid>
</Grid>

 

aben
Top achievements
Rank 1
 answered on 30 Nov 2017
3 answers
185 views
Is there a way of detecting whether the calendar has changed month when in month mode?
Stefan Nenchev
Telerik team
 answered on 30 Nov 2017
1 answer
146 views

Is there a good Telerik UI for xamarin forms good RadListView with sqlite data source example?

The examples I've found mostly won't compile or embedded among a large example solution where they're just using a manual text list for the datasource.

Any good example out there of just a listview with a normal datasource like sqlite?

 

Lance | Senior Manager Technical Support
Telerik team
 answered on 29 Nov 2017
2 answers
85 views

Does the Telerik UI for Xamarin 2017.3.1123.2 now support compiling for Android 7 or 8?  Or do we still need to compile for Android 6?

 

Dan
Top achievements
Rank 1
 answered on 29 Nov 2017
2 answers
77 views

If there's an appointment, for example, that's 1st Jan 00:00am- 2nd Jan 00:00am, then the calendar will show it on three days - 31st, 1st and 2nd.

Is it possible to stop it from appearing on the days where it only starts or ends?

So, an appointment would not appear on a day when it starts at 00:00pm and when it ends at 00:00am. If an appointment started and finished at 00:00am and 00:00pm, then it could default to appearing on the day it starts.

Stefan Nenchev
Telerik team
 answered on 29 Nov 2017
8 answers
113 views

Dear Telerik Team.
First of all: Thank you for including the Xamarin stuff in my subscription.

Eager to try it I started a prototype project.
Then I ran into an error. But your ticket system didn't want me to send it. :) Here ist the ticket message:

I tried to install the VS4MAC extension, but it failed. As described
here: https://developer.telerik.com/featured/ui-xamarin-deep-dive-starting-strong/.
I installed the nuget and downloaded the lastest zip file. Version
Telerik_UI_for_Xamarin_2017_3_913_3_Dev.

Trying to install the mpack gives my the enclosed error message. It seems the mpack isn't updated yet.

Besides that your ticket system tells me: "Message required". But I wrote a
message. Maybe it didn't like the pasting in of my screenshot. I'll try
attaching it as file.

No. Didn't work. I restart the tiket submission. Maybe it works now.

No. I'll select the option OS parameter. Maybe now.

Kind regards
Bernd

Larry
Top achievements
Rank 2
 answered on 28 Nov 2017
8 answers
64 views

I have bound some appointments to the calendar and in day view I'm finding on the iPhone that as I step from day to day, appointment shapes appear and disappear from the day cells. Also, a whole day in the vertical area of the screen will be covered in a dark shade and the actual appointments which should be there will not be there at all or will be covered up by the dark shade.

Is there a way of avoiding these glitches? Otherwise this is too buggy to use.

Stefan Nenchev
Telerik team
 answered on 28 Nov 2017
8 answers
127 views

Hi,

I am having issues with a rating control nested inside a ListViewTemplateCell. The rating value (number of filled items) mismatches with the underlying bound value. The strange thing is that the initial rendered list is ok, but as soon as i start scrolling down the new appearing cells show the described problem. See the attached image. The rating value property is bound to an ObservableCollection<OBJ> via MVVM. I tried int and double, but no difference.

Any ideas? 

 

Here is my XAML test snippet:

01.<?xml version="1.0" encoding="utf-8" ?>
02.<ContentPage
03.x:Class="PortaalApp.Views.IncidentListPage" xmlns="http://xamarin.com/schemas/2014/forms"
04.xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:converters="clr-namespace:PortaalApp.Converters"
05.xmlns:i18n="clr-namespace:PortaalApp.I18n" xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
06.xmlns:prismBehaviors="clr-namespace:Prism.Behaviors;assembly=Prism.Forms" xmlns:rating="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
07.xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls" xmlns:telerikListView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.XamarinForms.DataControls"
08.xmlns:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives" xmlns:views="clr-namespace:PortaalApp.Views"
09.x:Name="this" prism:ViewModelLocator.AutowireViewModel="True">
10. 
11.<telerikDataControls:RadListView x:Name="listView" ItemsSource="{Binding ListSource}">
12. 
13.<telerikDataControls:RadListView.ItemTemplate>
14.<DataTemplate>
15.<telerikListView:ListViewTemplateCell>
16.<telerikListView:ListViewTemplateCell.View>
17.<StackLayout Orientation="Horizontal">
18.<rating:RadShapeRating
19.x:Name="inzetRating"
20.ItemShape="{x:Static rating:Geometries.Circle}"
21.Value="{Binding InzetIndex}" />
22.<Label Text="{Binding InzetIndex, StringFormat='{0}'}" />
23.</StackLayout>
24.</telerikListView:ListViewTemplateCell.View>
25.</telerikListView:ListViewTemplateCell>
26.</DataTemplate>
27.</telerikDataControls:RadListView.ItemTemplate>
28.</telerikDataControls:RadListView>
29.</ContentPage>

 

The underlying bound object:

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.10.6.0 (Newtonsoft.Json v9.0.0.0)")]
    public partial class OBJ_Result
    {
        public int InzetIndex
        {
            get
            {
                if (A) return 3;
                else if (B) return 2;
                else if (C) return 1;
                else return 0;
            }
        }
 
        [Newtonsoft.Json.JsonProperty("C", Required = Newtonsoft.Json.Required.Always)]
        public bool C { get; set; }
     
        [Newtonsoft.Json.JsonProperty("B", Required = Newtonsoft.Json.Required.Always)]
        public bool B { get; set; }
     
        [Newtonsoft.Json.JsonProperty("A", Required = Newtonsoft.Json.Required.Always)]
        public bool A { get; set; }
     
        public string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this);
        }
         
        public static OBJ FromJson(string data)
        {
            return Newtonsoft.Json.JsonConvert.DeserializeObject<OBJ>(data);
        }
    }

 

 

 

Stefan Nenchev
Telerik team
 answered on 27 Nov 2017
1 answer
105 views

Hi,

I am testing DataGrid for my first mobile app.  

If I set AutoGenerateColumns="True" then everything works great.

But if I try to manually create the columns in xaml, my app crashes in iOS.  I get an System.NullReferenceException on the "AppDelegate" line in main.cs.   I know I am setting the grid.ItemsSource to a valid List because AutoGenerateColumns is showing them.

Any ideas?

Russell
Top achievements
Rank 1
 answered on 26 Nov 2017
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?