Telerik Forums
UI for WPF Forum
1 answer
95 views

I have simple Dictionary:

Dictionary<int, string> dictionary = new Dictionary<int, string>();

And i want my Dictionary will be merge into Chart Pie like in this example (include all the toll tips that opened after mouse over):

 http://demos.telerik.com/aspnet-ajax/salesdashboard/

 Can i have a simple code example how to achieve that ?

Martin Ivanov
Telerik team
 answered on 23 Jun 2015
7 answers
205 views
Hello,
        My team just upgraded the telerik version (2015.1.225.45) and the tiles functionality is now completely changed as the group property of tile is now only read only.
 I am getting error "the given key is not present in dictionary" when removing the tile from group only when setting display index property for group.
 i got rid of that error when setting display index of group to null but the drag/drop functionality of tiles within groups doesn't work now. 
Here is the xaml code:

<Grid>
        <Grid.ColumnDefinitions/>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
        </Grid.RowDefinitions>
         
        <Grid.Resources>
             
            <Style TargetType="{x:Type telerik:Tile}">
                <Setter Property="TileType" Value="{Binding TileSize}" />
            </Style>
        </Grid.Resources>
        <telerik:RadTileList x:Name="RadTileList" VerticalTilesAlignment="Top" Grid.Row="2">
            <telerik:RadTileList.ItemsPanel>
                <ItemsPanelTemplate>
                    <telerik:TileListGroupPanel />
                </ItemsPanelTemplate>
            </telerik:RadTileList.ItemsPanel>
        </telerik:RadTileList>
 
        <Button Width="100" Height="100" Grid.Row="0" HorizontalAlignment="Left" Content="Button" Click="Button_Click_1"></Button>
         
    </Grid>

Button added to remove tile. Here is the code behind:

public partial class MainWindow : Window
    {
        ObservableCollection<TileGroup> group;
        ObservableCollection<Tile> tiles = new ObservableCollection<Tile>();
        Tile t;
 
        Tile t1;
        Tile t2;
        Tile t3;
 
        public MainWindow()
        {
            InitializeComponent();
 
            //Groups
            var groups_collection = new ObservableCollection<TileGroup>();
            groups_collection.Add(new TileGroup() { Header = "Group 1", DisplayIndex=0});
            groups_collection.Add(new TileGroup() { Header = "Group 2" ,DisplayIndex=1});
            groups_collection.Add(new TileGroup() { Header = "Group 3" ,DisplayIndex=2});
 
            //Tiles
            t1 = new Tile() { Content = "Tile 1"};
            t2 = new Tile() { Content = "Tile 2" };
 
            //Grouping tile
            groups_collection[0].Items.Add(t1);
            groups_collection[1].Items.Add(t2);
 
            //Add in TileList
            RadTileList.Groups.Add(groups_collection[0]);
            RadTileList.Groups.Add(groups_collection[1]);
 
        }
 
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            RadTileList.Groups[0].Items.RemoveAt(0);
 
        }
 
    }

Regards,
      
Maya
Telerik team
 answered on 23 Jun 2015
1 answer
106 views

Hi there,

I am very new to Telerik controls basically because I have never used it and now I have to as I am supporting an application which uses Telerik controls. Issue: Issue is with the RadGrid control which is not displaying properly with proper width, border and vertical scroll bar. It was working fine and all of sudden this started to happen. The issue is in our DEV system and all good at the production. As I compared the rendered markups with the two systems I found that both are different. I have attached the screenshots of both pages.

Telerik control version: 2012.1.411.40

Below is the code snippet from the affected page that has two RadGrid controls side-by-side and other controls to add / remove items from the first grid to the second one.

<table border="0" cellPadding="0" cellspacing="4" runat="server">
<tr>
<td>
<telerik:RadGrid ID="RadGridLeft" runat="server" gridlines="None" width="365px" height="200px" showheader="False" BackColor="White" >
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Value" >
<NoRecordsTemplate>
<p>Please select a value from the right column to remove from the search criteria. </p>
Use > button to add checked item(s) to the list.<br />
Use >> button to add all items to the list.<br />
Use < button to remove checked item(s) from the list.<br />
Use << button to remove all items from the list.<br />
</NoRecordsTemplate>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="Value" DataType="System.Int32" ReadOnly="True" UniqueName="Value" Visible="false" />
<telerik:GridBoundColumn DataField="Text" ReadOnly="True" UniqueName="Text" Visible="false" />
<telerik:GridTemplateColumn >
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkLeft" />&nbsp;&nbsp;
<asp:Label runat="server" ID="lblText" Text='<%#Eval("Text") %>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<PopUpSettings ScrollBars="None"></PopUpSettings>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>
</td>
<td>
<asp:Button ID="btnAdd" runat="server" CssClass="defaultButton" Text=">" ToolTip="Add Selected Country(s)" /><br />
<asp:Button ID="btnAddAll" runat="server" CssClass="defaultButton" Text=">>" ToolTip="Add All Countries" /><br />
<asp:Button ID="btnRemove" runat="server" CssClass="defaultButton" Text="<" ToolTip="Remove Selected Country(s)" /><br />
<asp:Button ID="btnRemoveAll" runat="server" CssClass="defaultButton" Text="<<" ToolTip="Remove All Countries" />
</td>
<td>
<telerik:RadGrid id="RadGridRight" runat="server" gridlines="None" width="365px" height="200px" showheader="False" BackColor="White">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="Value">
<NoRecordsTemplate>
<p>Please select a value from the left column to add to the search criteria.</p>
Use > button to add checked item(s) to the list.<br />
Use >> button to add all items to the list.<br />
Use < button to remove checked item(s) from the list.<br />
Use << button to remove all items from the list.<br />
</NoRecordsTemplate>
<RowIndicatorColumn Visible="False">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="False" Resizable="False">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="Value" DataType="System.Int32" ReadOnly="True" UniqueName="Value" Visible="false" />
<telerik:GridBoundColumn DataField="Text" ReadOnly="True" UniqueName="Text" Visible="false" />
<telerik:GridTemplateColumn >
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkRight" />&nbsp;&nbsp;
<asp:Label runat="server" ID="lblText" Text='<%#Eval("Text") %>' />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<PopUpSettings ScrollBars="None"></PopUpSettings>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
</table>

 

Your help would be much appreciated. Please let me know should you require further details.

Thanks & Regards,

A â€‹ ​

Viktor Tachev
Telerik team
 answered on 23 Jun 2015
6 answers
168 views

Hi~

I made some control which use radgridview.

And this control runs well in an application project. But threw an exception when it used in vspackage project.

 The exception threw in control constructor

and the exception is system.window.markup.staticresourcehilder.

And inner exception is typeinitializationexception of  telerik.windows.input.touchmanager.

And inner exception of above is system.window.markup.staticresourcehilder again.

 And inner of above is system.notimplementedexception.

 

plz, some body give me hint!!!

 

.

 

 

 

Dimitrina
Telerik team
 answered on 23 Jun 2015
2 answers
96 views

So I am using RadCartesianChart with SplineAreaSeries to simulate the oceans tide. I am using DateTimeContinuousAxis as my horizontal value and the tide height as my vertical value. The chart draws great curves, but I cannot find a way to get the path details from the chart that is drawn. What I am trying to do is have an object move itself across the Spline on a timed interval. The object will show the tides height in the middle of it.

So here are my questions.

->Is there a way to find out the vertical intersection point given the horizontal value. chart.series.GetVerticalValue(HorizontalValue); So if I provide a DateTime, it will give me the vertical height value.

-> If not, are there any other ways to find out intersection points of the spline or the drawn path itself? If I could get access to that then I can duplicate a path for my object to follow.

--------------------------------------

Attached is the closest that I have come. The SplineChart is draw in blue, then I have automatically calculated the tide height at timed intervals(Green) and have the annotation follow it, but just can't make it curve to follow.

 

Thanks!

Peter
Top achievements
Rank 1
 answered on 23 Jun 2015
1 answer
170 views

I tried long time to add an additional Control to the TileListGroupPanel because I want to display a status (like in the first picture below) in the TileListGroupPanel. My solution until now is to set the control at the bottom of the TileListGroupPanel (Grid with two rows) but in this case the horizonal ScrollBar is allways at the top of this control which is not very nice (see second picture).

Is there any way to bring the control into the TileListGroupPanel or not?

Stefan
Telerik team
 answered on 22 Jun 2015
3 answers
157 views

 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

<telerik:RadGridView.ColumnGroups>
<telerik:GridViewColumnGroup Name="Vehicle"
Header="Vehicle" />
<telerik:GridViewColumnGroup Name="Engine"
Header="Engine" />
<telerik:GridViewColumnGroup Name="Price"
Header="Price" />
</telerik:RadGridView.ColumnGroups>

 

The type 'telerik:GridViewColumnGroup' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

getting error...solution?

Dimitrina
Telerik team
 answered on 22 Jun 2015
3 answers
100 views
Hi,
I would like to add auto vertical scrollbar to the AllDayArea.
I have a lot of allday appointments and i would like to be able to control the scrollbar visibility for this area.

Thanks
aanstellings
Kalin
Telerik team
 answered on 22 Jun 2015
1 answer
95 views

Hello , 

 

I would like to begin edit at the end of cell's text in RadGridView . some thing like the following at windows form :

dgv.BeginEdit(false);
((TextBox)dgv.EditingControl).SelectionStart = 0;

 

Is it doable ?

Dimitrina
Telerik team
 answered on 22 Jun 2015
1 answer
164 views

Hi,

i tried your wpf exmaple of the tileview control:

       </Grid.RowDefinitions>
  
        <Border Grid.Row="0" Grid.Column="0" Background="#5ab765" Margin="0,0,5,0">
            <StackPanel Orientation="Horizontal" Margin="10,5,10,5" HorizontalAlignment="Left">
                <Image  Stretch="Uniform" Margin="5" Source="Style/Images/lupe.png" />
                <TextBox BorderThickness="0" Padding="3" MinWidth="230" Background="white" x:Name="SuchenInput"
                                            HorizontalContentAlignment="Left" VerticalContentAlignment="Center" TabIndex="1"
                                            HorizontalAlignment="Center"/>
            </StackPanel>
        </Border>
          
        <Border Grid.Row="0" Grid.Column="1" Background="#5ab765" Margin="5,0,0,0">
            <Label Content="{Binding Value}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="18" x:Name="AufgabeNrlbl"/>
        </Border>
          
        <telerik:RadGridView x:Name="RadGridView1" GroupRenderMode="Flat" telerik:StyleManager.Theme="Windows8Touch"
                             ItemsSource="{Binding Adressen}" GroupPanelBackground="#4582bb"
                             ColumnWidth="*" CanUserFreezeColumns="False" Margin="5,10,5,10" Grid.Row="1" Grid.Column="0"
                             RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" AutoGenerateColumns="False"
                             flexCrmAdressen:CustomFilterBehavior.TextBox="{Binding ElementName=SuchenInput}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" Width="*" Header="Name" x:Name="Namelbl" IsVisible="True" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
  
        <telerik:RadTileView x:Name="DetailView" Grid.Row="1" Grid.Column="1" Margin="0" ColumnWidth="Auto"
                             DragMode="{Binding ElementName=dragMode, Path=SelectedItem}" IsItemsSizeInPercentages="True"
                             MinimizedColumnWidth="250" PreservePositionWhenMaximized="true" MinimizedRowHeight="Auto"
                             telerik:TileViewPanel.IsRowsShrinkEnabled="True" telerik:TileViewPanel.IsSizeBoundToPosition="True"
                             RowHeight="Auto" telerik:TileViewPanel.IsColumnsShrinkEnabled="True"
                             telerik:StyleManager.Theme="Windows8Touch">
            <telerik:RadTileViewItem Header="Generell" RestoredHeight="38" MinimizedHeight="200" RestoredWidth="200"
                                     PreviewPositionChanged="RadTileViewItem_PreviewPositionChanged">
                <StackPanel Margin="5 5 0 0" >
                    <Label Content="Teeeeeeeeeeeeeeeeest" Background="Aqua" Width="200"></Label>
                </StackPanel>
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="My Settings" RestoredHeight="38" MinimizedHeight="160" RestoredWidth="50">
                <StackPanel Margin="5 5 0 0">
                    <Label Content="Teeeeeeeeeeeeeeeeest" Background="Aqua"></Label>
                </StackPanel>
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="My Calendar" RestoredHeight="38" MinimizedHeight="200" RestoredWidth="50">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition MinWidth="218" />
                    </Grid.ColumnDefinitions>
                    <telerik:RadCalendar x:Name="myCalandar" Margin="7" />
                </Grid>
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item4">
                <TextBlock Text="Item4 Content" />
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item5">
                <TextBlock Text="Item5 Content" />
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item6">
                <TextBlock Text="Item6 Content" />
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item7">
                <TextBlock Text="Item6 Content" />
            </telerik:RadTileViewItem>
  
        </telerik:RadTileView>
    </Grid>
</UserControl>

 i attached a image as it look like now. Why dow not stop the tileview with on the yellow line? I your example the TileViewItems are in the window.

Thanks a lot

best regards

rene

Milena
Telerik team
 answered on 22 Jun 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?