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

I am trying to show the arrow (generatearrowcue) when the user drag and drop the tree node  in to list box. Here is my code snippet and the OnDragQuery event is not firing. Can you please help me what i am doing wrong.

this.tvMetadata.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery));
this.tvMetadata.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDragInfo));

void OnDragInfo(object sender, DragDropEventArgs e)  

{
if (e.Options.Status == DragStatus.DragComplete) {

e.Handled = true;  

}

}

void OnDragQuery(object sender, DragDropQueryEventArgs e)  

{
if (e.Options.Status == DragStatus.DragQuery)  

{

e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();  

}

}

Kiril Stanoev
Telerik team
 answered on 24 Sep 2009
1 answer
103 views
I've created a Carousel passing a list using the ItemSource member. What I would like to do is get data from the item that was clicked on. So for example one of the values in the list is title, when I click on an item I would like to pass the Title of the item I clicked. I created a MouseDown Handler but I can't figure out how to get that data.
Thanks in advance.
Milan
Telerik team
 answered on 24 Sep 2009
1 answer
81 views
I am using WPF RadGridview and have some aggregate functions like sum
 <telerik:GridViewDataColumn Header="OWNED" ToolTip="Owned" HeaderTextAlignment="Center"  DataMemberBinding="{Binding OWNED}" IsEnabled="False"  IsReadOnly="False" >
                                    <telerik:GridViewDataColumn.AggregateFunctions>
                                        <telerik:SumFunction Caption="Owned: "  SourceField="OWNED" />
                                    </telerik:GridViewDataColumn.AggregateFunctions>
                                </telerik:GridViewDataColumn>
It works good if I am tabing out of this cell.But it doesn't update SUM(without tabing) when I am click on some other control other than grid immediately after editing OWNED field value on grid.I have tried RadGridView_lostFocus which doesn't do any good.Please provide me the solution for this ASAP as i am mid of implementation.



Stefan Dobrev
Telerik team
 answered on 24 Sep 2009
2 answers
100 views

Hello,
I have a question, if I don't set the property of axisY, the default value of AutoRange is 'true' .
Like following example, First I add some plus value to the dataseries , and then I add some minus value to the dataseries.
After that the chart crashes, it just can't show the points I add.
Can you help me to solve the problem? Thank you!

 for (int i = 0; i < 6; i++)
   {

        ChartArea.DataSeries.First().Add(new DataPoint(i, 0.01 * i));
   }

   for (int i = 6; i < 10; i++)
   {

        ChartArea.DataSeries.First().Add(new DataPoint(i, -0.01 * i));
   }

Ves
Telerik team
 answered on 24 Sep 2009
3 answers
243 views
hi all,
i recently started using telerik controls for wpf.

i wud like to save grid settings like column order, grouping, sorting etc.
i want to have a column chooser for my grid and save the columns users select along with other settings.

i wud like to save these settings in the database on a button click.

please can anyone let me know if this is possible in wpf and if yes then how.

thank u
sandy
Vlad
Telerik team
 answered on 24 Sep 2009
1 answer
118 views
I am dynamically binding the .ItemsSource and .DataContext property to a datatable in code like such:

 

Dim myDataTable As New DataTable

 

myDataTable = GetDataTable() 'returns datatable with multiple rows

 

 

Me.myRadCarousel.ItemsSource = myDataTable

However, the carousel shows blank images, even though they exist. I double-click on the carousel to get the file name and I get the file name no issue. my datatable contains 1 field (filename)

 

<

 

Window.Resources>

 

 

 

 

 

 

<Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">

 

 

 

 

 

 

<Setter Property="Template">

 

 

 

 

 

 

<Setter.Value>

 

 

 

 

 

 

<ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">

 

 

 

 

 

 

<Grid IsHitTestVisible="False" HorizontalAlignment="Stretch"

 

 

 

 

 

VerticalAlignment="Stretch">

 

 

 

 

 

 

<Image Source="{Binding Path=Fields[filename].Value}" Height="400" Width="400" />

 

 

 

 

 

 

</Grid>

 

 

 

 

 

 

</ControlTemplate>

 

 

 

 

 

 

</Setter.Value>

 

 

 

 

 

 

</Setter>

 

 

 

 

 

 

</Style>

 

 

 

 

 

 

</Window.Resources>

 

Milan
Telerik team
 answered on 23 Sep 2009
1 answer
202 views
I am currently experiancing an issue when grouping columns.  I receive the following exception:

System.InvalidOperationException: No method 'Select' on type 'System.Linq.Queryable' is compatible with the supplied arguments.

I use the following code to create the grouping. The exception occurs on line 19.  I also have this issue if I drag and drop a column into the grouping header. 

 private void ExecuteGroupCommand(Object sender, ExecutedRoutedEventArgs e) {  
            telc.RadGridView grid = sender as telc.RadGridView;  
 
            if (grid != null) {  
                if (grid.CurrentCell != null) {  
                    teld.IFieldDescriptor fieldDescriptor = grid.CurrentCell.Column;  
 
                    // determine if a group descriptor for the current cell already exists  
                    teld.GroupDescriptor groupDescriptor = grid.GroupDescriptors.FirstOrDefault<teld.GroupDescriptor>(  
                        possibleDescriptor => possibleDescriptor.Member.Equals(fieldDescriptor.UniqueName));  
 
                    // if no group descriptor is found then create one and add it to the group descriptor collection.  
                    // if one exists then the grid is already grouped by the selected cell so there is no need to   
                    // do it again.  
                    if (groupDescriptor == null) {  
                        groupDescriptor = new teld.GroupDescriptor();  
                        groupDescriptor.Member = fieldDescriptor.UniqueName;  
                        groupDescriptor.SortDirection = System.ComponentModel.ListSortDirection.Ascending;  
                        grid.GroupDescriptors.Add(groupDescriptor);  
                    }  
                }  
            }  
 
            e.Handled = true;  
        } 

[Exception Details]

System.Reflection.TargetInvocationException was unhandled
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at Telerik.Windows.Controls.GridView.GridViewItemsControl.RaiseGroupingEvent(IColumnInfo draggedCell, Int32 index, GroupingEventAction groupingEventAction)
       at Telerik.Windows.Controls.GridView.GridViewGroupPanel.Telerik.Windows.Controls.GridView.DragDrop.IDropTarget.Drop(UIElement draggedElement)
       at Telerik.Windows.Controls.GridView.DragDrop.DragDropManager.EndDrag(Boolean drop)
       at Telerik.Windows.Controls.GridView.DragDrop.WpfDragDropManager.EndDrag(Boolean drop)
       at Telerik.Windows.Controls.GridView.DragDrop.DragDropManager.ProcessMouseLeftButtonUp()
       at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(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, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       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.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 Iti.Ccs.Shell.App.Main() in C:\Users\arodriguez\Documents\ITI.CCS\Trunk\Source\Iti.Ccs.Shell\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly 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.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.InvalidOperationException
       Message="No method 'Select' on type 'System.Linq.Queryable' is compatible with the supplied arguments."
       Source="System.Core"
       StackTrace:
            at System.Linq.Expressions.Expression.FindMethod(Type type, String methodName, Type[] typeArgs, Expression[] args, BindingFlags flags)
            at System.Linq.Expressions.Expression.Call(Type type, String methodName, Type[] typeArguments, Expression[] arguments)
            at Telerik.Windows.Data.QueryableExtensions.CallQueryableMethod(IQueryable source, String methodName, LambdaExpression selector)
            at Telerik.Windows.Data.QueryableExtensions.Select(IQueryable source, LambdaExpression selector)
            at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery()
            at Telerik.Windows.Data.Expressions.GroupDescriptorCollectionExpressionBuilder.CreateQuery()
            at Telerik.Windows.Data.QueryableExtensions.GroupBy(IQueryable source, GroupDescriptorCollection groupDescriptors)
            at Telerik.Windows.Data.QueryableCollectionView.CreateView()
            at Telerik.Windows.Data.QueryableCollectionView.get_QueryableView()
            at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
            at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
            at Telerik.Windows.Data.QueryableCollectionView.GetEnumerator()
            at Telerik.Windows.Data.RecordFactory.<CreateRecordsForGroupRecord>d__0.MoveNext()
            at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
            at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
            at Telerik.Windows.Controls.GridView.GridViewDataControl.PopulateRecords()
            at Telerik.Windows.Controls.GridView.GridViewDataControl.LoadData()
            at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
            at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
            at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
            at Telerik.Windows.Data.QueryableCollectionView.RefreshAndRaiseCollectionChanged(NotifyCollectionChangedEventArgs args)
            at Telerik.Windows.Data.QueryableCollectionView.Refresh()
            at Telerik.Windows.Data.QueryableCollectionView.EndDefer()
            at Telerik.Windows.Data.QueryableCollectionView.DeferHelper.Dispose()
            at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformGrouping(String member, Object displayContent, Nullable`1 insertionIndex)
            at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass2a.<GroupingRequested>b__29()
            at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
            at Telerik.Windows.Controls.GridView.GridViewDataControl.GroupingRequested(Object origin, GroupingRequestedEventArgs e)
       InnerException:


Stefan Dobrev
Telerik team
 answered on 23 Sep 2009
2 answers
114 views
Hi.
I am trying to do the following:
I want to create a ComboBox which can be used like an editable Combobox (i.e. type into the Textfield and select from the auto-complete..) but only entries currently in the combobox shuld be selectable.

The description for the 3rd Combobox on the Combobox/Fist Look Examples page reads somehat like this but typing ist not allowed in that Combobox. (What I expected by setting IsReadOnly, anyhow..)

So - Is it posiible to transform the DropDownCombobox into a keyboard-navigateable-but-non-entiable-Combobox ?

Yours,
Nils
Valeri Hristov
Telerik team
 answered on 23 Sep 2009
1 answer
120 views
I have an application that uses Telerik controls, standard WPF controls such as text boxes, and some third party controls from another vendor.  I want to give my customers the ability to customize colors, brushes, etc.  The problem is that the various toolkits are using different resource keys.  If I want to tell the customer how to change the rollover background brush for buttons, I have to tell him about three different resource keys, one for System.Windows.Controls.Button buttons, one telerik buttons, and one for buttons in the other 3rd party toolset.  I would rather document one resource key that the user sets in app.xaml and then have some startup code in my app that propagates the setting to the appropriate resource dictionaries for the various tookits.
 
How do I do that with Telerik controls?  Can I just store a value for the telerik resource key in the application resource dictionary?  Or do I have to store it somewhere else?
Kalin Milanov
Telerik team
 answered on 23 Sep 2009
1 answer
485 views
Hi
I've got a data bound Combox that displays the data from the DB just fine. As the list is a little large, we allow the user to enter in text and auto complete kicks in using telerikSearch:TextSearch.TextPath="..." (as from the sample).

If the user then deletes parts of the text to something that doesn't exist in the list, the resultant entry could be invalid. I've tried various combinations of IsEditable and IsReadOnly being set to true / false but haven't got the desired behaviour.

What I would like to do is either:
1. Wire this combobox up to standard WPF validation. How does this work for this control?
2. Only allow the user to enter text that matches the list and disable them from deleting text to invalidate the entry

Thanks in advance!
Milan
Telerik team
 answered on 23 Sep 2009
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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?