Telerik Forums
UI for WPF Forum
24 answers
708 views

Hello Telerik,

 

I have an issue when I try using your IsBusy property inside a grid.

Happens that the panel won't disappear. I tried using several of those "Loaded" events to make it happen manually (grid.IsBusy = false;), but then it won't even show at all.

I am using virtualization and infinite scrolling in my grid.

I just need a solution to hide the spinner when the data finish loading.

 

here is my code:

 

MainWindow.xaml

<Window x:Class="TelerikVirtualization.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 
                Title="MainWindow" Height="900" Width="700" >
 
    <Window.Resources>
        <Style x:Key="VitorStyle" TargetType="telerik:RadGridView" >
            <Setter Property="AutoGenerateColumns" Value="False"></Setter>
            <Setter Property="FilteringMode" Value="FilterRow"></Setter>
        </Style>
    </Window.Resources>
    <Grid>
            <Grid.Resources>
            <DataTemplate x:Key="RowDetailsTemplate">
                <telerik:RadGridView Name="playersGrid"  Style="{StaticResource VitorStyle}" IsBusy="True"
                                     ItemsSource="{Binding Children}" >
                    <telerik:RadGridView.ControlPanelItems>
                        <telerik:ControlPanelItem ButtonTooltip="Column chooser">
                            <telerik:ControlPanelItem.Content>
                                <ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox Content="{Binding Header, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </telerik:ControlPanelItem.Content>
                        </telerik:ControlPanelItem>
                    </telerik:RadGridView.ControlPanelItems>
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ParentID}"/>
                    </telerik:RadGridView.Columns>
 
                     
                </telerik:RadGridView>
            </DataTemplate>
        </Grid.Resources>
        <telerik:RadGridView Name="RadGridView"  ItemsSource="{Binding View}" Style="{StaticResource VitorStyle}" IsBusy="True"
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}" AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewToggleRowDetailsColumn/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UnitPrice}" Header="UnitPrice" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Date}"
                                            Header="Date"
                                            DataFormatString="{}{0:dd/MM/yyyy}"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Discontinued}"/>
            </telerik:RadGridView.Columns>
 
            <telerik:RadGridView.ControlPanelItems>
                <telerik:ControlPanelItem ButtonTooltip="Column chooser">
                    <telerik:ControlPanelItem.Content>
                        <ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <CheckBox Content="{Binding Header, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </telerik:ControlPanelItem.Content>
                </telerik:ControlPanelItem>
            </telerik:RadGridView.ControlPanelItems>
 
        </telerik:RadGridView>
    </Grid>
</Window>

MainWindow.xaml.cs

using System.ComponentModel;
using System.Windows;
namespace TelerikVirtualization
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        BackgroundWorker worker = new BackgroundWorker();
        public MainWindow()
        {
            InitializeComponent();
            DataContext = new ViewModel();
        }
}

ViewModel.cs  *(install Fody.PropertyChanged nugget to make have it compiling)

using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Telerik.Windows.Data;
using System.Linq;
using System.Collections;
 
namespace TelerikVirtualization
{
    [ImplementPropertyChanged]*
    public class ViewModel
    {
        public VirtualQueryableCollectionView View { get; set; }
        Controller controller;
        public ViewModel()
        {
            controller = new Controller();
            View = new VirtualQueryableCollectionView(controller.GetList()) { LoadSize = 10 };
        }
    
}

Controller.cs

using System;
using System.Linq;
 
namespace TelerikVirtualization
{
    public class Controller
    {
        public IQueryable GetList()
        {
            DataClasses1DataContext context = new DataClasses1DataContext();
            var result = from x in context.MyTables
                     select new MyTableEntity() {
                         Date = x.Date.GetValueOrDefault(DateTime.Now),
                         Name = x.Name,
                         UnitPrice = x.UnitPrice.GetValueOrDefault(0),
                         id = x.ID,
                         Discontinued = x.Discontinued,
                         Children = (from y in context.MyChildTables
                                     where y.ParentID == x.ID
                                     select new MyChildTableEntity { ID = y.ID, Name = y.Name, ParentID = y.ParentID })
                     };
            return result;
        }
    }
 
    public class MyTableEntity
    {
        public int id { get; set; }
        public string Name { get; set; }
        public decimal UnitPrice { get; set; }
        public DateTime Date { get; set; }
        public object Children { get; set; }
        public bool ? Discontinued { get; set; }
    }
    public class MyChildTableEntity
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public int ? ParentID { get; set; }
 
    
}

 

 

Thank you.

 

 

 

 

 

 

 

 

 

 

Dilyan Traykov
Telerik team
 answered on 23 Aug 2019
5 answers
631 views
Hi.
Just a question: The SelectedItem is not bindable to a property in the ViewModel on a MVVM pattern?

If not, how to get the selectedItem in the ViewModel?
I need becouse I've to manage the add and remove buttons.

Thanks and regards.

Andrea
Martin Ivanov
Telerik team
 answered on 23 Aug 2019
1 answer
98 views

Hi!

how can I set a Tips when RadDiagramShape MouseOver。

I want to Lock the Diagram,but want the Element event can work.

if I Set the IsEnabled is false . (RadDiagramShape_MouseMove) is not Working

Dimitar Dinev
Telerik team
 answered on 22 Aug 2019
1 answer
181 views

Hi!

I am using RadDiagram and in my diagram.

how can I Show a Text Tips when RadDiagramShape MouseOver ?

Thanks

Dimitar Dinev
Telerik team
 answered on 22 Aug 2019
4 answers
197 views
Is there any example i can see for RadGridView with a lookup column?

Thank you,
TM
Tom
Top achievements
Rank 1
 answered on 21 Aug 2019
3 answers
157 views

Hello,

I have a spline series on a cartesian graph, the y values can vary from -750000 to 1000000. I would like to display the labels as multiples of .0001 to save some screen space. I can't see a property to do it.

Thanks.

Alan

Martin Ivanov
Telerik team
 answered on 20 Aug 2019
2 answers
633 views

Saw instructions on how to use tags GroupByExpression, SelectFields, GroupByFields to sort groups by a sequence number.  However, these tags are not available to me to use.

 

So, I would like to use standard RadGridView properties and techniques to create 3 groups that will be sorted by a sequence number...

 

3 Columns: Process, Date, Version

3 Groups ordered top to bottom: Group1, Group2, Group3.

When I click on the column name "Process" for example, currently the groups move up or down.

I want to keep the groups in the same visual order Group1, Group2, Group3 but only sort each column within the group.

Any ideas?

Keith
Top achievements
Rank 1
 answered on 19 Aug 2019
1 answer
230 views

I have a RadGridView, in the first column is an AutoCompleteBox for searching names. I will search name and paste in to the same column. 

I have build the AutoCompleteBox in RadgridView.CellEditTemplate like this:

 

<telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        TextSearchMode="Contains"
                                                        TextSearchPath="Name"
                                                        SearchText="{Binding Path=Name, Mode=TwoWay}"
                                                        AutoCompleteMode="Suggest"
                                                        SelectionMode="Single"     
                                                        BoxesItemStyle="{StaticResource RadAutoCompleteBoxStyle}"
                                                        NoResultsContentTemplate="{StaticResource RadAutoCompleteBoxNoResultsContentTemplate}"
                                                        NoResultsContent="{x:Static resources:Translations.lbl_NoMatches}"
                                                        ItemsSource="{Binding Path=DataContext.Project.Customers, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}">

 

But i always get error "System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'", if i type in the column. DisplayMemberPath="Name" and SearchText="{Binding Path=Name, Mode=TwoWay}" ara in conflict. Can sameone help me?

 

Thanks in advance.

 

Martin Ivanov
Telerik team
 answered on 19 Aug 2019
4 answers
468 views

Hi Telerik,

I'm using a RadTreeListView with allowed filters.

> 'MyTreeListView.png' showing you my expanded tree.

 

When I click on the filter buttons, the panel is displayed, but in the values area, there are only the values of the "parent" rows (like in the 'Filter1' & 'Filter2' attached files).

 

I want to know if is it possible to display all existing values in the column ?

For example, in 'Filter2' screen, there will be :

[ ] nul

[ ] Task 1.1 A

[ ] Task 1 A

[ ] Task 1 B

[ ] Task 2 A

 

Thank you !

Valentin.

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 19 Aug 2019
4 answers
287 views
Hi,
How do I set the background color of the ControlPanel of the RadGridView ?
Barry
Martin Ivanov
Telerik team
 answered on 19 Aug 2019
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?