Telerik Forums
UI for WPF Forum
3 answers
136 views

Hello Telerik,

 

I am having a very strange issue when clicking on a row of a grouped grid populated by a VirtualQueryableCollectionView object

It turns out it duplicates itself.

I simulated it in the most simple solution I could think of. Check the attached pictures.

Please heIp me find a workaround for this issue.

The database I used contains only one table, having 4 rows on it.

And here is my code:

MainWindow.xaml

<Window x:Class="GroupingRowClickIssue.MainWindow"
        xmlns:local="clr-namespace:GroupingRowClickIssue"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
        Loaded="Window_Loaded"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
 
        <telerik:RadGridView Name="RadGridView"  ItemsSource="{Binding View}"  AutoGenerateColumns="False" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn  DataMemberBinding="{Binding Name}"/>
                <telerik:GridViewDataColumn  DataMemberBinding="{Binding Type}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
    </Grid>
</Window>

MainWindow.xaml.cs

using System.Windows;
using TelerikVirtualization;
 
namespace GroupingRowClickIssue
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            DataContext = new ViewModel();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ((ViewModel)DataContext).Load(); 
        }
    }
}

ViewModel.cs

using PropertyChanged;
using Telerik.Windows.Data;
 
namespace TelerikVirtualization
{
    [ImplementPropertyChanged]
    public class ViewModel
    {
        public VirtualQueryableCollectionView View { get; set; }
        Controller controller;
 
        public ViewModel()
        {
            controller = new Controller();
        }
        public void Load()
        {
            View = controller.GetUsers();
        }
    }
}

Controller.cs

using GroupingRowClickIssue;
using System.Data;
using System.Linq;
using Telerik.Windows.Data;
 
namespace TelerikVirtualization
{
    public class Controller
    {
        public VirtualQueryableCollectionView GetUsers()
        {
            DataClasses1DataContext db = new DataClasses1DataContext("Application Name=test;Data Source=WS-VRC;Initial Catalog=SimpleDB;User ID=sa;Password=App12345");
               
            var data = from item in db.SimpleTables
                       select new User
                       {
                           Name = item.Name,
                           Type = item.Type
 
                       };
 
            VirtualQueryableCollectionView view = new VirtualQueryableCollectionView(data) { LoadSize = 30, VirtualItemCount = data.Count() };
 
            return view;
        }
    }
    public class User
    {
        public string Name { get; set; }
        public string Type { get; set; }
 
    }  
}

 

 

Dilyan Traykov
Telerik team
 answered on 07 Oct 2016
1 answer
174 views

We would like to disable the Undo feature of the TextBoxes that are auto-created for string properties.

It interferes with our global Ctrl+Z undo command when the TextBox in the PropertyGrid are keyboard focused.

Thanks.

 

Martin
Telerik team
 answered on 07 Oct 2016
2 answers
158 views

Hi,

I'm trying to change background colour for cells with value = "NO".

I found in one of the demo example this code: 

<telerik:StyleRule Condition="UnitPrice > 10">
    <Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
            <Setter Property="Background" Value="{telerik:Windows8Resource ResourceKey=AccentBrush}" />
            <Setter Property="Foreground" Value="{telerik:Windows8Resource ResourceKey=MainBrush}" />

    </Style>
</telerik:StyleRule>

Could I use StyleRule and Condition for string values like below ?

<telerik:StyleRule Condition="MyColumn = 'YES' ">

It doesn't work for me ...

 

Stefan
Telerik team
 answered on 07 Oct 2016
8 answers
186 views

hi dear telerik team

i have two MapLineViews in a visualization layer on the map (like a blue one and a red one). these two lines are exactly (or partly) on eachother.

at first we assume the red one is on top when we zoom out and zoom in sometimes this order changes! and the blue one comes on top.

i know the visualizationlayer redraws the items when the zoom changes but why does it change the order and how can i stop this from happening

 

thank you very much in advance for your help

 

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Oct 2016
1 answer
109 views

Hi, in your manual you have mentioned that for sections four options are available which I have added them (in here: http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/document-elements/features-section) but my problem is that I could not find SectionBreakType.Continuous. my telerik version is 2016. Why can't I find that?

 

Todor
Telerik team
 answered on 07 Oct 2016
1 answer
174 views

To test:

Create a class with properties and set the RadPropertyGrid.Item to an instance of that class.

Select one of the properties in the grid.

Set the Item to null. (Clear selection if your Item is binded to some listbox selection, for example).

The property grid should be empty now. Click in the empty space.

Notice that you can see the previous selected property name in the Description Pane.

More importantly to us for CanExecute calls, RadPropertyGrid.SelectedPropertyDefinition is not null. (even though Item==null).

This is a reference leak also since you are holding onto references after Item is set to null. :(

 

(Looking at the code, it looks like when Item property changes, you are setting SelectedPropertyDefinition to null, but you aren't clearing the SelectedPropertyDefinitions collection. As a result, the RadPropertyGrid.OnMouseLeftButtonDown calls SetSelectedPropertyDefinition(), and in there, it simply checks for any items in SelectedPropertyDefinitions and calls LastOrDefault(). )

 

 

Martin
Telerik team
 answered on 07 Oct 2016
9 answers
430 views
I want to filter the data of all the level, however, it seems treelistview only filter data on top level.
How to do that?
Yoan
Telerik team
 answered on 07 Oct 2016
3 answers
221 views
I have radscheduleview control which is not getting refreshed when we navigate from one view to other, previous page design is getting cashed. The block lines are not getting refreshed in the control. because of which the design of the control is getting disturbed.. can someone help please.[Getting multiple vertical lines]
Kalin
Telerik team
 answered on 07 Oct 2016
1 answer
1.0K+ views

Hi,

I´m using RadGridView and in the row selection (SelectedItem="{Binding RowSelected, Mode=TwoWay}") I´m loading other View and when I go back, the clicked row is still highlighted. How could I disable the row highlighted (cache) when the GridView is showed.

Best regards

Martin
Telerik team
 answered on 07 Oct 2016
4 answers
405 views

We've added the RadMap control to our WPF application.  I have a custom tile provider that interfaces with a home-grown tile service.  Tee provider basically makes HTTP calls to a custom URL in order to retrieve tiles.  This provider does no caching of its own.

However, a tester here had map data for the US only, then uninstalled that map data and installed map data for Peru.  When they went back into our application, they were able to see roads on Long Island, which they shouldn't have seen.  For this reason, we believe that the RadMap control itself is caching tiles.

Does RadMap cache tiles?  If so, where is this cache and how can we empty it?

 Here is the code for the custom tile provider.  As you can see, there's no code for caching in here at all.

 

public class SelexTileSource : TiledMapSource {
 
    public string BaseURL { get; set; }
 
    public SelexTileSource() : base( 1, 20, 256, 256 ) { }
 
    public override void Initialize() {
        this.RaiseIntializeCompleted();
    }
 
    protected override Uri GetTile( int tileLevel, int tilePositionX, int tilePositionY ) {
        int zoomLevel = ConvertTileToZoomLevel( tileLevel );
 
        string url = string.Format( BaseURL,
                                    zoomLevel.ToString( CultureInfo.InvariantCulture ),
                                    tilePositionX.ToString( CultureInfo.InvariantCulture ),
                                    tilePositionY.ToString( CultureInfo.InvariantCulture ) );
        return new Uri( url );
    }
}
 
public class SelexMapProvider : TiledProvider {
 
    public TiledMapSource Source {
        get { return iSource; }
        set {
            if ( iSource != null && MapSources.ContainsKey( iSource.UniqueId ) )
                MapSources.Remove( iSource.UniqueId );
            iSource = value;
            MapSources.Add( iSource.UniqueId, iSource );
        }
    }
    private TiledMapSource iSource;
 
    public override ISpatialReference SpatialReference {
        get { return new MercatorProjection(); }
    }
}

Petar Mladenov
Telerik team
 answered on 07 Oct 2016
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?