Hi Team,
I am using RadTabView, which contains 2 tabs.
1st Tab has RadEntry and 2nd tab has custom grid (not telerik).
When I click on 2tab and without the 2nd tab being appeared properly when I click on 1st tab, the app is getting crashed saying System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'Telerik.XamarinForms.InputRenderer.Android.BorderEditText'.'
Using following version:
Xamarin Forms:- 5.0.0.2515
Telerik UI For Xamarin:- 2022.3.914.1
Kindly help me out with this.
Thanks & Best Regards,
Mohammed Rameez Raza.
Hello all together.
The problem is, that the RadDataGrids horizontal scrolling stops working on dynamically reloading the RadDataGrids ItemsSource. Horizontal srolling is no longer possible then. (I have a bit of a complex UI, where the RadDataGrid is wrapped inside a Grid inside a StackPanel, ..., but I could not find any coherence to the issue.)
What you need:
1. RadDataGrid with 1 DataGridTemplateColumn
2. ItemsSource bound to ObservableCollection in ViewModel
3. DataTemplate in Column 1 with Label to display text from binding through ItemsSource. Important: Text length to display in the Label must be wider than RadDataGrids with, to let the horizontal scollbar appear.
4. Two buttons in the view. On each button tap reassign the ObservableCollection in ViewModel with "new ObservableCollection" (see added source code).
5. Switch two or three times between Button1 and Button2 to let the ItemsSource be reassigned.
6. Try horizontal scrolling on white space in RadDataGrid. Scrollbar won't appear and scrolling won't be possible. If you set RadDataGrids SelectedItem after reassining the ItemsSource, scolling will only be possible again if you tap the selected item again.
(property ListItems is binding to RadDataGrids ItemsSource. Source code is not optimized, just from scratch to catch the point.)
private void Button1ClickCommand()
{
List<
string
> list = new List<
string
>
{
"This is a very long text for testing horizontal scrollbar issue.",
"This is a very long text for testing horizontal scrollbar issue.",
"This is a very long text for testing horizontal scrollbar issue.",
"This is a very long text for testing horizontal scrollbar issue.",
"This is a very long text for testing horizontal scrollbar issue.",
"This is a very long text for testing horizontal scrollbar issue."
};
Device.BeginInvokeOnMainThread(() => ListItems = new ObservableCollection<
string
>(list));
}
private void Button2ClickCommand()
{
List<
string
> list = new List<
string
>
{
"This is another very long text for testing horizontal scrollbar issue.",
"This is another very long text for testing horizontal scrollbar issue.",
"This is another very long text for testing horizontal scrollbar issue.",
"This is another very long text for testing horizontal scrollbar issue.",
"This is another very long text for testing horizontal scrollbar issue.",
"This is another very long text for testing horizontal scrollbar issue."
};
Device.BeginInvokeOnMainThread(() => ListItems = new ObservableCollection<
string
>(list));
}
ObservableCollection<
string
> listItems;
public ObservableCollection<
string
> ListItems
{
get
{
return listItems;
}
set
{
listItems = value;
OnPropertyChanged();
}
}
Thank you,
best regards
Martin
I using styling validation on form by DataTrigger.
When Validator.IsValid == false then DataTrigger changes specified feature.
In case of standard RadEntry control, I could specify BorderColor.
But how to work with RadNumericinput when such control not exposes any input element property?
<telerikInput:RadNumericInput x:Name="numericInput"
IsEnabled="{Binding IsEnabled}"
Value="{Binding Value,Mode=TwoWay}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand">
<telerikInput:RadNumericInput.Triggers>
<DataTrigger TargetType="telerikInput:RadNumericInput"
Binding="{Binding Validator.IsValid}"
Value="False">
<Setter Property="BorderStyle">
<telerikInput:BorderStyle BorderColor="{DynamicResource ErrorColor}" />
</Setter>
</DataTrigger>
</telerikInput:RadNumericInput.Triggers>
</telerikInput:RadNumericInput>
I using LightTheme and DarkTheme in app.
But I have a problem with +/- buttons CornerRadius and Entry border styling.
They are not react to specified style.
How to style buttons and entry to custom apperance without override whole control template?
Documentation is too poor in this context.
Here is my xaml:
<telerikInput:RadNumericInput x:Name="numericInput"
IsEnabled="{Binding IsEnabled}"
Value="{Binding Value,Mode=TwoWay}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand">
</telerikInput:RadNumericInput>
And syles:
<Style TargetType="{x:Type telerikInput:RadNumericInput}">
<Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
</Style>
<Style TargetType="{x:Type telerikNumericInput:NumericInputButton}">
<Setter Property="BorderRadius" Value="5" />
<Setter Property="BorderColor" Value="{DynamicResource PrimaryColor}"/>
<Setter Property="TextColor" Value="{DynamicResource TextThemeColor}"/>
<Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0,0,0,0"/>
</Style>
<Style TargetType="{x:Type telerikNumericInput:NumericInputEntry}">
<Setter Property="TextColor" Value="{DynamicResource TextThemeColor}"/>
<Setter Property="Padding" Value="0,0,0,0"/>
<Setter Property="Keyboard" Value="Numeric"/>
<Setter Property="BorderStyle">
<Setter.Value>
<telerikInput:BorderStyle>
<telerikInput:BorderStyle.BorderThickness>
<OnPlatform x:TypeArguments="Thickness" Default="1">
<On Platform="Android" Value="1"/>
<On Platform="iOS" Value="1"/>
<On Platform="UWP" Value="1"/>
</OnPlatform>
</telerikInput:BorderStyle.BorderThickness>
</telerikInput:BorderStyle>
</Setter.Value>
</Setter>
</Style>