Telerik Forums
UI for WPF Forum
0 answers
190 views

I am doing data virtualization using VirtualQueryableCollectionView.

I pass there IQueryable from EF.

var db = new ProductionContext();
IQueryable cards = db.Cards.OrderBy(x => x.CardId);
var view = new VirtualQueryableCollectionView(cards) { LoadSize = 50 };
cardsRadGridView.ItemsSource = view;

Its works fine. But how to make it asynchronous? (asynchronous loading, search, filtering) I searched for examples but found only examples for WCF like bellow

https://www.telerik.com/blogs/telerik-data-virtualization-wcf-ria-services-and-visual-studio-async-ctp?_ga=2.125533513.2135094116.1586865074-1480584776.1567419497

I tried to do the same for the EF

var db = new ProductionContext();
IQueryable cards = db.Cards.OrderBy(x => x.CardId);
 
Loaded += async (o, args) =>
{
    var view = new VirtualQueryableCollectionView<Card>
    {
        LoadSize = 50,
        VirtualItemCount = await TaskEx.Run(() => cards.Count())
    };
 
    view.FilterDescriptors.CollectionChanged += async (s, e) =>
    {
        view.VirtualItemCount = await
            TaskEx.Run(() => cards.Where(view.FilterDescriptors).Count());
    };
 
    view.FilterDescriptors.ItemChanged += async (s, e) =>
    {
        view.VirtualItemCount = await
            TaskEx.Run(() => cards.Where(view.FilterDescriptors).Count());
    };
 
    view.ItemsLoading += async (s, e) =>
    {
        var queryToLoad = cards
            .Sort(view.SortDescriptors)
            .Where(view.FilterDescriptors)
            .Skip(e.StartIndex)
            .Take(e.ItemCount);
 
        cardsRadGridView.IsBusy = true;
        view.Load(e.StartIndex, await TaskEx.Run(() => queryToLoad.ToIList()));
        cardsRadGridView.IsBusy = false;
    };
 
    cardsRadGridView.ItemsSource = view;
};

but it does not work(

Where can one find a good example of implementing this?

Denis
Top achievements
Rank 1
 asked on 16 Apr 2020
9 answers
1.7K+ views
Do you guys have any plans to implement a WPF status bar or is there a good way/example of using the toolbar control to imitate a status bar?

Thanks! 
Martin Ivanov
Telerik team
 answered on 15 Apr 2020
1 answer
85 views
When remove last bracket (>) in the XML with registered XmlFoldingTagger we get unhandled exception in the function GetFoldingRegionTitle because you are trying call Substring with -1 parameter.
Petar Mladenov
Telerik team
 answered on 15 Apr 2020
1 answer
513 views

I am rendering 50,000 data points per seconds one 3 charts my UI freezes at that point... I am running 3 charts updating in real time with new data points coming in every second so I add them to the collection, I am implementing data virtualization for the scrolling but when scrolled out and a large number of samples is where I see the freeze. They are scatter series and I am not using a point template I have rendering set to bitmap and "Batch" Is there any other ways to significantly improve the performance? My process is only using 20-30% CPU and 400-600mb ram I have tried it on a box with a GPU also with no better result... I am stumped on this one guys.

 

Thanks!

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Apr 2020
1 answer
103 views

When I click the button many times, the open and close buttons don't work. 

How should I solve the mistake?

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Apr 2020
5 answers
509 views
Hello everyone,

Is it possible to specify the display format for a property in the PropertyGrid?

I've tried the [DisplayFormat], but neither DataFormatString nor NullDisplayText seems to be making any difference whatsoever.

In my particular case, I want the DateTime property to be displayed as 'yyyy - MM - dd', but (as I mentioned), decorating the property with [DisplayFormat(DataFormatString = "yyyy - MM - dd")] doesn't work.

As far as I have noticed, PropertyGrid selects RadDateTimePicker for DateTime types by default, but for some dates I'd like the 'date' part only. I don't care much about editing (although that would be nice too), but it would be great to adjust the display for read-only property grids.

Is there any way to make that work?

(Controls version used: 2013.2.724)
declan
Top achievements
Rank 1
 answered on 14 Apr 2020
1 answer
606 views

Hi Team,

We have a parent window (RadRibbonWindow) which is being executed in a different app domain and then multiple child app domains opens a dialogs ( RadWindows).

Problem:

We can not set parent window from child windows as they are on different app domains. In MS controls we have functionality of WindowInteropHelper  that can be used to define an owner but in case of RadWindow we have a content control.

I have tried to set the content from respective app domin like (RadButton) to be parent which is also from related app domin but displayed in the main application but things are not working.

Any Ideas how to manage it.

Regards

Vladimir Stoyanov
Telerik team
 answered on 14 Apr 2020
1 answer
121 views

Hi Team,

I wanted to use the GridViewMultiColumnComboBoxColumn in my grid and bind it to data set which contain medium amount of data. The memory consumption is way more that I expected also it is taking alot more time to display the drop down. I switch to MultiColumnComboBox using template and it is working way better and can not see memory spikes.

Can you please help me on this. I am currently using Telerik version "2020.1.218"

 

 

Martin Ivanov
Telerik team
 answered on 14 Apr 2020
6 answers
902 views

My RadCartesianChart uses an AnnotationsProvider showing CartesianPlotBandAnnotations.  I set the LabelDefinitions with a DefaultVisualStyle that had the text as I wanted it.  And it honors every property I set except the text color.  That gets ignored, no matter what I set it to.  

I've attached an image that shows what it looks like.  You can see the region labels (literally named "Top" and "Bottom").  They show up in Italics as I want and using the FontSize I want.  But the color remains grey when I'm trying to set it to white.

Here's my label definition resource

<tk:ChartAnnotationLabelDefinition x:Key="BandLabelDefinition" Location="Inside" VerticalAlignment="Bottom">
    <tk:ChartAnnotationLabelDefinition.DefaultVisualStyle>
        <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource TextBlockStyle}">
            <Setter Property="FontSize"  Value="{Binding Source={core:Settings}, Path=FontSizeSmall}"/>
            <Setter Property="FontStyle" Value="Italic"/>
            <Setter Property="Foreground" Value="White"/>
        </Style>
    </tk:ChartAnnotationLabelDefinition.DefaultVisualStyle>
</tk:ChartAnnotationLabelDefinition>


And here's the bit where I set it in the style of the CartesianPlotBandAnnotation

<Style x:Key="RegionBandStyle"
       TargetType="{x:Type tk:CartesianPlotBandAnnotation}">
 
    <d:Style.DataContext>
        <x:Type Type="core:IProfileRegion" />
    </d:Style.DataContext>
 
    <Setter Property="Label"                     Value="{Binding Name}"/>
    <Setter Property="LabelDefinition"     Value="{StaticResource BandLabelDefinition}"/>

What am I missing here?  How may I set the font color in a label definition?

(Note: I also tried the approach of using the ChartAnnotationLabelDefinition.Template property instead of "DefaultVisualStyle".  That didn't help at all)

 


Dinko | Tech Support Engineer
Telerik team
 answered on 13 Apr 2020
3 answers
255 views

I've noticed that if I have a child of a RadWindow that is currently in a validation error state, I cannot utilize the RadWindow's minimize, maximize or close buttons.

For example, a RadGridView with items that implement INotifyDataErrorInfo, when a new item is added, the new item's fields are invalid, but I cannot click the RadWindow's buttons unless I cancel out of the new row.

In addition, when adding debugging output to the events for the RadGridView's events, I've found that if I am in the middle of an edit in a cell, clicking any of the RadWindow's buttons causes it to fire the events for the cell and row edits ending prior to firing any of the RadWindow's events, such as clicking the close button fires the PreviewClosing event after the RadGridView's events.

Is there a way to give precedence to the RadWindow's buttons so they can be utilized regardless of the state of controls within the window and to run their events prior to controls in the RadWindow?

Vladimir Stoyanov
Telerik team
 answered on 13 Apr 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?