Telerik Forums
UI for WPF Forum
12 answers
582 views
Hi,

I want to display a multi-column ComboBox in RadGridView cell. I have followed below blog and I am able to achieve the half of the requirement.
http://www.telerik.com/help/wpf/radgridview-columns-column-types-combobox-column.html

However there are some issues:
1. When I select an item in ComboBox two columns are displayed. Instead of two columns I want to display only one column value when user selected an item and ComboBox collapsed
2. I want to display Title for these column
3. And want to allow user to sort

I also had a look at another blog however here also how to achieve this will GridViewComboBoxColumn and point #1 as mentioned above are not achieved.

http://blogs.telerik.com/vladimirenchev/posts/10-04-09/how-to-filter-as-you-type-radgridview-inside-radcombobox-for-wpf-and-silverlight.aspx

Please throw some light on how to achieve this requirement.
Max
Top achievements
Rank 1
 answered on 15 Jul 2013
1 answer
101 views
Hi,

I have some question regarding HierarchicalCollectionView while trying to troubleshoot some performance/memory issue within TreeListView.

1. why a SingleItemHierarchicalCollectionView is created for each root item, even through there is no childrens . (we retrieve the children dynamically when user clicks the expand icon).

2. The method in HierarchicalCollectionView seems problematic to us:

 

internal override void ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)

{
....

else

 

 

if (args.Action == NotifyCollectionChangedAction.Reset && EnumerableExtensions.Count(this.SourceCollection) == 0)

{

....
}

it seems it will only clear the ChildrenViewByItem when reset event happen with SourceCollection contains nothing. While in our case the sourceCollection normally contains something total new and it ends up leaking HierarchicalCollectionView/SingleItemHierarchicalCollectionView.

3. RemoveChildrenView/RemoveViewAndDisposeRecursive seems slow when the old source collection is very large .(and there is reset event with empty new SourceCollection). I can provide more detail if you want.

Thanks

 

 

 

Dimitrina
Telerik team
 answered on 15 Jul 2013
1 answer
244 views

TableCell cella = new TableCell();

cella.PreferredWidth = new TableWidthUnit(col2);

Paragraph p = new Paragraph();

Span sp = new Span("Flight Information");

sp.Underline = true; // Does Not work

sp.FontFamily = new System.Windows.Media.FontFamily("Calibri");

sp.FontSize = size * 1.33;

p.Inlines.Add(sp);

cella.Blocks.Add(p);

header.Cells.Add(cella);

table.Rows.Add(header);


I am creating a cell in a table, Underline property is read-only, do you have an example that I could use to underline the text of the span I am creating?

Thank-you
Stuart Cotts

 

 

Deyan
Telerik team
 answered on 15 Jul 2013
1 answer
115 views
Hello,

I just checked the new GUI of TeamPluse, it is great!
http://demos.telerik.com/teampulse-demo/view#/3

What is the name of the left main menu? (Work, Plan,...)
Is it a avaiable WPF control?

Thank you,
Manullino
Vanya Pavlova
Telerik team
 answered on 15 Jul 2013
5 answers
181 views
Hi There,
I have a strange problem with selected item of combobox.

I have created a template for combobox to display ellipses when text is trimming, for this i have removed the content presenter and replaced with textblock. when i display sting value then its working fine, but if i try to bind with numeric value then i am not able to see the selected value on combobox. 

Can you please tell me how can i fix this? is there any other  way that i can control this from the style of radcombobox.

Sample Style which i have created.:
<ControlTemplate x:Key="NonEditableComboBox" TargetType="telerikInput:RadComboBox">
       <Grid x:Name="VisualRoot">
           <VisualStateManager.VisualStateGroups>
               <VisualStateGroup x:Name="CommonStates">
                   <VisualState x:Name="Disabled">
                       <Storyboard>
                           <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_DropDownButton" Storyboard.TargetProperty="Opacity">
                               <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value=".5" />
                           </DoubleAnimationUsingKeyFrames>
                       </Storyboard>
                   </VisualState>
                   <VisualState x:Name="Normal">
                   </VisualState>
                   <VisualState x:Name="MouseOver">
                       <Storyboard>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundBorder" Storyboard.TargetProperty="Background">
                               <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource HoverBackground}" />
                           </ObjectAnimationUsingKeyFrames>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                               <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_MouseOver}" />
                           </ObjectAnimationUsingKeyFrames>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                               <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_MouseOver}" />
                           </ObjectAnimationUsingKeyFrames>
                       </Storyboard>
                   </VisualState>
                   <VisualState x:Name="DropDownOpen">
                       <Storyboard>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundBorder" Storyboard.TargetProperty="Background">
                               <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DropDownOpenBackground}" />
                           </ObjectAnimationUsingKeyFrames>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Foreground">
                               <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconForeground_Pressed}" />
                           </ObjectAnimationUsingKeyFrames>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownIcon" Storyboard.TargetProperty="Background">
                               <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonIconBackground_Pressed}" />
                           </ObjectAnimationUsingKeyFrames>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBorder" Storyboard.TargetProperty="Visibility">
                               <DiscreteObjectKeyFrame KeyTime="0">
                                   <DiscreteObjectKeyFrame.Value>
                                       <Visibility>Collapsed</Visibility>
                                   </DiscreteObjectKeyFrame.Value>
                               </DiscreteObjectKeyFrame>
                           </ObjectAnimationUsingKeyFrames>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupFakeBorder"
                                   Storyboard.TargetProperty="Visibility">
                               <DiscreteObjectKeyFrame KeyTime="0">
                                   <DiscreteObjectKeyFrame.Value>
                                       <Visibility>Visible</Visibility>
                                   </DiscreteObjectKeyFrame.Value>
                               </DiscreteObjectKeyFrame>
                           </ObjectAnimationUsingKeyFrames>
                       </Storyboard>
                   </VisualState>
               </VisualStateGroup>
               <VisualStateGroup x:Name="FocusStates">
                   <VisualState x:Name="Focused">
                       <Storyboard>
                           <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusBorder" Storyboard.TargetProperty="Visibility">
                               <DiscreteObjectKeyFrame KeyTime="0">
                                   <DiscreteObjectKeyFrame.Value>
                                       <Visibility>Visible</Visibility>
                                   </DiscreteObjectKeyFrame.Value>
                               </DiscreteObjectKeyFrame>
                           </ObjectAnimationUsingKeyFrames>
                       </Storyboard>
                   </VisualState>
                   <VisualState x:Name="Unfocused" />
               </VisualStateGroup>
           </VisualStateManager.VisualStateGroups>
           <Border x:Name="PopupFakeBorder" Visibility="Collapsed" BorderThickness="1,0,1,0" CornerRadius="5,5,0,0"
                   Grid.ColumnSpan="2" Background="{StaticResource PickerPopupBackground_fake}"
                   BorderBrush="{TemplateBinding BorderBrush}" />
           <Border IsHitTestVisible="False" Background="{TemplateBinding Background}" CornerRadius="5" />
           <telerik:RadToggleButton x:Name="PART_DropDownButton" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Margin="0" Padding="0" ClickMode="Press">
               <telerik:RadToggleButton.Template>
                   <ControlTemplate TargetType="telerik:RadToggleButton">
                       <ContentPresenter />
                   </ControlTemplate>
               </telerik:RadToggleButton.Template>
               <Grid>
                   <Grid.ColumnDefinitions>
                       <ColumnDefinition Width="*" />
                       <ColumnDefinition Width="36" />
                   </Grid.ColumnDefinitions>
                   <Border x:Name="BackgroundBorder"
                           CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
                           Grid.ColumnSpan="2"
                           BorderBrush="{StaticResource Control_OuterBorderBrush}" BorderThickness="1" Background="{StaticResource DefaultBackground}" />
                   <ContentControl x:Name="DropDownIcon"
                                   Grid.Column="1"
                                   IsTabStop="False"
                                   Foreground="{StaticResource ButtonIconForeground_Normal}"
                                   Background="{StaticResource ButtonIconBackground_Normal}"
                                   Template="{StaticResource ArrowTemplateNonEditableCombobox}" />
                   <TextBlock x:Name="Content"
                              FontFamily="Segoe UI"
                              IsHitTestVisible="True"
                              Grid.Column="0"
                              Foreground="{TemplateBinding Foreground}"
                              HorizontalAlignment="Left"
                              Margin="{TemplateBinding Padding}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Text="{TemplateBinding SelectionBoxItem}"
                              TextTrimming="CharacterEllipsis"
                              ToolTip="{TemplateBinding  SelectionBoxItem}">
                
                   </TextBlock>
                   <!--<ContentPresenter x:Name="Content"
                                     Grid.Column="0"
                                     Margin="{TemplateBinding Padding}"
                                     IsHitTestVisible="False"
                                     Content="{TemplateBinding SelectionBoxItem}"
                                     ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                                     TextBlock.Foreground="Black"
                                     HorizontalAlignment="Left"
                                     VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                      
                   </ContentPresenter>-->
                   <Border x:Name="FocusBorder"
                           BorderThickness="1"
                           Margin="1"
                           Visibility="Collapsed"
                           BorderBrush="{StaticResource Control_FocusBorderBrush}" Grid.ColumnSpan="2" CornerRadius="3" />
               </Grid>
           </telerik:RadToggleButton>
           <Popup x:Name="PART_Popup">
               <Grid x:Name="PopupRoot">
                   <Border BorderThickness="{TemplateBinding BorderThickness}" Margin="0,-10,0,0" Padding="0,10,0,0" BorderBrush="{TemplateBinding BorderBrush}" MinWidth="{TemplateBinding MinDropDownWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}" Background="{StaticResource PickerPopupBackground}" CornerRadius="0 0 5 5">
                       <Grid>
                           <Grid.RowDefinitions>
                               <RowDefinition Height="Auto" />
                               <RowDefinition Height="*" />
                           </Grid.RowDefinitions>
                           <telerik:RadButton x:Name="PART_ClearButton" Grid.Row="0" Margin="-1 -1 -1 0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}" Content="{TemplateBinding ClearSelectionButtonContent}" />
                           <ScrollViewer x:Name="PART_ScrollViewer" Grid.Row="1" Foreground="{TemplateBinding Foreground}" Padding="0 1 0 0" BorderThickness="0" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
                               <ItemsPresenter />
                           </ScrollViewer>
                       </Grid>
                   </Border>
               </Grid>
           </Popup>
       </Grid>
   </ControlTemplate>

Regards,
Srinivas.
Konstantina
Telerik team
 answered on 15 Jul 2013
1 answer
119 views
Hi All,

I have a requirement to plot date time data on the RadCartesianChart, I have multiple series but each has a value and a datetime , what type of Horizontal Axis should I be choosing if my collection can have multiple points for the same date time

So for example, for 27th October 2013, I expect the series to have,
DateTime                          Value
27/10/2013 1:45:00 62.5
27/10/2013 2:00:00 32.5
27/10/2013 2:15:00 32.5
27/10/2013 2:30:00 32.5
27/10/2013 2:45:00 32.5
27/10/2013 2:00:00 99.1
27/10/2013 2:15:00 99.1
27/10/2013 2:30:00 100.2
27/10/2013 2:45:00 65.5
27/10/2013 3:00:00 32.5

Please refer to the attached screen shot of how I would expect the graph to look (please ignore the values on the y axis in the graph, they will not match with those specified in the example above). 

For those familiar with financial vertical would recognize this as the Long day when the clock change takes place and the 2nd hour is duplicated when dealing with GMT +1 timezone.  

Regards,
Tarun






Petar Kirov
Telerik team
 answered on 15 Jul 2013
1 answer
99 views
I m trying to expand and select related node on load on demand RadTreeView(telerik). but nodes are not expanded  if nodes are not loaded yet.I used the same codes  from

http://www.telerik.com/help/wpf/radtreeview-howto-exapand-select-item-with-lod-enabled-treeview.html

    var itemsControl = Tree as ItemsControl;
var itemFound = true;

    while (itemsControl != null && itemFound)
{
itemFound = false;
var currentObject = ObjList.FirstOrDefault();

for (int i = 0; i < itemsControl.Items.Count; i++)
{
var treeElement = itemsControl.Items[i] as TreeElement;
if (currentObject.Name == treeElement .Name)
{
itemFound = true;
networkObjList.RemoveAt(0);
BringIndexIntoView(itemsControl, i);
itemsControl.UpdateLayout();
var container = itemsControl.ItemContainerGenerator.ContainerFromIndex(i) as RadTreeViewItem;
if (container != null)
{
if (networkObjList.Count == 0)
{
container.IsSelected = true;
container.Focus();
}
else
{
container.IsExpanded = true;

}

container.UpdateLayout();
itemsControl = container as ItemsControl;
}
}
}
}

but non loaded nodes childs can not be filled. Why? could you help me?

And also I wonder that How does a container know when a child has loaded?
Hristo
Telerik team
 answered on 15 Jul 2013
1 answer
78 views
Hi,

I have some problem with my pdfViewer. When i have barcode in pdf documnet, i can't see that barcode - there are just some random characters. 
For example in one of documents with barcode, in place where that barcode should be i see ";@+CFR.'$RUF@!#.Ck"" and some other characters wchich i couldn't find on the keyboard.

Does anybody have some idea how to fix it ?
Kammen
Telerik team
 answered on 15 Jul 2013
6 answers
921 views
Greetings,

I have used all of the themes and none of them work when running the program.  When I do the development in Blend, the visualizer shows different themes, although Summer does not look like it does when used in a dock tabcontrol with the sweeping curved edge - it still has rectangles for tabitem headers.  When I run the application, the tab control looks exactly the same regardless of the theme.  I am following the example verbatim and it does not work...  I have attached a set of screen shots with examples of all themes with Blend displayed over the app when it runs...

Thanks,
Steve
Yana
Telerik team
 answered on 15 Jul 2013
0 answers
73 views
Team, 

i have an requirement like,  a column (called track) which includes radio button and lines, how to do this?

i have attached the sample grid, i need to do as similar

Velkumar
Top achievements
Rank 1
 asked on 15 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?