Telerik Forums
UI for WPF Forum
1 answer
196 views
hello,

while running some CodedUI Tests on WPF Aplication who use Rad Gridview (2012 Q1)
Usual CodedUI Test (click on grid, click On Cells, Press Down...)
using VS2010
Windows XP.

suddenly i got this Exception from the Application itself (not the test!)

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generics.List'1.Enumerator.MoveNextRare()
at System.Collections.Generics.List'1.Enumerator.MoveNext() 
at
Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer.GeneratePeersForDataItems(List'1 newPeerList, AutomationPeerStorage'2 oldCachedPeers)
at
Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer.GetItemPeers()
at
Telerik.Windows.Controls.GridView.Automation.GridViewVirtualizingPanelAutomationPeer.GetChildrenCore()
at Telerik.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
at Telerik.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()  
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()   
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()   
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() 
  
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() 
  
at System.Windows.ContextLayOutManager.fireAutomationEvents()
at System.Windows.ContextLayOutManager.UpdateLayout() 
at System.Windows.ContextLayOutManager.UpdateLayoutCallBack(Object arg) 
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() 
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) 
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)  
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object Args, Int32 numArgs, Delegate catchHandler)



can someone help..?
thanks in advance.





Yordanka
Telerik team
 answered on 10 Jul 2012
6 answers
175 views
Hey,
Just a quick question - in the WPF demo application, when You download it and it loads for the first time it displays a line loading and massive numbers going up. Is that done with one of Your tools provided ? and If yes which is it ?
Regards,
(Premium Collection user) Neil
Ivan Zhekov
Telerik team
 answered on 10 Jul 2012
1 answer
86 views
Hy,

I've got the following Problem.
If i Save the Diagram to String and Load the string back into the same Diagram, my binding doesn't work anymore.
Bug inside the Diagram Framework or OSI Layer 9 (20 cm in the front of the monitor) ?


XAML:
<telerik:RadDiagramShape x:Class="SPARE_BPMS_Framework.Shapes.General.ProcessShape"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" Content="{Binding}"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             d:DesignHeight="300" d:DesignWidth="300">
 
    <telerik:RadDiagramShape.Resources>
        <DataTemplate x:Key="editTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBox Height="24" Text="{Binding Name}" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="template">
            <WrapPanel Orientation="Vertical">
                <TextBlock Text="{Binding Name}" />
                <TextBlock Text="{Binding ChildProcessName}" />
            </WrapPanel>
 
        </DataTemplate>
    </telerik:RadDiagramShape.Resources>
</telerik:RadDiagramShape>

Code Behinde
public partial class ProcessShape : RadDiagramShape
    {
        public ProcessItem Model { get; set; }
 
        public string Name { get; set; }
 
        public ProcessShape()
        {
            InitializeComponent();
 
            Model = new ProcessItem();
           
            this.EditTemplate = (DataTemplate)this.FindResource("editTemplate");
            this.ContentTemplate = (DataTemplate)this.FindResource("template");
 
            this.DataContext = Model;
 
            this.MouseDoubleClick += new MouseButtonEventHandler(Model.shape_MouseDoubleClick);
        }
 
        public void Update()
        {
            this.EditTemplate = (DataTemplate)this.FindResource("editTemplate");
            this.ContentTemplate = (DataTemplate)this.FindResource("template");
 
        }
 
         
    }

Method who call the Reload and Load
string temp = diagram.Save();
                diagram.Clear();
            diagram.Load(temp);

Greetings

Alfred

Miro Miroslavov
Telerik team
 answered on 10 Jul 2012
1 answer
124 views
Hello,

I'm just curious,  I always post questions between 10-5 Pacific Time (UTC -7) and they seem to be answered when I come back in the morning.  What time zone are you guys posting from?

Eric
Vlad
Telerik team
 answered on 10 Jul 2012
2 answers
134 views
Hi, support team,

We've upgraded to 2012.2.0607.40 recently and I found one chagne in the RadGridView that impacts user experience.
Basically we have input boxes (hosted inside the grid) to allow user to enter something to filter the grid. The problem is every time user entered something in the text box, GridViewDataControl.OnItemsChanged will be executed, and the grid found that it has the focus (because we host the text box in the grid) so it call a PreserveFocus internally to set the focus to itself and actually steal the focus from the text box inside the grid.

Right now my work around is to override the OnItemsChanged to set the focus back but it's still having problem sometimes.
     protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
     {
      var inputElement = Keyboard.FocusedElement;
      base.OnItemsChanged(e);
      if (inputElement is TextBox)
      {
        Dispatcher.BeginInvoke(() => Keyboard.Focus(inputElement), DispatcherPriority.Input);
      }
    }

Can you look into fix the problem?

Thanks
Jason
Jason
Top achievements
Rank 1
 answered on 10 Jul 2012
2 answers
95 views
Hi,

I would like to ask the experts and the general community users telerik his advice on the correct selection of controls for a scenario like this:

An application (WPF Web Application) that at runtime, the creation of multiple items (a user control perhaps) but these items can be classified into 1 of 5 types ..... ie item 1 can be type A, type B item 2, etc ..... forming a list of selectable items grouping by type....

Furthermore, these elements must be contained in a manner that allows the user to drag and drop on another control or container.

The variety of Telerik controls is impressive and in some tests I made ​​several mistakes .... or several ways to do wrong .... in any case, what kind of controls may be used for a similar scenario .... I permitted through the functionality that is required?

In advance, thank you all.
Romell
Top achievements
Rank 1
 answered on 09 Jul 2012
0 answers
143 views
Hi All,

I can successfully compile the installed WPF demos included in the commerical version.  But I cannot preview the XAML views.  I get the error below.  I only have Q1 2012 installed for all the Telerik Products on this this machine, I uninstalled all others.


Error 82 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Telerik.Windows.Examples.RibbonView' that is not included in the assembly. C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2012\Demos\Examples\RibbonView\WPF\RibbonWindow\Example.xaml 4 15 RibbonView.WPF


Can someone point out what might be happening here?

Thanks,

Reid
Reid
Top achievements
Rank 2
 asked on 09 Jul 2012
3 answers
162 views
I exported the style in Blend but don't see a way to change the Column header background. Is this possible to do?
Rod
Vlad
Telerik team
 answered on 09 Jul 2012
2 answers
142 views
Hi, we have very strange GridViewComboBoxColumn's behaviour. Code is very simple, but we have different result when execute our program on different PC. Normal behaviour should be next:
1) select any item in 3rd row combobox;
2) choose second cell in this row.
3) selected item in 1st column should be selected!!!

But on 50% PC we don't have this, i.e. selected item pull down everywhere. We lose selected item on LostFocus. In debug mode we saw, that debugger comes to GET of Employee.Name property after ComboBox selection changed (on the PC with wrong behaviour). And debugger comes to SET of this property on the PC with normal behaviour. It's hard to believe and to explain. What's wrong with this control?

BUT !!! We don't have any trouble if use common template with ComboBox (i.e. without using GridViewComboBoxColumn) - ex.code3.

Ex.code1: Main Window XAML:
<telerik:RadGridView Name="dGrid" AutoGenerateColumns="False" Height="188" VerticalAlignment="Top">
    <telerik:RadGridView.Columns>
        <telerik:GridViewComboBoxColumn
            ItemsSourceBinding ="{Binding Path=Names, Mode=TwoWay}"
            DataMemberBinding="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            UniqueName="ClmNames"
            >
        </telerik:GridViewComboBoxColumn>
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding Path=Name, Mode=TwoWay}">
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>

Ex.code2: Main window C#:
public MainWindow()
{
    InitializeComponent();
 
    _employees = new List<Employee>(){
                 new Employee {Names = new List<string>{"Ann", "Nata"}, Name = "Ann"},
                 new Employee {Names = new List<string>{"Elise", "Ivan", "Марк"}, Name = "Ivan"},
                 new Employee {Names = new List<string>{"Elise", "Ivan", "Марк"}},
    };
 
    dGrid.ItemsSource = _employees;
}

Ex.code3: Working template XAML:
<telerik:GridViewDataColumn.CellTemplate><br>
      <DataTemplate><br>
       <ComboBox ItemsSource="{Binding Path=ImprovementList}" DisplayMemberPath="refimprovement.name_full"<br>
           SelectedItem="{Binding Path=RecalcManualItem.cfaccimprovementlist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"<br>
           SelectionChanged="ComboBox_SelectionChanged" /><br>
      </DataTemplate><br>
     </telerik:GridViewDataColumn.CellTemplate>
Peter
Top achievements
Rank 1
 answered on 09 Jul 2012
3 answers
439 views
Hi,

Is it possible to get the longitude and latitude of the visible area on screen?

The scenario is the user has zoomed into a city, I want to be able to get the upper left lat and long, the lower right lat and long and then based on those values go to the database and get all the branches in that area.

Simplistic code example.

public void ItemsRequest(object sender, ItemsRequestEventArgs e)
{
    var dataContext = page.DataContext as MappingViewModel;
    if (dataContext == null)
        return;
 
    //var minZoom = e.MinZoom;
    var upperLeft = e.UpperLeft;
    var lowerRight = e.LowerRight;
     
    var branches = _repository.GetBranches(upperLeft.Latitude, upperLeft.Longitude, lowerRight.Latitude, lowerRight.Longitude);
 
    dataContext.SetBranches(branches, e);
}

The problem is that the e.upperLeft and e.LowerRight latitude and longitude values don't seem to represent what is in the visible area.

Sorry for my lack of understanding, this is the first time I have developed for maps so this may be a really stupid question! :-)

Regards,
Mark
Andrey
Telerik team
 answered on 09 Jul 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?