Telerik Forums
UI for WPF Forum
6 answers
769 views
Hi, i have I need to use a treeview where you can select only leaf elements.
For my needs I created a treeview databinding with a HierarchicalDataTemplate.

I tried to disable the intermediate nodes, but this way I are also disabled child nodes.
How can I do?

This is the XAML

<UserControl.Resources>
        <Style x:Key="containerStyle" TargetType="{x:Type telerik:RadTreeViewItem}">
            <Setter Property="IsSelected" Value="{Binding IsSelezionato, Mode=TwoWay}" />
            <Setter Property="IsExpanded" Value="{Binding IsEspanso, Mode=TwoWay}" />
            <Setter Property="IsEnabled" Value="{Binding IsAttivo, Mode=OneWay}" />
        </Style>
          
        <HierarchicalDataTemplate x:Key="BreadMenuCrumpTemplateL1"  ItemsSource="{Binding Children}" ItemContainerStyle="{StaticResource containerStyle}">
            <TextBlock Text="{Binding Titolo}" Margin="0" VerticalAlignment="Stretch" />
        </HierarchicalDataTemplate>
  
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <telerik:RadDropDownButton Content="{Binding TitoloElemento, Mode=OneWay}" Margin="0">
            <telerik:RadDropDownButton.DropDownContent>
                <telerik:RadTreeView x:Name="radTreeView" ItemsSource="{Binding TreeMenu.Children}"  ItemTemplate="{StaticResource BreadMenuCrumpTemplateL1}" IsExpandOnSingleClickEnabled="True" IsExpandOnDblClickEnabled="False" IsSingleExpandPath="True" IsDragPreviewEnabled="False" IsDragTooltipEnabled="False" BringIntoViewMode="HeaderAndItems"  SelectedItem="{Binding CurrentTreeItem, Mode=TwoWay}" IsEditable="False"/>                       
            </telerik:RadDropDownButton.DropDownContent>
        </telerik:RadDropDownButton>
    </Grid>
Louis
Top achievements
Rank 1
 answered on 14 Aug 2015
2 answers
120 views

Hello

Same problem as in this post for ASP.NET

http://www.telerik.com/forums/autocompletebox-copy-paste-issue#p-j6IZLRhUajWZB6O__E_g

Can you let me know when this issue will be fixed?

Regards

Bianca

 ​

Bianca
Top achievements
Rank 1
 answered on 14 Aug 2015
5 answers
469 views

 Hi,

    I think it's not converniet to change path's color of RadPathButton.

Regards

Yang

Milena
Telerik team
 answered on 14 Aug 2015
1 answer
85 views

Hi, I'm Lee

 Currentrly, I try chage series type in 'RadCartesianChart'.

I use dynamic number of series.

Because I use 'CategoricalSeriesDescriptor.Style' in 'SeriesProvider'.

Chart style is adjusted 'BarSeriesStyle', 'PointSeriesStyle'.

But not adjust style 'LineSeriesStyle', 'SplineSeriesStyle', 'StepLineSeriesStyle'.

Wonderfully, 5 style is adjusted in new project.

I don't know why...

What should  I do for it?

 

ps. I using NoXaml library.

Petar Marchev
Telerik team
 answered on 14 Aug 2015
1 answer
94 views

Hello everyone,

I have a VisualizationLayer with ShapeFills set on the layer level by using

<telerik:VisualizationLayer.ShapeFill>

...

</telerik:VisualizationLayer.ShapeFill>

If the ShapeFill of the MapShapedata is changed in code (for example by selecting some elments from a list and then call .UseSelectedFill() ) and then a MapItemsRequest happens, the original ShapeFill of the items will be restored instead of keeping the "manually" set ShapeFill. How can I make them keep their ShapeFill ?


 
 
Petar Mladenov
Telerik team
 answered on 14 Aug 2015
6 answers
252 views
Hello,

I have a problem with ConnectionPoints collection in RadDiagramConnection.
As I've mentioned in thread title, RadDiagramConnection updates geometry on group selection (it only appears when two or more RadDiagramConnetion has been selected). As a result of geometry update, connection points on RadDiagramConnection are re-added (reset event and then add one by one).
I did not identify that problem when only one RadDiagramConnection is selected.

It lead's to problem in my scenario because I'm subscribing CollectionChanged event ​on that collection, so I got false info about points change (but it doesn't).
Could you please tell me how can I fix it? How can disable that geometry update on group RadDiagramConnection select?

Thanks in advance!
Michał
Top achievements
Rank 1
 answered on 14 Aug 2015
1 answer
219 views

Hello,;:

I have a RadImageEditor with ZoomController in order to zoom loaded pictures. The code looks like this:

 <imaging:ZoomController ImageEditor="{Binding ElementName=imageEditor}" />  
 <telerik:RadImageEditor x:Name="imageEditor" Image="{Binding ImagePath}" HorizontalAlignment="Stretch"
                                    VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                    ScrollViewer.VerticalScrollBarVisibility="Visible">
 </telerik:RadImageEditor>

It works just fine. The problem is with the size of slider (zoomController), it is simply just too small. When i try to set the height or width it just does not work. Is there a way to make it bigger?

Regards

Petya
Telerik team
 answered on 13 Aug 2015
1 answer
221 views

My application is based on MVVM pattern. I want to access ​a RadGridView control/object, within Code-Behind of ResourceDictionary xaml to be able to use its Export method to export contents to an Excel file. 

There's a UserControl XAML file which merges its resources with few individual ResourceDictionary xaml files. One of them is "ProdUnitResource.xaml" which has a DataTemplate control (x:key="ProdUnitVM"). This DataTemplate contains RadGridView control (Name="ProdUnitGrid". Cannot use x:key attribute since the parent control complains).

So, basically this is the structure -->

<UserControl>    ProdUnit.xaml

     <ResourceDictionary>    ProdUnitResource.xaml  (want to access "ProdUnitGrid" in code behind file ProdUnitResource.xaml.cs)

            <DataTemplate x:key="ProdUnitVM">

                  <RadGridView Name="ProdUnitGrid">

              

 I want to be export contents of this grid to an Excel file on click of an Hyperlink called "Export". So, I created a code-behind file for the ResourceDictionary xaml called "ProdUnitResource.xaml.cs" and was able to add following click event handler method to it. 

private void Export_Click(object sender, System.Windows.RoutedEventArgs e)
{       ExportFormat format = ExportFormat.ExcelML;
 
        var dialog = new System.Windows.Forms.SaveFileDialog();
        dialog.DefaultExt = "xls";
        dialog.Filter = String.Format("Excel files (*.{0})|*.{0}|All files (*.*)|*.*", extension);
        dialog.FilterIndex = 1;
 
        if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
            using (Stream stream = dialog.OpenFile())
            {
                GridViewExportOptions exportOptions = new GridViewExportOptions();
                exportOptions.Format = format;
                exportOptions.ShowColumnHeaders = true;
                ProdUnitGrid.Export(stream, exportOptions);
            }
        }​
}

Click Event handling works fine but I am unable to directly use name of the RadGridView control "ProdUnitGrid" within code behind. It is not recognized. I want to access this RadGridView object so that I can call its Export method. Please share if you know how I can access it. 

 

Ivan Ivanov
Telerik team
 answered on 13 Aug 2015
2 answers
123 views

Hi! I use telerik RadGridView to display Sql-server data. There are a lot of records need to display therefore it is necessary to implement virtualization. We use Entity Framework and for this way work this method:

 _collection = new VirtualQueryableCollectionView(uow.GetQueryableEntities<Cfo>().OrderBy(x => x.ID)) { LoadSize = 6, VirtualItemCount = 100 };

where Cfo - ef entity.

 

But it is necessary display data from tables which are absent in DbContext. I implement IDataReader for sql query. From dataReader I get column names and types, after this I create new Type dynamically and Map DataReader to IList of dynamically type objects: 

_fields = DataReaderHelper.GetDataReaderRows(dr);
var dynamicClass = DynamicTypeBuilder.CreateNewObject(_fields);
var dataReaderList = DataReaderHelper.DataReaderMapToList(dr, dynamicClass.GetType());​

In the end I get this:

_collection = new VirtualQueryableCollectionView(dataReaderList.AsQueryable()) { LoadSize = 6 };

 

But there is a problem: virtualization is not work! VirtualQueryableCollectionView make only one query, like: "Select *From dbo.[SomethingObjects]".

May be somebody know, how to solve this problem! 

 

Ps: there is the second problem using VirtualQueryableCollectionView this ef entities: when grouping does not work virtualization!

Dimitrina
Telerik team
 answered on 13 Aug 2015
6 answers
137 views

Is it possible to set some time/day slots as locked, so that tasks cannot be put inside those slots?

Thanks

Vladi
Telerik team
 answered on 13 Aug 2015
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?