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?
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>
<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>
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.
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
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.
I've tried everything I can think of. The documentation says:
Occurs when the associated data (Items
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.
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.
I'm binding a RadDataGrid to a DataTable and it works well, except:
So, basically, I don't see a way to do something after the binding is complete and the columns have been autogenerated.