Telerik Forums
UI for WPF Forum
1 answer
100 views
On the Loaded event of the control am adding my custom labels by assigning custom values to the  Y-Axis Tickpoint.Label property
when i scroll the scroll bar in the y-axis, all the custom tickpoint label disappears and am viewing my default numeric values in ticklabel????
how to slove this,
Vladimir Milev
Telerik team
 answered on 20 May 2010
2 answers
99 views
Hello all.

I have a problem with chart data within stacked bar chart.
Some data is not visible.
ItemSource of chart is List<decimal[5]>.
Image is attached.
Each column contains segments woth values from 30-70 from bottom to the top.
Bottom segments with value 30 are not visible at all.
I put AxisY.AutoRange to false and AxisY.MaxValue to 300 (sum of all segments from one solumn is 250).

Could you please help me about this?
Thanx in advance.
    Nenad
Nenad Djukic
Top achievements
Rank 1
 answered on 20 May 2010
4 answers
147 views
Hi ... I have a child grid for which I would like to show the IsExpandable button only if there is data in the objects child collection. I have tried the following XAML
        <Style TargetType="{x:Type Controls:GridView.GridViewRow}">
            <Setter Property="IsExpandable" Value="{Binding DeviceBehaviours.Count, Converter={StaticResource IntegerToBooleanConverter}, Mode=OneWay}" />
        </Style>
The converter returns a boolean if the child collection has a count. This collection is asynchronous and returns a only result after the RowLoaded event has already run. 

Weirdly this same Xaml works for the Expanded property.

Hope you can help
John .


John
Top achievements
Rank 1
 answered on 20 May 2010
3 answers
78 views

i have got a combobox which has set the RadComboBox.ItemTemplate to a combined string

 

<telerik:RadComboBox x:Name ="blah" HorizontalAlignment="Left" Margin="0,26.04,0,0" VerticalAlignment="Top" Width="167.54" d:LayoutOverrides="HorizontalAlignment" ItemsSource="{Binding Source={StaticResource respondentViewSource}}" >

so how can i have a search text area that actually searches the "displaymember" or "itemtemplate"
i think it's to do with telerik:TextSearch.TextPath, but i don't what value is expected in that attribute.

Valeri Hristov
Telerik team
 answered on 20 May 2010
3 answers
226 views
Hi< Which event do I subscribe to to know when a row has been deleted?

thanks,
Jas
Maya
Telerik team
 answered on 19 May 2010
3 answers
119 views
Hi.

I would like to have more than 1 row as a heading to my grid.
I would like to have a heading that is applicable to a couple of columns, with each underlying column still having its own heading.

It should be simular to the formatting that you can do in excel, when you merge a couple of columns into 1 column, and still have columns underneath it, example
------------------------------------
|            Data Group             |
------------------------------------
|Column1|Column2|Column3|
------------------------------------

I have a project where I need to add columns to my radgrid in code, so please help with a WPF C# example.

Thanks.
Yavor Georgiev
Telerik team
 answered on 19 May 2010
7 answers
719 views
Hello,

I'm a beginner in WPF and I need your help to do something.

I want to add a system to close tabs for users. But I can't do it !
I found a video here : http://tv.telerik.com/wpf/prism/introduction-prism-with-radcontrols-wpf and I use the same thing for RadTabControl. So I'm using MS Composite Application Guidance and the RegionManager.

So I have this code id my main project :
<telerik:RadTabControl Name="tabControlClient" DockPanel.Dock="Right" cal:RegionManager.RegionName="MainRegion" Margin="10 0 10 10" ScrollMode="Viewport" DropDownDisplayMode="Visible" DisplayMemberPath="Content"
            <telerik:RadTabControl.ItemContainerStyle> 
               <Style TargetType="{x:Type telerik:RadTabItem}"
                    <Setter Property="Header" Value="{Binding DataContext.HeaderInfo}" /> 
                    <Setter Property="Height" Value="25" /> 
                    <Setter Property="IsSelected" Value="True" /> 
                </Style> 
            </telerik:RadTabControl.ItemContainerStyle> 
</telerik:RadTabControl> 

In my Module Project I copy the code on the video :
public String HeaderInfo 
     get { return "Labs Module"; } 

#region INotifyPropertyChanged Membres 
 
public event PropertyChangedEventHandler PropertyChanged; 
 
protected void OnPropertyChanged(String propertyName) 
     if (this.PropertyChanged != null
     { 
          this.PropertyChanged(thisnew PropertyChangedEventArgs(propertyName)); 
     } 

It work ! But now I want to add a close system. So I search the solution in this forum and I found this : How to Add Close Button to the Tab Headers
So I complete my code in my main project like this :
<telerik:RadTabControl Name="tabControlClient" DockPanel.Dock="Right" cal:RegionManager.RegionName="MainRegion" Margin="10 0 10 10" ScrollMode="Viewport" DropDownDisplayMode="Visible" DisplayMemberPath="Content"
            <telerik:RadTabControl.ItemContainerStyle> 
               <Style TargetType="{x:Type telerik:RadTabItem}"
 
                    <Setter Property="Header" Value="{Binding DataContext.HeaderInfo}" /> 
                    <Setter Property="HeaderTemplate"
                        <Setter.Value> 
                            <DataTemplate> 
                                <Grid> 
                                    <TextBlock Text="{Binding Header}"></TextBlock> 
                                    <Button Grid.Column="1" Margin="3 0 0 0" Content="x" Width="16" 
                                       Height="16" HorizontalAlignment="right"/> 
                                </Grid> 
                            </DataTemplate> 
                        </Setter.Value> 
                    </Setter> 
                    <Setter Property="Height" Value="25" /> 
                    <Setter Property="IsSelected" Value="True" /> 
                </Style> 
            </telerik:RadTabControl.ItemContainerStyle> 
        </telerik:RadTabControl> 

But only close button appear and not the header text.
So how I can use this two solution to have "Header text + close button" please ?

If you need more informations or others, tell me.

Thank you in advance.
Best Regards





Tina Stancheva
Telerik team
 answered on 19 May 2010
2 answers
140 views
Hi.

I would like to have more than 1 row as a heading to my grid.
I would like to have a heading that is applicable to a couple of columns, with each underlying column still having its own heading.

It should be simular to the formatting that you can do in excel, when you merge a couple of columns into 1 column, and still have columns underneath it, example
------------------------------------
|            Data Group             |
------------------------------------
|Column1|Column2|Column3|
------------------------------------

I have a project where I need to add columns to my radgrid in code, so please help with a WPF C# example.

Thanks.
Eduan Marais
Top achievements
Rank 2
 answered on 19 May 2010
7 answers
410 views
How can I remove the expand icon where there is no data in the child
this is my code
<telerik:RadGridView  Margin="15,5,15,5" Name="gvRequest" Height="auto" Width="Auto" 
                                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
                                 telerik:StyleManager.Theme="Simple" AutoGenerateColumns="False"   
                                 IsFilteringAllowed="False" FlowDirection="RightToLeft" ShowGroupPanel="False">  
                    <telerik:RadGridView.Columns> 
                        <telerik:GridViewDataColumn UniqueName="ActivityName" Header="שם&#13;תת פעילות" Width="Auto" /> 
                        <telerik:GridViewDataColumn UniqueName="RequestID" Header="מספר&#13;דרישה" Width="Auto" /> 
                        <telerik:GridViewDataColumn UniqueName="RequestName" Header="שם&#13;דרישה" Width="Auto" /> 
                        <telerik:GridViewDataColumn UniqueName="RequestTotal" Header="סכום הדרישה &#13;(K ש''ח)" Width="Auto" /> 
                        <telerik:GridViewDataColumn UniqueName="RequestType" Header="סוג&#13;הדרישה" Width="Auto" />                         
                        <telerik:GridViewDataColumn UniqueName="Supplier" Header="ספק" Width="Auto" /> 
                        <telerik:GridViewDataColumn UniqueName="RequestBalance" Header="יתרה בדרישה &#13;(K ש''ח)" Width="Auto" /> 
                    </telerik:RadGridView.Columns> 
                        <telerik:RadGridView.HierarchyChildTemplate> 
                            <DataTemplate> 
                                <StackPanel DataContext="{x:Null}">  
                                    <telerik:RadGridView CanUserReorderColumns="False" Name="gvOrder" 
                                             CanUserFreezeColumns="False" ShowGroupPanel="False" ColumnsWidthMode="Auto" AutoGenerateColumns="False" ItemsSource="{Binding}" 
                                             Loaded="OnChildGridLoaded" FlowDirection="RightToLeft" IsFilteringAllowed="False" ShowColumnHeaders="True" ColumnBackground="AliceBlue" HorizontalContentAlignment="Right" ClipToBounds="True">  
                                        <telerik:RadGridView.Columns> 
                                            <telerik:GridViewDataColumn UniqueName="OrderID" Header="מספר&#13;הזמנה" Width="Auto" /> 
                                            <telerik:GridViewDataColumn UniqueName="OrderName" Header="שם&#13;הזמנה" Width="Auto" /> 
                                            <telerik:GridViewDataColumn UniqueName="OrderTotal" Header="סכום הזמנה &#13;(K ש''ח)" Width="Auto" /> 
                                                                                    </telerik:RadGridView.Columns> 
                                    </telerik:RadGridView> 
                                </StackPanel> 
                            </DataTemplate> 
                        </telerik:RadGridView.HierarchyChildTemplate> 
                    </telerik:RadGridView> 


private void BindDataMainGrid()  
        {  
            try  
            {  
                 
                DataSet dataSet = this.GetData();  
 
                // This is needed to make the grid use the HierarchyChildTemplate  
                GridViewTableDefinition detailDefinition = new GridViewTableDefinition();  
 
                // Tell the detailsDefinition to pull its data from the Details DataTable.  
                detailDefinition.DataSource = dataSet.Tables["Order"].DefaultView;  
 
                // Specify the relation between the two tables, similar to what is done in the DataSet.  
                TableRelation tr = new TableRelation();  
                tr.FieldNames.Add(new FieldDescriptorNamePair("RequestID", "RequestID"));  
                detailDefinition.Relation = tr;  
 
                // Add a GridViewTableDefinition to the grid to make it use the HierarchyChildTemplate  
                // defined in XAML.  
                if (this.gvRequest.TableDefinition.ChildTableDefinitions.Count < 1)  
                    this.gvRequest.TableDefinition.ChildTableDefinitions.Add(detailDefinition);  
 
                // Bind the grid to the "master" table.  
                this.gvRequest.ItemsSource = dataSet.Tables["Request"].DefaultView;  
            }  
            catch  
            {  
                this.gvRequest.ItemsSource = CommonValues.GetDataTabel().DefaultView;  
            }  
        }  
 
        private void OnChildGridLoaded(object sender, RoutedEventArgs e)  
        {  
            // Pull data from the detail table based on the relation.  
            var dataRowView = (DataRowView)((RadGridView)sender).ParentRow.DataContext;  
            var ds = dataRowView.DataView.Table.DataSet;  
            var childData = dataRowView.CreateChildView(ds.Relations["RequestID"]);  
 
            // Manually set the DataContext of the child grid.  
            // We have stopped a wrong DataContext propagating down to this child grid  
            // in the XAML file by wrapping the child grid in a StackPanel and setting  
            // the StackPanel's DataContext to null.  
            ((RadGridView)sender).DataContext = childData;  
 
       }  
 
        private DataSet GetData()  
        {  
            try  
            {  
                DataSet ds = new DataSet();  
                dsRequest dsr = ServiceData.GetRequestAndOrder(0,0,1,2009,0);  
                ds.Tables.Add(dsr.Tables["Request"].Copy());  
                ds.Tables.Add(dsr.Tables["Order"].Copy());  
                ds.Relations.Add("RequestID",  
                ds.Tables["Request"].Columns["RequestID"],  
                ds.Tables["Order"].Columns["RequestID"]);  
                return ds;  
            }  
            catch  
            {  
                return null;  
            }  
 
        } 

 

Thanks

Vlad
Telerik team
 answered on 19 May 2010
0 answers
85 views

We have noticed with your chart control that when we set it so that the point labels are showing it makes the opacity of the series definition read only. Is there a way to disable this behavior or work around it so that we can change the opacity in this case? Currently we turn the opacity to 50% for all other series when the user hover’s the mouse over one of the series items in the legend. If the point labels are on and the opacity locked we are unable to do this. Any help on this matter would be greatly appreciated.

 

Thanks in advance

MacKenzie

MacKenzie Mickelsen
Top achievements
Rank 1
 asked on 18 May 2010
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?