Telerik Forums
UI for WPF Forum
1 answer
170 views
I'm using the GridView and also themes.
How could I get the used highlight-color which is used for the selected row in codebehind?

Somethin like this:
var color = MyGrid.HighlightColor;
Ivan Ivanov
Telerik team
 answered on 16 Nov 2011
7 answers
81 views
Chart zoomscroll settings bar: can it be customized? We like to utilize the zooming on X axis, and like to increase the size of the bar through style.
Anyone has any suggestion? where to obtain the source code? who's style shoule I mess with? DragZoomLayerControl?
Sia
Telerik team
 answered on 16 Nov 2011
1 answer
135 views
Hello,
I am creating a linear spark line in my wpf project. My datasource will have 43 points (from -21 to 21). I will have to mark the highest indicator point and lowest indicator point in Red whereas zero (middle) indicator point in blue.
I can mark Highest & Lowest indicator points by using following properly

ShowLowPointIndicators="True" ShowHighPointIndicators="True"

However I could not find any way to highlight middle (zero) indicator point. I will appreciate for any idea to mark this point.

Thanks,
M. Irfan
Yavor
Telerik team
 answered on 16 Nov 2011
12 answers
255 views
Hi,

I think I found a bug while trying to set the tooltip for the headers. This seems to be a regression. I downloaded the code from this post:

http://www.telerik.com/community/forums/wpf/gridview/displaying-the-radgrid-header-column-tooltip.aspx

Converted the ColumnTooltip project in that post to VS 2010, changed the .NET framework version to 4.0 CP and replaced the telerik dlls with the latest version. I then run the sample and when I hover the mouse over a header the app crashes with the exception below. The tooltip is being set as in:

<Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>

Did this change in later versions?

Here is the exception:
 
System.InvalidOperationException was unhandled
  Message=Specified element is already the logical child of another element. Disconnect it first.
  Source=PresentationFramework
  StackTrace:
       at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
       at System.Windows.FrameworkElement.AddLogicalChild(Object child)
       at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Data.BindingOperations.SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding)
       at System.Windows.Controls.PopupControlService.RaiseToolTipOpeningEvent()
       at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
       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.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       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.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       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.Application.RunInternal(Window window)
       at System.Windows.Application.Run()
       at ColumnTooltip.App.Main() in E:\temp\ColumnTooltip\ColumnTooltip\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Christoph
Top achievements
Rank 1
 answered on 16 Nov 2011
0 answers
117 views
Would it be possible to change the column name of a data bound GridView?

I have a GridView bounded to a dataset. Any changes to the data are save back the the database on rowEditEnded event.
My reason for changing column name like NameID or DateOfBirth to Name ID or Date Of Birth to appear as column names as it would look nicer. Would I be able to do that and update to the database on rowEditEnded event.
Oliver
Top achievements
Rank 1
 asked on 16 Nov 2011
6 answers
201 views
In the good old version of RadGrid in Asp.Net, it's documented how to use an EditForm with Insert/Update/Cancel, but how is this done in WPF when using MVVM pattern?

I can not find anything in the docs about RadGrid when using MVVM. Is there a separate documentation, or is Telerik ignoring the pattern?
Jason
Top achievements
Rank 1
 answered on 15 Nov 2011
2 answers
131 views
I feel like I must be missing something simple, but I've been through the examples and can't find anything.  I have a gridview bound to a datatable.  The values populate fine, but when I try to edit, the textbox shows up blank.  It works fine if I set AutoGenerateColumns="true", I need to be able to set it to false

<telerik:RadGridView Margin="10,10,10,10" Name="rgridUsers" ItemsSource="{Binding}" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False"
     SelectionMode="Extended" AutoGenerateColumns="False" CanUserFreezeColumns="False">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding User}" Header="Users" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Active}" Header="Active" />
        <telerik:GridViewColumn>
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <telerik:RadButton Command="Delete">
                        <Image Source="Images/Delete.png" />
                    </telerik:RadButton>
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewColumn>
 
    </telerik:RadGridView.Columns>
 
</telerik:RadGridView>


      DataTable dt = new DataTable();
public Administration()
 {
     InitializeComponent();
 
 
     dt.Columns.Add("User", typeof(string));
     dt.Columns.Add("Active", typeof(bool));
 
     DataRow row;
     row = dt.NewRow();
     row["User"] = "User1";
     row["Active"] = true;
     dt.Rows.Add(row);
     row = dt.NewRow();
     row["User"] = "User2";
     row["Active"] = true;
     dt.Rows.Add(row);
     row = dt.NewRow();
     row["User"] = "User3";
     row["Active"] = false;
     dt.Rows.Add(row);
     row = dt.NewRow();
     row["User"] = "User4";
     row["Active"] = true;
     dt.Rows.Add(row);
     row = dt.NewRow();
     row["User"] = "User5";
     row["Active"] = false;
     dt.Rows.Add(row);
     row = dt.NewRow();
     row["User"] = "User6";
     row["Active"] = true;
     dt.Rows.Add(row);
 
     rgridUsers.ItemsSource = dt;
 }

Gama
Top achievements
Rank 1
 answered on 15 Nov 2011
1 answer
145 views
Hello,

I would like to use the loading indicator in the WPF GridView for when the DataLoadMode is asynchronous.

I also intend to use instances of the BusyIndicator control in other areas of my application.

I would like the loading indicator in the GridView to look the same as my instances of the BusyIndicator control - is it possible to change the style of GridView indicator? If so, please could you provide an example?

Thanks,

Tom
Vanya Pavlova
Telerik team
 answered on 15 Nov 2011
6 answers
206 views
Hi,

I'm using WPF controls version 2011.2.712.35.
Randomly getting following exception below.

If there is a workaround to this exception please let me know.

Thanks,
Ruben

at Telerik.Windows.Controls.RadTreeView.InheritTreeProperties(RadTreeViewItem treeViewItem) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeView.CommonItemContainer.cs:line 600
at Telerik.Windows.Controls.RadTreeView.PrepareContainerForDescendant(DependencyObject element, Object item, ItemsControl owner) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeView.CommonItemContainer.cs:line 152
at Telerik.Windows.Controls.RadTreeViewItem.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.cs:line 1513
at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
at Telerik.Windows.Controls.TreeView.TreeViewPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\Virtualization\TreeViewPanel.cs:line 2257
at Telerik.Windows.Controls.TreeView.TreeViewPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\Virtualization\TreeViewPanel.cs:line 2309
at Telerik.Windows.Controls.TreeView.TreeViewPanel.MeasureOverride(Size constraint) in c:\TB\101\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\Virtualization\TreeViewPanel.cs:line 1454
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
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.RenderMessageHandler(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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
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.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
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()
Petar Mladenov
Telerik team
 answered on 15 Nov 2011
0 answers
250 views
So, I figured out how to create the Child grid int he code behind, but now I need to have a click event on the Child grid rows. With the following code I get a "Handler type is mismatched" on the order.AddHandler line.

Any help on how to get this to work?

Thanks,

Doug

    private void rgvPatientImages_DataLoading(object sender, Telerik.Windows.Controls.GridView.GridViewDataLoadingEventArgs e)
    {
        GridViewDataControl dataControl = (GridViewDataControl)sender;
 
        if (dataControl.ParentRow != null)
        {
            dataControl.BorderThickness = new Thickness(0, 1, 0, 1);
            dataControl.GridLinesVisibility = GridLinesVisibility.None;
            dataControl.CanUserFreezeColumns = false;
            dataControl.ShowGroupPanel = false;
            dataControl.AutoGenerateColumns = false;
            dataControl.ChildTableDefinitions.Clear();
            dataControl.IsReadOnly = true;
            dataControl.SelectionMode = SelectionMode.Single;
            dataControl.SelectionUnit = GridViewSelectionUnit.Cell;
 
            GridViewDataColumn customerId = new GridViewDataColumn();
            customerId.Header = "Customer Id";
            customerId.DataMemberBinding = new Binding("CustId");
            customerId.DataType = typeof(int);
            dataControl.Columns.Add(customerId);
 
            GridViewDataColumn order = new GridViewDataColumn();
            order.UniqueName = "OrderIdId";
            order.Header = "Order Id";
            order.DataType = typeof(int);
 
            order.AddHandler(MouseLeftButtonDownEvent, new EventHandler<MouseButtonEventArgs> (orderId_MouseLeftButtonUp));
            dataControl.Columns.Add(order);
     }
}
 
    private void orderId_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
    {
        object ID = ((Button)sender).CommandParameter;
 
        CustomerOrder NewWindow = new CustomerOrder();
        NewWindow.orderId = Convert.ToInt32(sender.ToString());
        NewWindow.Show();
        this.Close();
    }
Doug
Top achievements
Rank 1
 asked on 15 Nov 2011
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?