Telerik Forums
UI for Xamarin Forum
1 answer
16 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
25 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
1 answer
37 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
1 answer
72 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
4 answers
533 views

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

Didi
Telerik team
 updated answer on 10 Mar 2023
1 answer
308 views

Hello Support,

We are using RadListView and RadDataGrid controls in our UWP and iOS applications. On these controls we observed there is a lag when we scroll fast, this lag is with the control's default scroll  Please see attached video (UWP_without_scrollview.mp4 and iOS_without_scrollview.mp4) for our UWP and iOS applications, you will see the white space when scrolling very fast.   

Further, we tried adding Xamarin's ScrollView over the RadListView and RadDataGrid controls, with this we do not see the lag when scrolling fast (see attached video UWP_with_scrollview.mp4 and iOS_with_scrollview.mp4).

In the documention for the RadListView and RadDataGrid controls, (refernce https://docs.telerik.com/devtools/xamarin/controls/listview/listview-getting-started#:~:text=Telerik.XamarinForms.DataControls%22-,WARNING,-%3A%20RadListView%20control%20provides), it is mentioned that if we add Scrollview to these controls, it would have issue withe the UI Virtulization or Gesture Mechanism. Kindly let us know if can continue using Xamarian ScrollView with the RadListView and RadDataGrid controls?

Also please let us know if there is any other way to get around the lagging issue with using the the RadListView and RadDataGrid default Scroll.

Didi
Telerik team
 answered on 14 Nov 2022
1 answer
142 views

I've tried everything I can think of. The documentation says:

Occurs when the associated data (ItemsSource) has been successfully bound to the control or any data operation like Group, Sort or Filter is applied. This event is useful if an additional action is required once the data is ready to be visualized.

But in none of those circumstances is this event firing for me. I was particularly hoping for it to fire after Grouping, Sorting, and/or Filtering through the UI.

Yana
Telerik team
 answered on 13 May 2022
2 answers
75 views

I read the topics on creating a custom DataGridTextFilterControl that is case insensitive and that works. But I want the text filter with the multiple clauses ANDed or ORed together (the text filters in the CompositeFilterDescriptor) to be case insensitive as well. 

I don't see a way to create a DataGridTypedFilter or a composite filter, since they're all internal.

There should be a way to set the case insensitive option lower in the object hierarchy, but I can't find it.

What is the purpose of the ApplyFilter command, which fires when you click "Filter" on the filter popup, if it provides no information about the filter that is about to be applied? It looks like I need a handle to the FilterDescriptor that is about to be applied and then I could dig down into the CompositeFilterDescriptor and set the IsCaseSensitive property before it's applied.

Any hints or options that I've missed?

Also, I'm Binding to a DataTable with AutoGenerateColumns=true, so setting up the filtering via XAML on a per column basis is not a solution for us.

Christopher
Top achievements
Rank 2
Iron
Iron
 answered on 11 May 2022
1 answer
160 views

I'm binding a RadDataGrid to a DataTable and it works well, except:

  • I want to hide a few of the columns from the grid without removing them from the DataTable
  • The BindingContextChanged event fires before the columns are created, so I cannot iterate the columns there and hide the ones I don't want to see
  • The DataBindingComplete event never fires at all (at least when binding to the DataTable). It also doesn't fire when the table is Grouped, Sorted, or Filtered although the documentation says it will
  • It also doesn't seem to fire the DataBindingComplete even if the AutoGenerateColumns is set to False (although, as expected, there are no columns displayed at all in this case)

So, basically, I don't see a way to do something after the binding is complete and the columns have been autogenerated.

Yana
Telerik team
 answered on 05 May 2022
1 answer
46 views
I'm working on Xamarin forms app and trying to implement a DataGrid. Source came from server which use Kendo and have some option how to show this data in Web. Is it possible to use this settings with Telerik or need to create own parser and control to display this data?
Lance | Manager Technical Support
Telerik team
 answered on 15 Mar 2022
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?