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

I use a treeview with IsTristatemode="true", and binding CheckState property, all work's fine. For 90% of my nodes.

I have some particular nodes that are represented as hierarchical but they are not. In other word "Parts" need to behave "hierarchically", but Variable_other not.

I'd like to obtain these configurations :

[-] Part1
| -- [ ] Variable1
| -- [x] Variable2_other
       |-- [ ] Variable3
| -- [ ] Variable4

[-] Part1
| -- [ ] Variable1
| -- [ ] Variable2_other
       |-- [x] Variable3
| -- [ ] Variable4

I've tried to set IsTristatemode to false, but because of hierarchy, if I check "Variable3", "Variable2_other" is automatically checked and tristate indeterminate is not shown for Part (whereas i set in code the null value for checkstate).


Regards,
Aurore

Petar Mladenov
Telerik team
 answered on 27 Apr 2011
1 answer
226 views
I want to make the text in certain rows of my grid bold, based on a certain property of my object.  How can I create a style that has a property that I can bind to so that I can achieve this result?  I don't want to change the look at all of the GridViewCell's, just make the text inside of them bold or not bold.

EDIT:   It got it to work by using a DataTrigger.

 
        <Style TargetType="{x:Type GridView:GridViewCell}">  
            <Style.Triggers> 
                <DataTrigger Binding="{Binding Path=HasRead}" Value="False">  
                      <Setter Property="FontWeight" Value="Bold"/>  
                </DataTrigger>                  
            </Style.Triggers>            
        </Style> 
Brandon
Top achievements
Rank 1
 answered on 27 Apr 2011
2 answers
84 views
Hello,

Can I change ScheduleView  groupby value from the code?
I need to change grouping on the fly.
Is there any equivalent to the Scheduler.GroupBy property?


Thank you,
Oksana
Oksana
Top achievements
Rank 1
Iron
 answered on 27 Apr 2011
1 answer
144 views
Hi,

Another databinding question for PanelBar... I have ViewModel with two properties Header (string) and View (UserControl)

I want to bind "Header" property to the Header of RadPanelBarItem, and...
"View" property on my VM to the "content" area of the RadPanelBarItem.

For each ViewModel, there is only ONE Header and ONE View property.

I see from examples something like

<RadPanelBarItem>
  <RadPanelBarItem.Header>
      HEADER TEXT GOES HERE
  </RadPanelBarItem.Header>
 
   CONTENT GOES HERE
</RadPanelBarItem>

But I can not get this working with databindings... there are HierarchicalDataTemplate examples, but that does not compute for me, mostly because HierarchicalDataTemplate ItemsSource="{Binding View}", since View in my case is a singel property, not collection; and I am not sure if HierarchicalDataTemplate would work for a (singel value) property as a source.

This is what I got on my own...

<telerik:RadPanelBar ItemsSource="{Binding ...}">
   <telerik:RadPanelBar.ItemTemplate>
    <HierarchicalDataTemplate ItemsSource="{Binding View}">
     <TextBlock Text="{Binding Header}" />
     <HierarchicalDataTemplate.ItemTemplate>
      <DataTemplate>
       <ContentControl Content="{Binding View}" />
      </DataTemplate>
     </HierarchicalDataTemplate.ItemTemplate>
    </HierarchicalDataTemplate>
   </telerik:RadPanelBar.ItemTemplate>
  </telerik:RadPanelBar>
Kiril Stanoev
Telerik team
 answered on 27 Apr 2011
11 answers
315 views
When trying to use IsVirtualizing we are running into an issue with checkboxes not in the initial view are set incorrectly on data load. We are not binding to IsChecked property but are binding to the CheckState property.

The following is used to define the RadTreeViewItems:

<Style TargetType="{x:Type telerikNavigation:RadTreeViewItem}">
    <Setter Property="CheckState" Value="{Binding IsCheckedState, Mode=TwoWay}" />
    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
</Style>

The RadTreeView includes the virtualization settings:

IsVirtualizing="True" 
telerikTreeView:TreeViewPanel.VirtualizationMode="Hierarchical">

Does it look like the xaml is wrong?  If not, is there a work-around or a fix for this?

Without the virtualization, the RadTreeView is unacceptably slow on loading a list of just 7500 root level items.

Thanks,

T.
Petar Mladenov
Telerik team
 answered on 27 Apr 2011
4 answers
155 views
Hi there,

I did add the RadWindow class to my project and I found an exception occuring somehow in a random fashion.

There are serveral RadWindows in my application and they do work fine. But when I do add the ShowDialog of one of the RadWindows to the SelectionChanged event of a RadTreeView on my form, I do receive the exception shown below when closing the window again. This exception does not always show up, it only occures in a somehow random way. As you can see, there seems to be a problem in the OnThumbDragStarted event handler or one of the methods it is using.

I'm using the Q1 2011 version of the telerik libraries as I did update the version when I was working on this issue, but the update did not solve the problem.

Do you guys have an idea why I do receive this exception?

<P>Parameter name: otherVisual</P>
<P>at System.Windows.Media.Visual.FindCommonVisualAncestor(DependencyObject 
otherVisual)</P>
<P>at System.Windows.Media.Visual.TransformToVisual(Visual visual)</P>
<P>at Telerik.Windows.Controls.RadWindow.OnThumbDragStarted(Object sender, 
DragStartedEventArgs e) in 
c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\RadWindow.cs:line 
2125</P>
<P>at 
System.Windows.Controls.Primitives.DragStartedEventArgs.InvokeEventHandler(Delegate 
genericHandler, Object genericTarget)</P>
<P>at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
target)</P>
<P>at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
RoutedEventArgs routedEventArgs)</P>
<P>at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
RoutedEventArgs args, Boolean reRaised)</P>
<P>at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, 
RoutedEventArgs args)</P>
<P>at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)</P>
<P>at 
System.Windows.Controls.Primitives.Thumb.OnMouseLeftButtonDown(MouseButtonEventArgs 
e)</P>
<P>at System.Windows.UIElement.OnMouseLeftButtonDownThunk(Object sender, 
MouseButtonEventArgs e)</P>
<P>at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate 
genericHandler, Object genericTarget)</P>
<P>at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
target)</P>
<P>at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
RoutedEventArgs routedEventArgs)</P>
<P>at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
RoutedEventArgs args, Boolean reRaised)</P>
<P>at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, 
RoutedEventArgs args, RoutedEvent newEvent)</P>
<P>at System.Windows.UIElement.OnMouseDownThunk(Object sender, 
MouseButtonEventArgs e)</P>
<P>at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate 
genericHandler, Object genericTarget)</P>
<P>at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object 
target)</P>
<P>at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, 
RoutedEventArgs routedEventArgs)</P>
<P>at System.Windows.EventRoute.InvokeHandlersImpl(Object source, 
RoutedEventArgs args, Boolean reRaised)</P>
<P>at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, 
RoutedEventArgs args)</P>
<P>at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)</P>
<P>at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean 
trusted)</P>
<P>at System.Windows.Input.InputManager.ProcessStagingArea()</P>
<P>at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)</P>
<P>at System.Windows.Input.InputProviderSite.ReportInput(InputReport 
inputReport)</P>
<P>at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, 
InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, 
Int32 wheel)</P>
<P>at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, 
WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)</P>
<P>at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 
msg, IntPtr wParam, IntPtr lParam, Boolean& handled)</P>
<P>at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr 
lParam, Boolean& handled)</P>
<P>at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)</P>
<P>at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate 
callback, Object args, Int32 numArgs)</P>
<P>at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, 
Delegate method, Object args, Int32 numArgs, Delegate catchHandler)</P>
<P>at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority 
priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)</P>
<P>at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr 
wParam, IntPtr lParam)</P>
<P>at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)</P>
<P>at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame 
frame)</P>
<P>at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)</P>
<P>at System.Windows.Threading.Dispatcher.Run()</P>

at

Christian
Top achievements
Rank 2
 answered on 27 Apr 2011
0 answers
92 views
hi   
i need serialize RadGridView Items to xml file and can deserialize  items.please help me
Davood
Top achievements
Rank 1
 asked on 27 Apr 2011
1 answer
53 views
 hello, Ihave a problem please help me.
I want routate telerik chart like this website charts, Infact I want change zero point position in chart.
http://www.otoconsult.com/audiqueen/Audiometry.aspx
farid
Top achievements
Rank 1
 answered on 27 Apr 2011
3 answers
171 views
I have my custom VirtualQueryableCollectionView to connect to my database.
I can read data an sorting. Now i would like to do grouping. When i drag and drop column to group panel to group by this column it creates one group expander with null value. When i expand this expander there is all my grid row.
Can you help me how can i create my custom grouping?

Thanks Josef.
public class VirtualQuery : VirtualQueryableCollectionView
   {
 
       WPF.Models.VirtualQuery _cacheVirtualQuery;
       CacheConnection _conn;
       public VirtualQuery(WPF.Models.VirtualQuery cacheVirtualQuery)
       {
           LoadSize = 1000;
           _cacheVirtualQuery = cacheVirtualQuery;
           _conn = cacheVirtualQuery.Connection;
           _cacheVirtualQuery.CreateQuery();
           VirtualItemCount = Convert.ToInt16(_cacheVirtualQuery.VirtualItemCount);
           ItemsLoading += VirtualQuery_ItemsLoading;
       }
 
 
       private void VirtualQuery_ItemsLoading(object sender, VirtualQueryableCollectionViewItemsLoadingEventArgs e)
       {
           SetUpCacheQuery();
           _cacheVirtualQuery.ItemsLoading(e.StartIndex, e.ItemCount);
           VirtualItemCount = Convert.ToInt16(_cacheVirtualQuery.VirtualItemCount);
           #region smazat dynamicky objekt pomale
           /*CacheDynamicObject[] DataContext = new CacheDynamicObject[_cacheVirtualQuery.QueryItems.Count] ;
           for (int i = 0; i < _cacheVirtualQuery.QueryItems.Count; i++)
           {
               DataContext[i] = new CacheDynamicObject(_cacheVirtualQuery.QueryItems[i] as CacheArrayOfDataTypes);
           }*/
           #endregion
           object[] DataContext1 = new object[_cacheVirtualQuery.QueryItems.Count];
           for (int i = 0; i < _cacheVirtualQuery.QueryItems.Count; i++)
           {
               DataContext1[i] = new Dictionary<string, string>(_cacheVirtualQuery.QueryItems[i] as CacheArrayOfDataTypes); ;
           }
           Load(e.StartIndex, DataContext1);
           _cacheVirtualQuery.QueryItems.Clear();
           _cacheVirtualQuery.Connection.ForceSync();
       }
 
       private void SetUpCacheQuery()
       {
           _cacheVirtualQuery.SortDescriptors.Clear();
           foreach (Telerik.Windows.Controls.GridView.ColumnSortDescriptor item in SortDescriptors)
           {
               WPF.Models.SortDescriptor desc = new WPF.Models.SortDescriptor(_conn);
               desc.SortUniqueName =  item.Column.UniqueName;
               desc.SortDirection = item.SortDirection.ToString();
               _cacheVirtualQuery.SortDescriptors.Add(desc);
           }
       }
   }
grouping?
Milan
Telerik team
 answered on 27 Apr 2011
2 answers
105 views
Hi,

I have an issue with the WPF RadDocking Control (Version Q3 2010). 

I implement the RadDocking on my Window, some RadPane contains Usercontrol.

Here's the XAML :
<telerikDocking:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical">
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadPane Header="Overview" CanUserClose="False" >
                            <my:OverviewControl  Margin="5 5 5 5" x:Name="ucPlanSituation"/>
                        </telerikDocking:RadPane>
                    </telerikDocking:RadPaneGroup>
 
                    <telerikDocking:RadPaneGroup>
                        <telerikDocking:RadPane Header="Légende" CanUserClose="False"  >
                            <my:TocControl Margin="5 5 5 5" x:Name="ucLegende"/>
                        </telerikDocking:RadPane>
                    </telerikDocking:RadPaneGroup>
 </telerikDocking:RadSplitContainer>

My two usercontrols (TocControl and OverviewControl) have some ActiveX controls nested inside. When the pane is docked it displays perfectly but as soon as I pin or make it floating it doesn't display anymore.

Do you know a workaround to fix this issue ? 

Thank you and I wish you a great day.


George
Telerik team
 answered on 27 Apr 2011
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?