Telerik Forums
UI for WPF Forum
3 answers
162 views
I am using a horizontally sliced TreeMap. Is it possible to control the VERTICAL distance (Y-Direction)?  I understand the horizontal distance is determined by the values (X-Direction).  

Ideally, the space would be equidistant vertically with all 3 groups having the same vertical distance.  Similar to a Grid with 3 RowDefinitions where Height="*"

Current XAML:
01.<telerik:RadTreeMap x:Name="TreeMap"  Grid.Row="0" Grid.Column="2"
02.  ClipToBounds="True" >
03. 
04.     <telerik:RadTreeMap.LayoutStrategy>
05.          <telerik:SliceDiceStrategy Orientation="Horizontal" />
06.     </telerik:RadTreeMap.LayoutStrategy>
07. 
08.     <telerik:RadTreeMap.TypeDefinitions>
09.           <telerik:TypeDefinition TargetTypeName="ModelInfo"
10.              ValuePath="Value" ChildrenPath="Children" LabelPath="Name"
11.              ItemStyle="{StaticResource IcicleStyle}" />
12. 
13.            <telerik:TypeDefinition TargetTypeName="GroupInfo"
14.              ValuePath="Value" ChildrenPath="Children" LabelPath="Name"
15.              ItemStyle="{StaticResource IcicleStyle}" />
16. 
17.            <telerik:TypeDefinition TargetTypeName="EventInfo"
18.              ValuePath="Value" LabelPath="Name"
19.              ItemStyle="{StaticResource IcicleStyle}" />
20. 
21.      </telerik:RadTreeMap.TypeDefinitions>
22. 
23.</telerik:RadTreeMap>

StaticResource IcicleStyle:

1.<Style x:Key="IcicleStyle" TargetType="telerik:RadTreeMapItem" >
2.    <Setter Property="Control.Background" Value="White" />
3.    <Setter Property="MaxHeight" Value="50" />
4.    <Setter Property="FontFamily" Value="Segoe UI" />
5.    <Setter Property="FontWeight" Value="SemiBold" />
6.    <Setter Property="Margin" Value="-1" />
7.    <Setter Property="Padding" Value="0" />
8.</Style>


A screenshot of the current layout is attached.  If you look at the last section labelled "S", Ideally,  (S.Height === %G1.Height).  Even if I remove the third level of data {1,2,3,4}, the result is the same.

Any help is appreciated.

Thanks,
Jacob
Petar Marchev
Telerik team
 answered on 27 Aug 2014
3 answers
324 views
HI,

I'm trying to use your Diagram control which is very cool by the way. But i'm struggling to understand how the structure works inside. Can I ask if you can compose one fully working example of OrgChart diagram like in demo. So I can study it.

Thanks in advance
Pavel R. Pavlov
Telerik team
 answered on 27 Aug 2014
1 answer
247 views
Hi Team,
I have the following columns in a grid in my MVVM project.
checkbox_Column Textbox1_column Textbox2_Column.

My requirement is - when i check the checkbox, Textbox2_Column should get disabled and when i un-check the checkbox Textbox1_column should get disabled.

Can you please tell me how to do this.

Thanks,
Dimitrina
Telerik team
 answered on 26 Aug 2014
2 answers
385 views
Hi,
I am facing an Issue with binding in RadGrid. Here is my XAML

 <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsTermChange}"  Header="Change Term" x:Name="TermChange">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsTermChanged, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Change Mileage">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Add Option">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <CheckBox Name="optionCheckBox"/>
                            </Grid>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Add Maint.">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Remove Maint.">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewColumn Header="Proposed Term" >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox Width="80" HorizontalAlignment="Left" Margin="3,1,0,0" Text="{Binding Path=TermRequested, Mode=TwoWay,   UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" IsEditable="True" ItemsSource="{Binding AvailableTermsList}" StaysOpenOnEdit="True" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>

I want to bind the IsEnabled property of radcombobox (bold one) only when IsChecked property is true for checkbox(bold one). I am not abble to achieve that. Please help it is urgent.






Shreya
Top achievements
Rank 1
 answered on 26 Aug 2014
5 answers
189 views
I am fairly new to WPF and have not mastered MVVm so I'm building my treeview manually like so:

private void BindTreeToZipCodes(RadTreeViewItem parentNode)
        {
  
            if (parentNode == null)
            {
                trvZipCodes.Items.Clear();
  
                List<State> _states = StateService.GetActive();
  
                foreach (State _state in _states)
                {
                    RadTreeViewItem node = new RadTreeViewItem() { Header = _state.StateDescription };
                    node.DefaultImageSrc = "Resources/folder.png";
  
                    node.Tag = "State";
                    if (_state.StateCode == _selectedDealer.StateCode)
                    {
                        node.IsExpanded = true;
                        node.IsSelected = true;
                        _selectedPath = _state.StateDescription;
                    }
                    else
                    {
                        node.IsExpanded = false;
                    }
                    trvZipCodes.Items.Add(node);
  
                    //call recursively to add zip parts
                    BindTreeToZipCodes(node);
                }
            }
            else //parent node is not null - what level is it
            {
                if (((string)parentNode.Tag) == "State")
                {
                    List<ZipCodePart> _zipParts = ZipCodePartService.GetForState(parentNode.Header.ToString().Substring(0, 2));
                    foreach (ZipCodePart _zipPart in _zipParts)
                    {
                        RadTreeViewItem node = new RadTreeViewItem() { Header = _zipPart.ZipPart };
                        node.Tag = "ZipPart";
                        parentNode.Items.Add(node);
                    }
                    if (parentNode.IsSelected == true)
                    {
                        _selectedPath += " | " + _zipParts[_zipParts.Count - 1].ZipPart;
                    }
                }
            }
  
        }

The image file for the state does not load despite it being in the relative path in the project.  Does it ned to be loaded in as a resource somehow rather than just specifying the relative path? 

Also what is the format of the path when bringing a TreeViewItem into view (auto scrolling) in a non-bound scenario like this, when there is more than one level involved?  I thought I saw somewhere to separate the levels items with a " | " but it doesn't seem to work.

as in:

BindTreeToZipCodes(null);
  
trvZipCodes.BringPathIntoView(_selectedPath);

Thanks,
Jonathan
Tessa
Top achievements
Rank 1
 answered on 26 Aug 2014
1 answer
244 views
Hello Telerik Team,
i have a user control Project. I declared the theme files in MergedDictionaries to style the ganttcontrol.
The structure is designed as Mvvm. When i start the Application i get a Null reference exception.
How can i fix this issue? Thank you and regards Robert ...
 
<UserControl
    x:Class="GanttView.GanttControl"
    xmlns:vm="clr-namespace:GanttViewModel;assembly=GanttViewModel"
    DataContext="{DynamicResource GanttViewModel}"
    mc:Ignorable="d" d:DesignHeight="1024" d:DesignWidth="1280">
 
    <UserControl.Resources>
        <ResourceDictionary>
            <vm:GanttControlViewModel x:Key="GanttViewModel"/>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/GanttView;component/Themes/System.Windows.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/GanttView;component/Themes/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/GanttView;component/Themes/Telerik.Windows.Controls.GanttView.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
Kalin
Telerik team
 answered on 26 Aug 2014
7 answers
429 views
Hi,

I wonder if Telerik WPF controls has a textbox that supports autocomplete as the user types in, similar to the Google search textbox (not a combo box). I have a repository of around 4000 items that I want bind as the data source for this autocomplete, and display a matching result as the user types (just top 7 or 8 of course). With Each new character typed, the suggested list get updated accordingly from those 4000 items.

Any suggestion how to achieve this behavior?

Regards
Kalin
Telerik team
 answered on 26 Aug 2014
3 answers
274 views
Hello,

We want to create an AutoComplete (or RadComboBox IsEditable=true) binded to a collection of 60.000 items so we would like that the control create the query in database (with like % for exemple) as to the user type the keyword and view the result in the choice popup of the combo

How to do this ?
Thx
Rosen Vladimirov
Telerik team
 answered on 26 Aug 2014
1 answer
614 views
Hello,

I'm working on a WPF application with ListViews and a pretty complex drag & drop functionality that I made.
I've replaced the ListViews with RadGridViews to achieve data virtualization.
I would like to use the existing drag and drop functionality with the RadGridView, can you please give me some info on how it can be done?

I've tried attaching the appropriate event handlers but it doesn't seem to work :
private void radGridView_Loaded(object sender, RoutedEventArgs e)
        {
            initInnerPlaylistControl(sender as RadGridView);
        }
 
public void initInnerPlaylistControl(RadGridView itemsControl)
        {
            itemsControl.AllowDrop = true;
            itemsControl.PreviewMouseLeftButtonDown += Rad_OnPreviewMouseLeftButtonDown;
            itemsControl.Drop += Rad_Drop;
            itemsControl.MouseMove += Rad_OnMouseMove;
            itemsControl.PreviewMouseLeftButtonUp += itemsControl1_OnPreviewMouseLeftButtonUp;
            itemsControl.QueryContinueDrag += Database_OnPreviewQueryContinueDrag;
            //itemsControl.OnGiveFeedback += OnGiveFeedback;
        }


thanks,
Idan
Dimitrina
Telerik team
 answered on 26 Aug 2014
3 answers
339 views
I have a column of Datetimes that have unique times for same dates. I want to not show the duplicates when filtering.
Based on this page http://www.telerik.com/help/wpf/gridview-filtering-faq-datetime-filtering.html all I need to do is write the following
 DataMemberBinding="{Binding BirthDate.Date}"

However all this does is remove the filter completely..

Any suggestions ?

thanks

Dimitrina
Telerik team
 answered on 26 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?