Telerik Forums
UI for WPF Forum
4 answers
138 views
Hi,

When I do the following actions:
1. Add a new row 
2. Start to edit a cell
3. Start to tab to the next cell
then I get the following error message:

   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.BringIndexIntoView(Int32 index) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.BringIntoView.cs:line 29
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ScrollIntoViewRecursive(FrameworkElement element, Stack`1 itemStack, Action`1 scrollFinishedCallback) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Scrolling.cs:line 252
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ScrollRowIntoViewInternal(Object dataItem, Action`1 scrollFinishedCallback) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Scrolling.cs:line 191
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass69.<ScrollIntoViewAsync>b__68() in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Scrolling.cs:line 94
   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)

Thomas
Top achievements
Rank 1
 answered on 29 Jan 2010
1 answer
68 views
Hello,
    I set the IsReadonly property of the grid to true. When I than try to set a column to writeable (gridname.Columns[0].IsReadOnly = false) it stays protected.
To get around this I set the grid's IsReadOnly propery to false and than protect certain columns by executing 
gridname.Columns[<Position of column to protect>].IsReadOnly = true

It would make more sense to allow the programmer to override the protection of the entire grid.
Nedyalko Nikolov
Telerik team
 answered on 29 Jan 2010
2 answers
77 views
Is it possible today in the GridView to provide a menu in the column header that will turn on and off summary functions for columns? I can provide a way for my users to do this, but if there is built in support I would like to use it.

Thanks,
Mike
Mike Cohen
Top achievements
Rank 1
 answered on 29 Jan 2010
1 answer
107 views
We're using the radtreeview and on the Selected event we fire off some asyncronous functionality that changes the underlying tree itemsource. The problem we're having is we're getting a null ref exception at the location below (see stack trace at the bottom).  We've tried previewSelected and get the same result there.  Our current workarond (not ideal) is to do our processing on MouseUp.  It appears that as we've removed the selected item the tree code isn't checking whether this is null.

Stack trace:
Telerik.Windows.Controls.RadTreeViewItem.HandleSingleClickFunctionality() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.Events.cs:line 374
   at Telerik.Windows.Controls.RadTreeViewItem.OnHeaderMouseLeftButtonUp(Object sender, MouseEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.Events.cs:line 369
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   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.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   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.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, WindowMessage 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, 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 LV.Vots.Windows.Desktop.App.Main()
   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()
Bobi
Telerik team
 answered on 29 Jan 2010
2 answers
338 views

I can’t get this to work. I can bind items to a listbox in the same way without problem…

 

 

 

<telerik:RadDocking DataContext="{Binding Source={StaticResource CustomerViewModel}}">

 

 

 

 

    <telerik:RadSplitContainer ItemsSource="{Binding Path=Customers}">

 

 

 

 

        <telerik:RadSplitContainer.ItemTemplate>

 

 

 

 

            <DataTemplate>

 

 

 

 

                <telerik:RadPaneGroup >

 

 

 

 

                    <telerik:RadPane Header="{Binding Path=CustomerName}">

 

 

 

 

                    </telerik:RadPane>

 

 

 

 

                </telerik:RadPaneGroup>

 

 

 

 

            </DataTemplate>

 

 

 

 

        </telerik:RadSplitContainer.ItemTemplate>

 

 

 

 

    </telerik:RadSplitContainer>

 

 

 

 

</telerik:RadDocking>

 

Tau Sick
Top achievements
Rank 1
 answered on 29 Jan 2010
5 answers
158 views
Hi,

I was told by Evan Hutnick that you were working on a TreeListView for WPF and that it should be made available in a Beta Release around the Q3 release. I cannot find it anywhere so I was wondering if I've missed something or what the status is on that control?

We have a project where such a control is very important and I would consider replacing the one we have with yours if it was good.
Valentin.Stoychev
Telerik team
 answered on 29 Jan 2010
3 answers
182 views
Hello,
I am having a problem with a combo box column in my GridView using WPF. 
The gridview rows and combo box are bound to two separate collections, linked by a key of type integer.
When the gridview loads both the rows and combobox column are filled with the correct data, but when I try to update the value in the combobox (select a different value) it does not work. 
I can open the combobox list and see the different values available, but when I try to select a value in the combo box it reverts back to the original value.

My gridview is setup with the following xaml:
<telerik:RadGridView Name="rgvAppConfig" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollMode="RealTime" IsTabStop="False" 
                                             AutoGenerateColumns="False" ColumnsWidthMode="Auto" ItemsSource="{Binding}"                                                
                                            > 
                        <telerik:RadGridView.Columns> 
                                <telerik:GridViewDataColumn UniqueName="Id" IsVisible="False" /> 
                                <telerik:GridViewDataColumn UniqueName="MessageType" Header="Message Type"/> 
                                <telerik:GridViewDataColumn UniqueName="Description" Header="Description"/> 
                                <telerik:GridViewDataColumn UniqueName="SaveLocation" Header="Save Location"/> 
                                <telerik:GridViewDataColumn UniqueName="FieldDelimiter" Header="Field Delimiter"/> 
                                <telerik:GridViewDataColumn UniqueName="ComponentDelimiter" Header="Component Delimiter"/> 
                                <telerik:GridViewDataColumn UniqueName="SubComponentDelimiter" Header="SubComponent Delimiter"/> 
                            <telerik:GridViewComboBoxColumn UniqueName="ImageType" Header="Image Type" DisplayMemberPath="Name" DataMemberBinding="{Binding SaveImageType}" SelectedValueMemberPath="Id"  ItemsSource="{Binding}" /> 
                            <telerik:GridViewDataColumn UniqueName="Enabled" HeaderText="Enabled"/> 
                            </telerik:RadGridView.Columns> 
                        </telerik:RadGridView> 

</telerik:RadTabItem> 

Which is loaded with the following:
IList<Common.DAL.AppConfig> appConfig = 
                        (from x in Common.DAL.AppConfig.All() 
                         select x).ToList(); 
IList<Common.DAL.ComBinaryType> comBinaryType = 
                        (from x in Common.DAL.ComBinaryType.All() 
                         select x).ToList(); 
rgvAppConfig.Columns["ImageType"].DataContext = comBinaryType; 
rgvAppConfig.DataContext = appConfig; 

How can I resolve this so when a value it selected from the combo box it retains the value to was selected and updates the collection?

Thanks,
Matt
Pavel Pavlov
Telerik team
 answered on 29 Jan 2010
1 answer
45 views
I have a Bar chart defined where the user can toggle between 2-D and 3-D.  XCategory labels work great in 2-D, but in 3-D pointmark values are displayed instead of labels.  Is there a way to show pointmark labels instead of values in 3-D?
Ves
Telerik team
 answered on 28 Jan 2010
5 answers
99 views
Hello,
    I've loaded a datatable cell with some text but the associated grid cell is not showing anything unless I click on the cell. When I click on the cell 3-4 lines of text appear.
I have to set the grid to read-only so now nothing will show up because the cell is read-only.
Any help would be appreciated.
Thanks
Jorge Gonzalez
Top achievements
Rank 1
 answered on 28 Jan 2010
5 answers
1.0K+ views
I am trying to dynamically add tabs to a TabControl using code behind where the template used for HeaderTemplate includes bound controls. Everything is working as I expected, except I cannot get the bound data to appear on the tab.

This is my header template:
    <Application.Resources> 
        <DataTemplate x:Key="TabItemHeaderTemplate">  
            <StackPanel Orientation="Horizontal" IsHitTestVisible="False">  
                <TextBlock Name="tbTabCaption" Foreground="Black" Margin="3,0,0,0" Text="{Binding Path=ConfigModel}"/>  
            </StackPanel> 
        </DataTemplate> 
    </Application.Resources> 

And this is my TabControl declaration:
        <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Vertical" > 
            <TextBlock  Margin="5" FontWeight="Bold" Text="Select a product configuration"></TextBlock> 
            <telerikNavigation:RadTabControl x:Name="tabControl" Margin="2" SelectionChanged="tabControl_SelectionChanged" TabStripPlacement="Left" VerticalAlignment="Top" HorizontalAlignment="Left">  
            </telerikNavigation:RadTabControl> 
        </StackPanel> 
 

Here is my code behind for adding a new tab to the TabControl:
CProductConfiguration myObject = new CProductConfiguration();     
    
RadTabItem newTabItem = new RadTabItem()        
{        
    DataContext = myObject,        
    HeaderTemplate = (DataTemplate)Application.Current.Resources["TabItemHeaderTemplate"],        
    Margin = new Thickness(2),        
    MinHeight=50,        
    MinWidth=100        
};        
tabControl.Items.Add(newTabItem);       

And here is a stripped down version of the object I am trying to bind:
public interface IProductConfiguration  
{  
    string ConfigModel { get; }  
}  
 
class CProductConfiguration : IProductConfiguration  
{  
    public string ConfigModel  
    {  
        get { return "MyModel"; }  
    }  
}  
 

I have tried setting the DataContext of the tab item (as shown), the tab control, and the window itself without any change. Changing the order in which the item's properties are set also had no affect. I know the tempate is being used because if I change the binding to static text, the text is displayed on the tab correctly. What am I missing here?
Bobi
Telerik team
 answered on 28 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?