Telerik Forums
UI for Xamarin Forum
1 answer
81 views

Hi,

I need to show suggestios when user focues on control or deletes text completely but this is not working as expected. My custom filter function already retruns data properly for empty search strings.

This is my TextCahnged event implemtation:

        private void usersAutoCompleteView_TextChanged(object sender, TextChangedEventArgs e)
        {
            var control = (RadAutoCompleteView)sender;
            if (string.IsNullOrEmpty(e.NewTextValue) && !string.IsNullOrEmpty(e.OldTextValue))
            {
                control.ShowSuggestions();
            }
        }

And this is my Focused event implementation:

        private void usersAutoCompleteView_Focused(object sender, FocusEventArgs e)
        {
            var control = (RadAutoCompleteView)sender;
            if (string.IsNullOrEmpty(control.SearchText))
            {
                control.ShowSuggestions();
            }
        }

I am also using SuggestionItemSelected event but is really simple: 
      private void usersAutoCompleteView_SuggestionItemSelected(object sender, Telerik.XamarinForms.Input.AutoComplete.SuggestionItemSelectedEventArgs e)
      {
          MyUser = (e.DataItem as MyModel).User;
      }

If I use Focused for showing Suggestions everything works fine, but when I added TextChanged nothings works as shoud:

1) Suggestion menu is never shown from TextChanged event

2) When I select Item from Suggsetion menu, text on the control gets immediately deleted (Text changed is getting called again with empty NewTextValue)

3) When I remove usage for TextChanged  event misbehaviour is still there. I need to clean whole build/restart VS/emulator to get it running again.

 

How should I achieve this functionality? It should be simple, for me it's looks like a common scenario

 

 

 

Didi
Telerik team
 answered on 08 Jan 2024
1 answer
83 views

I need to differentiate between CellTap and CellDoubleTap commands.
I registered both commands:

 DataGrid.Commands.Add(new CellDoubleTapUserCommand());
 DataGrid.Commands.Add(new CellTapUserCommand());

But when I double tap cell, the CellTap command is also fired.
Is there any out of the box solution fo this?

Didi
Telerik team
 answered on 05 Jan 2024
1 answer
84 views

Hi,

I am trying to change cursor color and border when AutoCompleteView is in Focus. How to do this? I can't find any renderer for this control in Telerik.XamarinForms.InputRenderer Namespace

Didi
Telerik team
 answered on 21 Dec 2023
1 answer
138 views

Hello,

currently I'm experimenting with RadDataGrids and stumbled on the issue that the scrollbar on UWP is blocking the content (including the options button which is also not clickable because of it, screenshot is attached).

Looks like inputtransparent=true and cascadeinputtransparent=false on the scrollbar within the DataGrids is missing or something like that

Code Snippet (screenshot is attached):

<Grid Grid.Row="1">
	<Grid.ColumnDefinitions>
		<ColumnDefinition Width="Auto"/>
		<ColumnDefinition Width="*"/>
	</Grid.ColumnDefinitions>
	<Grid.RowDefinitions>
		<RowDefinition />
		<RowDefinition />
	</Grid.RowDefinitions>
	<dataGrid:RadDataGrid Grid.Column="0"  Grid.RowSpan="2"
				  ItemsSource="{Binding Resources}"
				  AutoGenerateColumns="True"
				  UserEditMode="Cell"
				  >
		
	</dataGrid:RadDataGrid>

	<Label Grid.Column="1" Grid.Row="0" Text="Placeholder for future adventures 🦄." BackgroundColor="PaleTurquoise"/>

	<dataGrid:RadDataGrid Grid.Column="1" 
				Grid.Row ="1"
				ItemsSource="{Binding Resources}"
				AutoGenerateColumns="True"
				UserEditMode="Cell"
				>
	</dataGrid:RadDataGrid>
</Grid>

Didi
Telerik team
 answered on 24 Nov 2023
0 answers
72 views

Hi, after updating to telerik ui for xamarin 2023.3.1010 I am experiencing crashes in radlistview ListViewUserCommand ItemTap.

In my command I find the selected object in the bound list, and i set one of its flags. The problem occurs when the set triggers the onpropertychanged event of one of those flags, and then it fully crashes the app completely

Vlad
Top achievements
Rank 1
 asked on 15 Nov 2023
1 answer
104 views
I am using a picker column in a grid for all rows. When I double-click anywhere in the rows, all the selected values refresh and ask to 'Select a bin' again.  Also, there are no click events triggered in the grid. How to solve this issue?
      <telerikDataGrid:DataGridPickerColumn PropertyName="BinName" HeaderText="Dest_Bin" CanUserEdit="False">
                                <telerikDataGrid:DataGridPickerColumn.CellContentTemplate>
                                    <DataTemplate>
                                        <StackLayout Orientation="Horizontal">
                                            <Picker x:Name="BinPicker" Title="Select a Bin" ItemsSource="{Binding Dest_BinList, Converter={StaticResource BinSiteListConverter}}" SelectedItem="{Binding BinName}" SelectedIndexChanged="SiteBinPicker_SelectedIndexChanged" TextColor="Black" TitleColor="Coral" FontSize="15" >
                                            </Picker>
                                        </StackLayout>
                                    </DataTemplate>
                                </telerikDataGrid:DataGridPickerColumn.CellContentTemplate>
                            </telerikDataGrid:DataGridPickerColumn>

Didi
Telerik team
 answered on 27 Oct 2023
4 answers
197 views

I cannot for the life of me get IsChecked to bind properly to a data source so I can't use it against a model. How is one supposed to do it? This doesn't work:

IsChecked="{Binding Selected}"

 

n/a
Top achievements
Rank 1
Iron
Iron
 updated answer on 04 Oct 2023
0 answers
134 views

I using Light and Dark themes in my app.

In each theme I set Styles for BorderStyle and RadEntry.

<telerikInput:BorderStyle x:Key="EntryBorderStyle"
                          CornerRadius="5"
                          BorderColor="{DynamicResource PrimaryColor}"
                          BorderThickness="1"/>

<Style TargetType="{x:Type telerikInput:RadEntry}">
    <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
    <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}" />
    <Setter Property="BorderStyle" Value="{DynamicResource EntryBorderStyle}" />
    <Style.Triggers>
        <Trigger TargetType="telerikInput:RadEntry" Property="IsEnabled" Value="False">
            <Setter Property = "TextColor" Value="{DynamicResource DisabledTextColor}"/>
        </Trigger>
    </Style.Triggers>
</Style>

but when I use RadEntry on ContentPage, styles are not attached properly, BorderColor not work after app start.

The only way to properly working Style is to add styles to ContentPage.Resources, remove entry and add again and HotReload page.

I also check solution with adding StaticResource in App.xaml:

<Application.Resources>
    <ResourceDictionary>
        <telerikInput:BorderStyle x:Key="EntryBorderStyle"
                                CornerRadius="5"
                                BorderColor="{DynamicResource PrimaryColor}"
                                BorderThickness="1"/>

        <telerikInput:BorderStyle x:Key="EntryErrorBorderStyle"
                                CornerRadius="5"
                                BorderColor="{DynamicResource ErrorColor}"
                                BorderThickness="1" />

        <Style TargetType="telerikInput:RadEntry">
            <Setter Property="BorderStyle" Value="{StaticResource EntryBorderStyle}" />
            <Setter Property="BackgroundColor" Value="{DynamicResource EntryBackgroundColor}" />
            <Setter Property="TextColor" Value="{DynamicResource TextThemeColor}" />
            <Style.Triggers>
                <Trigger TargetType="telerikInput:RadEntry" Property="IsEnabled" Value="False">
                    <Setter Property = "TextColor" Value="{DynamicResource DisabledTextColor}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
and it alos doesn't work.

 

n/a
Top achievements
Rank 1
Iron
Iron
 updated question on 21 Sep 2023
0 answers
146 views

I have a rad list and i use BindingContextChanged to change isVisible trueOrFalse based on some coditions but it returns me the list where some items have white space down and some other items the bottom margin cut the infos in half.

 

Ioannis
Top achievements
Rank 1
Iron
 asked on 26 Jul 2023
1 answer
128 views

Say I have a table with columns AA, BB, CC, DD and, via the More menu under the filtering and grouping options, I turn off the AA column and rearrange the others so that it is displayed as CC, BB, DD.

I then do:

var dataView = dataGrid.GetDataView();

var rows = dataView.Cast<DataRowView>().Select(x => x.Row).ToList();

Then if I iterate through the rows[index].ItemArray, the fields are in the original order (AA, BB, CC, DD). I can look at the RadDataGrid.Columns and see if the column IsVisible, but if I use the index in the ItemArray on the Columns, I won't get the right column.

What am I missing? It seems like the DataView should have the data in the order presented or that the Columns collection should have a way to map the ordering. After all, the DataView does present the filtering, grouping, and sorting correctly.

I wrote code to do my own mappings, but it's kind of ugly and seems unnecessary - there should be a way to either get the data in the order presented or get the columns in the order presented.

As for why I'm doing this - I'm using the DataGrid in a UWP and iPad Xamarin.Forms app to take report output and let the user's rearrange columns, filter, sort, turn off unwanted columns, etc. then export to Excel in a WYSIWYG fashion - the export should look like the current state of the DataGrid.

Ves
Telerik team
 answered on 11 Jul 2023
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?