Telerik Forums
UI for WPF Forum
1 answer
228 views
Hello,


I have a radgridview that is pretty simple. It has 8 columns, all read-only but the last one. The grid holds thousands of records without paging (by design).

The issue I am facing is when the user scrolls to an record that would initially be below the page break and edits the record. When they exit the cell to commit the change the grid jumps back up to the top. 

How can I get the radgridview to not jump to the top of records and stay focus on the edited record and surrounding records? Is is an issue with sorting?

Thank you,
Aryn
Dimitrina
Telerik team
 answered on 17 Nov 2014
1 answer
562 views
I need to close RadWindow(s) which are children of Application.Current.MainWindow programmatically but RadWindows present as "Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper+WindowHostWindow: Window Header" so I'm unable to cast that back to RadWindow and use Close() method. Here is what I tried:

                foreach (var w in Application.Current.Windows)
                {
                    var rw = w as RadWindow;
                    if (rw == null) continue;
                    rw.Close();
                }

                foreach (var rw in Application.Current.MainWindow.ChildrenOfType<RadWindow>())
                {                    
                    rw.Close();
                }

So, how exactly do I close RadWindow(s) which are children of Application.Current.MainWindow programmatically?
Vladi
Telerik team
 answered on 17 Nov 2014
1 answer
110 views

Wondering about this - since this free version supports third party extensions now...

http://www.visualstudio.com/news/vs2013-community-vs

Nikolay
Telerik team
 answered on 17 Nov 2014
1 answer
282 views
I have a problem when I want to build/test a connection.
Error: Arithmetic operation resulted in an overflow"

 I use the newest Desegner for telerik WPF: 2014.2.2001 from 24 October 2014.
.NET v4.030319
I use SQL 2012, same .NET version.
I have Windows 8 on my computer.

Is there a solution, some ideas, a fix?
Yana
Telerik team
 answered on 17 Nov 2014
1 answer
143 views
Hello, I'm Lee

I have one question.

It's 'TileGroupContainer'.

Exception is '{clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls}TileGroupContainer find not format'

I don't know, why occur it

What should I do??
Maya
Telerik team
 answered on 17 Nov 2014
2 answers
1.1K+ views
Hi,

I am trying to add a RadSlider control to my application. It get build successfully but when I run the application I am getting an error.

An unhandled exception of type 'System.InvalidProgramException' occurred in Telerik.Windows.Controls.dll
Additional information: JIT Compiler encountered an internal limitation.


And here is the stack trace

   at Telerik.Windows.Controls.Primitives.LayoutTransformControl.get_Child()
   at Telerik.Windows.Controls.Primitives.LayoutTransformControl.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Window.MeasureOverrideHelper(Size constraint)
   at System.Windows.Window.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at System.Windows.Window.SourceWindowHelper.set_RootVisual(Visual value)
   at System.Windows.Window.SetRootVisual()
   at System.Windows.Window.SetRootVisualAndUpdateSTC()
   at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   at System.Windows.Window.CreateSourceWindowDuringShow()
   at System.Windows.Window.SafeCreateWindowDuringShow()
   at System.Windows.Window.ShowHelper(Object booleanBox)
   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)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at BeamBox.NativeAppEmulator.App.Main() in l:\Repo\beambox\BeamBox.NativeAppEmulator\obj\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()



Jared
Top achievements
Rank 1
 answered on 16 Nov 2014
1 answer
136 views
Hello!

I have problems whit ContextMenu inside a TextBox but, when I use the textbox inside a DataFormDataField the items doesn´t appears, just appears "Copy, Paste, Cut", the Textbox whit the contextmenu works perfect when is outside a DataForm, any idea?

Thanks in adnvace

Here some code:

<Grid>
        <Grid.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="Styles.xaml"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Grid.Resources>
       <telerik:RadDataForm x:Name="DataForm">
            <telerik:RadDataForm.ReadOnlyTemplate>
                <DataTemplate>
                <TextBox x:Name="textBox"
         Width="200" ContextMenu="{x:Null}"
         VerticalAlignment="Top" Margin="141,125,176,0">
                    <telerik:RadContextMenu.ContextMenu>
                        <telerik:RadContextMenu x:Name="ContextMenuHugo" ItemContainerStyle="{StaticResource MenuItemContainer}" Opening="ContextMenuHugo_OnOpening">
                                                   
                        </telerik:RadContextMenu>
                    </telerik:RadContextMenu.ContextMenu>
         
        </TextBox>
        </DataTemplate>
        </telerik:RadDataForm.ReadOnlyTemplate>
        </telerik:RadDataForm>
        <TextBox x:Name="textBox"
         Width="200" ContextMenu="{x:Null}"
         VerticalAlignment="Top" Margin="141,125,176,0">
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="ContextMenuHugo" ItemContainerStyle="{StaticResource MenuItemContainer}"
                                                >
 
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
 
        </TextBox>
    </Grid>

Cheers
Boris
Telerik team
 answered on 14 Nov 2014
1 answer
149 views
Hi

We have a problem with ContextMenu in a textbox when we try to use it inside a DataFormDataField, the items doesn't appears, just appear "Copy, Cut, Paste".
We did try populate the ItemsSource property from Opening Event and from a Binding, but doesn´t work
I attached a little example solution

And here some code, the textbox outside DataForm works perfect
<Grid>
        <Grid.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="Styles.xaml"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Grid.Resources>
       <telerik:RadDataForm x:Name="DataForm">
            <telerik:RadDataForm.ReadOnlyTemplate>
                <DataTemplate>
                <TextBox x:Name="textBox"
         Width="200" ContextMenu="{x:Null}"
         VerticalAlignment="Top" Margin="141,125,176,0">
                    <telerik:RadContextMenu.ContextMenu>
                        <telerik:RadContextMenu x:Name="ContextMenuHugo" ItemContainerStyle="{StaticResource MenuItemContainer}" Opening="ContextMenuHugo_OnOpening">
                                                   
                        </telerik:RadContextMenu>
                    </telerik:RadContextMenu.ContextMenu>
         
        </TextBox>
        </DataTemplate>
        </telerik:RadDataForm.ReadOnlyTemplate>
        </telerik:RadDataForm>
        <TextBox x:Name="textBox"
         Width="200" ContextMenu="{x:Null}"
         VerticalAlignment="Top" Margin="141,125,176,0">
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="ContextMenuHugo" ItemContainerStyle="{StaticResource MenuItemContainer}"
                                                >
 
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
 
        </TextBox>
    </Grid>

Thanks in advance
Boris
Telerik team
 answered on 14 Nov 2014
5 answers
111 views
Hello,

I am trying to use the CloudUpload within an ElementHost. When I choose a file and then click upload I get the following error:

Object reference not set to an instance of an object.
   at Telerik.Windows.Cloud.Controls.Upload.CloudUploadFile.UpdateCommandsCanExecute()
   at Telerik.Windows.Cloud.Controls.Upload.CloudUploadFile.SetState(CloudUploadFileState value)
   at Telerik.Windows.Cloud.Controls.Upload.CloudUploadFile.StartUpload()
   at Telerik.Windows.Cloud.Controls.RadCloudUpload.StartUpload(IEnumerable`1 items)
   ...

I'm setting up the CloudUpload like so:

            var upload = new RadCloudUpload();
            upload.Name = "radCloud1";
            upload.Provider = new DummyProvider();
            elementHost1.Child = upload;
 
 To confirm that I wasn't setting it up incorrectly I tried the same code without the element host and it works fine. Is the ElementHost unsupported?




Einar
Top achievements
Rank 1
 answered on 14 Nov 2014
7 answers
1.0K+ views

I want to put some text in the footer of a column in my gridview. However I can't get the binding to work.

 

I'm using MVVM. I have one viewmodel for the whole form including the gridview (let's call this MainViewModel) and also one viewmodel per row in the gridview (RowViewModel).

 

The text I want to show in the footer is in MainViewModel (let's call the property FooterText). How can I bind the text of the footer to this property?

 

My footer looks like this:

<telerikGridView:GridViewDataColumn.Footer>
    <TextBlock Text="Testing" />
</telerikGridView:GridViewDataColumn.Footer>

This example works and displays the text "Testing" in the footer. But my problems starts when I try to set the text using binding instead.

 

This doesn't work:

<telerikGridView:GridViewDataColumn.Footer>
    <TextBlock Text="{Binding Path=FooterText}" />
</telerikGridView:GridViewDataColumn.Footer>
I didn't expect this to work since all other properties of the column gets bound to the RowViewModel and not the MainViewModel. I'm guessing the same goes for the footer.

 

I've tried this:

<telerikGridView:GridViewDataColumn.Footer>
    <TextBlock Text="{Binding ElementName=LayoutRoot, Path=DataContext.FooterText}" />
</telerikGridView:GridViewDataColumn.Footer>

LayoutRoot is the Grid that is the root element of the form that the gridview resides in. This does not work. What confuses me is that I can bind the Header of the column in the exact way and it works:

<telerikGridView:GridViewDataColumn Header="{Binding ElementName=LayoutRoot, Path=DataContext.FooterText}" ... >

 

I've also tried this:

<telerikGridView:GridViewDataColumn.Footer>
    <TextBlock Text="{Binding Path=DataContext.FooterText, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerikGridView:RadGridView}}" />
</telerikGridView:GridViewDataColumn.Footer>

This didn't work neither.

 

Any more ideas?

Vanya Pavlova
Telerik team
 answered on 14 Nov 2014
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?