Telerik Forums
UI for WPF Forum
1 answer
156 views
Hi All

Is it possible to bind the one column to 2 fields?

The scenario is that we have a sales rep, which requires both first and last names in the one column. I have managed this with a datatemplate:
<!-- Sales Rep Name Template -->
        <DataTemplate x:Key="SalesRepNameTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding user.first_name}" />
                <TextBlock Text=" " />
                <TextBlock Text="{Binding user.last_name}" />
            </StackPanel>
        </DataTemplate>




<telerikGridView:GridViewDataColumn Header="Sales Rep" CellTemplate="{StaticResource SalesRepNameTemplate}" />

But the issue is that this column can now not be sorted or grouped or filtered, which is also required.

How else would this be possible while still retaining sorting etc?
Veselin Vasilev
Telerik team
 answered on 04 Jun 2010
1 answer
108 views
So I have two Windows (same app) and one RadGrid in each, I simply want to dragdrop from one the other.  But the problem is that I have my windows on separate threads for better UI performance. And therefore get error: "The calling thread cannot access this object because a different thread owns it."

How can I solv this?

I open My windows like this:
private void ShowMyWindow1() 
 
Thread _Thread = new Thread(() => 
            { 
                MyWindow1 _MyWindow1 = new MyWindow1(); 
         
                _MyWindow1.Show(); 
                _MyWindow1.Closed += (sender, e) => 
                _MyWindow1.Dispatcher.InvokeShutdown(); 
 
                System.Windows.Threading.Dispatcher.Run(); 
            }); 
 
            _Thread.Name = "My Window"
            _Thread.SetApartmentState(ApartmentState.STA); 
            _Thread.Start(); 


Valentin.Stoychev
Telerik team
 answered on 04 Jun 2010
2 answers
157 views
I have a GridView with a second Grid View nested inside the Row detail template, this nested GridView then has it's own detail template.  I am getting a Binding error from the DetailsPresentor for this second item.  I am guessing this has something to do with the fact that when the application is loaded, no row is selected in the top level grid view and as a result the nested grid view to which the second Details presenter is bound does not exist.
Andrew
Top achievements
Rank 1
 answered on 03 Jun 2010
5 answers
181 views
Hi, I am having a wierd problem with the WPF RadGridView control 10.1.

I am binding an ObservableCollection<> of POCO's that implement INotifyPropertyChanged and that is all.  The properties of the class are all strings.  That observable collection is databound to the ItemsSource property.  The data is bound just fine, CanUserSort is true for the control and IsSortable is true on the columns. 

Is there some sort of interface that the POCO must implement in order to sort? 

Thanks,
David Sandor
Vlad
Telerik team
 answered on 03 Jun 2010
1 answer
129 views
Hi
When I save the layout of RadDocking panes using RadDocking.SaveLayout method only those panes that are declared in xaml code are saved correctly. Layout for those created dynamically (in run-tiime mode) is not saved. Is there any way to solve this issue? Because if I declare many panes (especially those that are floating) in xaml code  makes application startup slower (too many initializations).
Thanks.
Miroslav Nedyalkov
Telerik team
 answered on 03 Jun 2010
1 answer
71 views
How to bind the DeatilsRow to WCF.

My gridView's source is bound to a wcf operation , I wish to bind the details row to another wcf operation.
How to do that.
Rossen Hristov
Telerik team
 answered on 03 Jun 2010
3 answers
119 views
We are using the RadToolBar in the Q3 2009 release.

When we bind to the ItemSource of the RadToolBar it loads fine but if we make the window smaller (to the point where the overflow appears) then bigger, the items repeat. Attached is a before and after.


Valentin.Stoychev
Telerik team
 answered on 03 Jun 2010
1 answer
126 views
I can't set the foregournd color to black in the place where I placed the comment.

<telNav:RadPanelBar x:Name="PresentationPanel"
                             Template="{DynamicResource PresentationPanelBar}"
                             DataContext="{Binding}">
        <telNav:RadPanelBarItem Name="CollateralLibraryPanel"
                                    IsExpanded="False"
                                    ScrollViewer.CanContentScroll="True"
                                    Template="{DynamicResource PresentationPanelBarItem}" Background="#FF641818">
            <telNav:RadPanelBarItem.Header >
                <TextBlock Text="Collateral Library"
                               Foreground="#FFFFFF"
                               Name="txtTopicsHeader"
                               Margin="5 4 5 5" />
            </telNav:RadPanelBarItem.Header>
            <StackPanel Orientation="Vertical"
                            VerticalAlignment="Top"
                            MaxHeight="200"
                            Margin="0"
                            ScrollViewer.CanContentScroll="True"
                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                            HorizontalAlignment="Left">

                <!-- CAN'T SET FOREGROUND COLOR TO BLACK!!!! below -->
                <telNav:RadPanelBar x:Name="pbLeaveBehindMaterial"
                                            MinWidth="182"
                                            MaxHeight="180"
                                            Margin="0"
                                            ItemsSource="{Binding Path=LeaveBehindMaterials, Mode=TwoWay}"
                                            ScrollViewer.CanContentScroll="True"
                                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                                            ItemTemplate="{StaticResource FolderDataTemplate}"                                       
                                            IsEnabled="True">
                </telNav:RadPanelBar>
            </StackPanel>
        </telNav:RadPanelBarItem>
    </telNav:RadPanelBar>

Dimitrina
Telerik team
 answered on 03 Jun 2010
2 answers
51 views
With the latest 5-28 internal release, RadTileViews placed inside a RadPanelBar are now rendering 90 degrees off. Is there a setting to change this back or is this an unintentional bug.
Bobi
Telerik team
 answered on 03 Jun 2010
1 answer
95 views
Try dragging an item from all products to Order grid's column caption. Bum.

---------------------------
Fatal error!
---------------------------
Error message: Object reference not set to an instance of an object.

StackTrace:    at Telerik.Windows.Examples.DragAndDrop.WPF.TreeToGrid.Example.OnGridViewDropInfo(Object sender, DragDropEventArgs e)

   at Telerik.Windows.Controls.DragDrop.DragDropEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) in c:\Builds\WPF_Scrum\Core_WPF_2010_Q1\Sources\Development\Core\Controls\DragDrop\DragDropEventArgs.cs:line 47

   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 Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.RaiseDropInfo() in c:\Builds\WPF_Scrum\Core_WPF_2010_Q1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 659

   at Telerik.Windows.Controls.DragDrop.RadDragAndDropManager.OnRealDrag(IMouseEventArgs e) in c:\Builds\WPF_Scrum\Core_WPF_2010_Q1\Sources\Development\Core\Controls\DragDrop\RadDragAndDropManager.cs:line 1242

   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.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)




---------------------------
OK   
---------------------------

Tina Stancheva
Telerik team
 answered on 03 Jun 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?