I change a RadListView's SelectedItem programmatically. When I do, I need RadListView to scroll to the new SelectedItem. This thread discusses the issue: https://www.telerik.com/forums/implementing-scroll-to-item
My Solution has both Android and iOS projects. I'm starting with iOS by implementing the class shown below. The code does not crash, but neither does it work. Any hints or ideas you have would be most welcome. I also need to get this working on Android.
Thanks in advance for your help.
P.S. My initial impression is that this scrolling should be included out-of-the-box. Please consider this an enhancement request.
public class RadListViewRenderer : Telerik.XamarinForms.DataControlsRenderer.iOS.ListViewRenderer
{
private RadListView listView = null;
private NSIndexPath indexPath;
protected override void OnElementChanged(ElementChangedEventArgs<RadListView> e)
{
base.OnElementChanged(e);
listView = e.NewElement;
if (listView != null)
{
listView.SelectionChanged += selectionChanged;
}
}
private void selectionChanged(object sender, NotifyCollectionChangedEventArgs args)
{
if (args.NewItems?.Count > 0 && listView != null)
{
int index = (int)listView.ItemsSource.GetType().GetMethod("IndexOf").Invoke(listView.ItemsSource, new[] {args.NewItems[0]});
indexPath = NSIndexPath.FromItemSection(index, 0);
Control.ScrollToItem(indexPath, UICollectionViewScrollPosition.Top, false);
}
}
}
Hello,
I have a field with a creditcard input and only need the numeric keyboard.
My Problem is that the IntegerEditor only allows up to 10 digits...
Is it possible to show the numeric keyboard when the TextEditor is in use ?
When I add or remove an list item, The Image control in the Template do not show(when add several items, the first Picture show a blank however others works).
When I remove an item, the most item will works bad, the Image in the item will don't show however the listview's itemResource has the correct data.
There is not any mistake in Android, It works well.
Here are my xaml:
<!--<telerikDataControls:RadListView.ItemTemplateSelector>
<local:Entities.CustomItemTemplateSelector>
<local:Entities.CustomItemTemplateSelector.Template1>
<DataTemplate>
<telerikListView:ListViewTemplateCell Tapped="ListCellTapped" >
<telerikListView:ListViewTemplateCell.View>
<StackLayout Orientation="Horizontal" BackgroundColor="White" >
<Image Margin="10" Aspect="AspectFit" Source="{Binding ImgSource}"/>
</StackLayout>
</telerikListView:ListViewTemplateCell.View>
</telerikListView:ListViewTemplateCell>
</DataTemplate>
</local:Entities.CustomItemTemplateSelector.Template1>
<local:Entities.CustomItemTemplateSelector.Template2>
<DataTemplate>
<telerikListView:ListViewTemplateCell Tapped="ListCellTapped" >
<telerikListView:ListViewTemplateCell.View>
<StackLayout Orientation="Horizontal" BackgroundColor="White">
<telerikInput:RadButton BackgroundImage="add.png" WidthRequest="100" HeightRequest="100" BorderRadius="50" Clicked="AddPicBtn_Clicked"/>
</StackLayout>
</telerikListView:ListViewTemplateCell.View>
</telerikListView:ListViewTemplateCell>
</DataTemplate>
</local:Entities.CustomItemTemplateSelector.Template2>
</local:Entities.CustomItemTemplateSelector>
</telerikDataControls:RadListView.ItemTemplateSelector>-->
It works well if I don't use the template selector.
Hi!, im trying to use an image instead of text using HeaderContentTempleate.
Is working until datagrid scroll from left to right, then datagrid display images randomly in other column header.
This is my DataGrid code, i couldnt find any documentation or sample code. Im using 2017.3 Xamarin Forms, inside a PCL project. The issue occurs in Android, dont know if its working well in iOs or not.
<telerikGrid:RadDataGrid x:Name="DataGrid" AutoGenerateColumns="False" Margin="5" Grid.Row="1">
<telerikGrid:RadDataGrid.Columns>
<telerikGrid:DataGridNumericalColumn PropertyName="PosicionGeneral">
<telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
<DataTemplate>
<Image HorizontalOptions="Center" Source="pos.png" WidthRequest="50" BackgroundColor="Transparent" VerticalOptions="Center" />
</DataTemplate>
</telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
</telerikGrid:DataGridNumericalColumn>
<telerikGrid:DataGridNumericalColumn PropertyName="PosicionCategoria">
<telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
<DataTemplate>
<Image HorizontalOptions="Center" Source="poscat.png" WidthRequest="50" BackgroundColor="Transparent" VerticalOptions="Center" Margin="10,0,10,0"/>
</DataTemplate>
</telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
</telerikGrid:DataGridNumericalColumn>
<telerikGrid:DataGridNumericalColumn PropertyName="Dorsal" >
<telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
<DataTemplate>
<Image HorizontalOptions="Center" Source="dorsal.png" WidthRequest="50" BackgroundColor="Transparent" VerticalOptions="Center" Margin="10,0,10,0"/>
</DataTemplate>
</telerikGrid:DataGridNumericalColumn.HeaderContentTemplate>
</telerikGrid:DataGridNumericalColumn>
<telerikGrid:DataGridTextColumn PropertyName="Nombre" HeaderText="Nombre"/>
<telerikGrid:DataGridTextColumn PropertyName="Apellidos" HeaderText="Apellidos"/>
<telerikGrid:DataGridTextColumn PropertyName="Tiempo" >
<telerikGrid:DataGridTextColumn.HeaderContentTemplate>
<DataTemplate>
<Image HorizontalOptions="Center" Source="crono.png" HeightRequest="35" BackgroundColor="Transparent" VerticalOptions="Center"/>
</DataTemplate>
</telerikGrid:DataGridTextColumn.HeaderContentTemplate>
</telerikGrid:DataGridTextColumn>
<telerikGrid:DataGridTextColumn PropertyName="Sexo" HeaderText="Sexo"/>
</telerikGrid:RadDataGrid.Columns>
</telerikGrid:RadDataGrid>
Button cannot have both border radius and border thickness?
Rounded corner is gone when thickness is applied.
Hi Team,
I want set animation for Slide View/Carousel View
Using Telerik I want achieve Slide View.. like Slide Goes Right to Left or Vies Versa
I have attached image like this I want achieve
Please explain how can get this animation
Regards
Pramod
One can easily change the background color of the TabHeader, but there is no easy way to change the Text (Foreground) color. The only do this, that I have seen, is to create (via code), custom tab header content (see bottom).
This actually bring up another issue / question: there does not appear to be a way to declare a tab header template. I would prefer to declare my header template in XAML and have it applied to each tab. Am I missing something?
var tab =
new
TabViewItem
{
BindingContext = item.OriginalValue
};
var tabLayout =
new
StackLayout
{
Spacing = 0,
StyleClass =
new
[] {
"SubTab"
}
};
tabLayout.Children.Add(
new
Label()
{
Text = item.Name,
StyleClass =
new
[] {
"SubTabItemText"
}
});
tab.Header.Content = tabLayout;
Tabs.Items.Add(tab);
Hi,
I want to make all the dates disabled and just leaving some dates in a list of date enable.
Can anyone tell me how to do that?
Thanks a lot!
Hello,
Is it possible to have nested groups and headers in ListView?
Like:
Group 1 header
-Group 2 header
----item
----item
--Group 2 header
----item
Group 1 Header
-Group 2 header
----item
-Group 2 header
----item
Since the Telerik NuGet package server does not show RC1, how are we supposed to upgrade existing projects to use RC1? Manually add all the references?
I ran the "Progress Control Panel" and all it did was add files in my program file(s) folders (including example code that crashes).