Telerik Forums
UI for WPF Forum
1 answer
80 views
Here is a Chart I'm working on: 

<Telerik:RadChart Height="750" x:Name="WeightsChart" Width="1400">
    <Telerik:RadChart.DefaultView>
        <Telerik:ChartDefaultView>
            <Telerik:ChartDefaultView.ChartTitle>
                <Telerik:ChartTitle Content="Catia Part and Assembly Weights" HorizontalAlignment="Center"/>
            </Telerik:ChartDefaultView.ChartTitle>
            <Telerik:ChartDefaultView.ChartLegend>
                <Telerik:ChartLegend Visibility="Collapsed"/>
            </Telerik:ChartDefaultView.ChartLegend>
            <Telerik:ChartDefaultView.ChartArea>
                <Telerik:ChartArea>
                    <Telerik:ChartArea.AxisX>
                        <Telerik:AxisX LabelRotationAngle="90"/>
                    </Telerik:ChartArea.AxisX>
                </Telerik:ChartArea>
            </Telerik:ChartDefaultView.ChartArea>
        </Telerik:ChartDefaultView>
    </Telerik:RadChart.DefaultView>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <Telerik:ChartArea x:Name="BarChart" NoDataString="No Bar Series Data"/>
        <Telerik:ChartArea x:Name="LineChart" Grid.Row="1" NoDataString="No Line Series Data"/>
    </Grid>
    <Telerik:RadChart.HierarchicalViewDescriptors>
        <!--Bar Chart Descriptors-->
        <Telerik:ChartHierarchicalViewDescriptor>
            <Telerik:ChartHierarchicalViewDescriptor.SeriesMappings>
                <Telerik:SeriesMapping LegendLabel="Weights" ChartAreaName="BarChart">
                    <Telerik:SeriesMapping.SeriesDefinition>
                        <Telerik:BarSeriesDefinition LegendDisplayMode="None"
                                                 ItemStyle="{StaticResource BarStyle}"
                                                 SeriesItemLabelStyle="{StaticResource LabelStyle}">
                        </Telerik:BarSeriesDefinition>
                    </Telerik:SeriesMapping.SeriesDefinition>
                    <Telerik:SeriesMapping.ItemMappings>
                        <Telerik:ItemMapping FieldName="Weight" DataPointMember="YValue"/>
                        <Telerik:ItemMapping FieldName="InstanceNumber" DataPointMember="XCategory"/>
                    </Telerik:SeriesMapping.ItemMappings>
                </Telerik:SeriesMapping>
            </Telerik:ChartHierarchicalViewDescriptor.SeriesMappings>
        </Telerik:ChartHierarchicalViewDescriptor>
        <Telerik:ChartHierarchicalViewDescriptor>
            <Telerik:ChartHierarchicalViewDescriptor.Relation>
                <Telerik:PropertyRelation ParentPropertyName="Children"/>
            </Telerik:ChartHierarchicalViewDescriptor.Relation>
            <Telerik:ChartHierarchicalViewDescriptor.SeriesMappings>
                <Telerik:SeriesMapping LegendLabel="Weights" ChartAreaName="BarChart">
                    <Telerik:SeriesMapping.SeriesDefinition>
                        <Telerik:BarSeriesDefinition LegendDisplayMode="None"
                                                 ItemStyle="{StaticResource BarStyle}"
                                                 SeriesItemLabelStyle="{StaticResource LabelStyle}"/>
                    </Telerik:SeriesMapping.SeriesDefinition>
                    <Telerik:SeriesMapping.ItemMappings>
                        <Telerik:ItemMapping FieldName="Weight" DataPointMember="YValue"/>
                        <Telerik:ItemMapping FieldName="InstanceNumber" DataPointMember="XCategory"/>
                    </Telerik:SeriesMapping.ItemMappings>
                </Telerik:SeriesMapping>
            </Telerik:ChartHierarchicalViewDescriptor.SeriesMappings>
        </Telerik:ChartHierarchicalViewDescriptor>
        <Telerik:ChartHierarchicalViewDescriptor>
            <Telerik:ChartHierarchicalViewDescriptor.Relation>
                <Telerik:PropertyRelation ParentPropertyName="Children"/>
            </Telerik:ChartHierarchicalViewDescriptor.Relation>
            <Telerik:ChartHierarchicalViewDescriptor.SeriesMappings>
                <Telerik:SeriesMapping LegendLabel="Weights" ChartArea="BarChart">
                    <Telerik:SeriesMapping.SeriesDefinition>
                        <Telerik:BarSeriesDefinition LegendDisplayMode="None" />
                    </Telerik:SeriesMapping.SeriesDefinition>
                    <Telerik:SeriesMapping.ItemMappings>
                        <Telerik:ItemMapping FieldName="Weight" DataPointMember="YValue"/>
                        <Telerik:ItemMapping FieldName="InstanceNumber" DataPointMember="XCategory"/>
                    </Telerik:SeriesMapping.ItemMappings>
                </Telerik:SeriesMapping>
            </Telerik:ChartHierarchicalViewDescriptor.SeriesMappings>
        </Telerik:ChartHierarchicalViewDescriptor>
    </Telerik:RadChart.HierarchicalViewDescriptors>
</Telerik:RadChart>

As you can see, I'm getting a mystery series in the center of my grid. How do I get rid of it? I'm having a lot of trouble setting up these charts.
Evgenia
Telerik team
 answered on 12 Nov 2011
3 answers
145 views
Hi,

I use "{}{0:M/dd/yyyy}" but it's not working. I'm doing this in the codes because we have to display columns dynamically. What's happening here?

Twistur
Top achievements
Rank 1
 answered on 11 Nov 2011
2 answers
120 views
I am working with a C# application that is connecting to a web service in the code behind on a Click event of a button doing a search...say for customers and their orders. The data comes to the app. as XML but is Deserialize into a List<OfAClass>. The parent grid is utilizing one data source (Customers) and the child utilizes another(Orders). I have been looking at samples but do not get how to tie the two grids together. Is this done in the DataLoading event? In the examples the child grid does not seem to get an ItemSource. How do I tell the child grid where to get its data(Orders)? And How do I tie the two datasources together?

Any codes samples would be greatly appreciated.

Thanks ~ Doug
Doug
Top achievements
Rank 1
 answered on 11 Nov 2011
5 answers
461 views
Hi,
I am using the 2011 SP 1 release and it does not support the 'IsSynchronizedWithCurrentItem' property. The thread entitled  'Collections of Collections and row select ' from January 2010 states that it would be available in the 2010 Q1 release but this does not appear to have happened. It would be nice if you could reinvestigate this issue because if it was ever implemented then it now seems to be broken. Thanks,
Pete
Roland
Top achievements
Rank 1
 answered on 11 Nov 2011
5 answers
146 views
We have a very large data set, which users can group by a few different columns depending on how they want to see the data. When grouped, there are 3 aggregrates: Count, Sum, and Average. Is there a way to allow the users to sort by these aggregates without pre-defining the groups?

I looked at a few samples I found on your forums for sorting by an aggregate, but they all sorted based on a pre-defined Group, and once you changed the Group, the sorting stopped working.
LHR
Top achievements
Rank 1
 answered on 11 Nov 2011
2 answers
157 views
We are using version 2010.2.924.40 of the WPF RadGridView. On a grid, I have ONE editable column, and 6 readonly columns. Rows for this grid are created through code and user cannot enter rows. They can only edit the one column of each row. As a user edits the singe editable column and hits TAB, the focus shifts to the next row, into the editable column...as expected.

However, if the user FILTERS one or more of the readonly columns, then edits the row/editable column and hits TAB, the focus does not shift to the next row. I can't determine where focus shifts to.

Do you have a fix or solution for this?

Michael
Michael
Top achievements
Rank 1
 answered on 11 Nov 2011
5 answers
118 views
I'm trying to enable tabs reordering, but it works only when items are set in xaml.

This works:
<t:RadTabControl AllowDragReorder="True" x:Name="radTabControl1">
    <t:RadTabItem Header="item1" />
    <t:RadTabItem Header="item2" />
    <t:RadTabItem Header="item3" />
</t:RadTabControl>

And this don't
<t:RadTabControl AllowDragReorder="True" x:Name="radTabControl1" ItemsSource="{Binding list}" />


How to make this work with binding?
Petar Mladenov
Telerik team
 answered on 11 Nov 2011
1 answer
281 views
I have a Data Form and a Grid. What I am doing is that every time we move forward or backwards in the Data Form, the Grid gets updated, sometimes by manually setting the current item in the Data Form and consequently updating the Grid based on an ID key.

Example #1:

Adding a new record to the Data Form. I use the Edit Ended event to Save the changes via EF. This works fine. After saving I am setting the Data Form current item to the newly created record. In my case, this means updating the Data Form (re-loading all values from the database), doing a look up and updating the Data Form current item and finally updating the Grid.

This is not working for me. Re-loading the Data Form works but setting the Data Form current item is not working

Example #2:

After I enter a new Data Form item, EF returns back an error on dups. (based on PK), which is perfect. Since the item exists, I want to position the Data Form on that record by manually setting the current item, but this is not working either.

When I say that it does not work, I mean that after I do the following on the EditEnded event:

this.dataForm.CurrentItem = [Do a look up based on PK and return object]

The Current Item Changed event fires (which is expected) and there I update the Grid, but at this point is where dataForm.CurrentItem is null preventing me from updating the Grid

Ideas/comments are appreciated.

Thanks, M
Ivan Ivanov
Telerik team
 answered on 11 Nov 2011
5 answers
423 views

How do you make the Header Row height autosize or even manually set it, when using Word Wrap and forcing the Header to wrap to 2 lines.
Below is a sample of the XAML, just one column that has wrap enabled. It looks correct in .NET VS2008 designer, but when running it the height of the header row is not tall enough and the 2nd line of text is cut in half.

I've looked on the forums and see some examples, but they seem very difficult to implement using a Resouce.xaml file. It seems like it should be more straightforward.

Thanks ... Chad

<Telerik:RadGridView SelectionMode="Single"                                                 
                     CanUserDeleteRows="False"
                     CanUserSortColumns="True"                                                 
                     AutoGenerateColumns="False"
                     IsFilteringAllowed="False"
                     CanUserReorderColumns="False"
                     RowDetailsVisibilityMode="VisibleWhenSelected"
                     Telerik:StyleManager.Theme="Office_Blue"
                     ShowGroupPanel="False"
                       
                     ItemsSource="{Binding Path=GetData,Mode=TwoWay}"
                     IsReadOnly="False" >
    <Telerik:RadGridView.Columns>
          
          
        <Telerik:GridViewDataColumn IsReadOnly="True"
                                    Width="90" UniqueName="Level1GuaranteedPercent" >
            <Telerik:GridViewDataColumn.DataMemberBinding>
                <Binding Path="Level1GuaranteedPercent">
                </Binding>
            </Telerik:GridViewDataColumn.DataMemberBinding>
            <Telerik:GridViewColumn.Header>
                <TextBlock Text="Level 1 Past Purchase %" TextWrapping="Wrap" />
            </Telerik:GridViewColumn.Header>
        </Telerik:GridViewDataColumn>
    </Telerik:RadGridView.Columns>
</Telerik:RadGridView>
Vanya Pavlova
Telerik team
 answered on 11 Nov 2011
0 answers
131 views
Hi,
I am facing problem regarding load the image dynamically in GridViewDataColumn.
The follwoing is my code

<telerik:GridViewDataColumn Header="" UniqueName="colBilling">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=BBilling}" Value="True">
<DataTrigger.Setters>
<Setter TargetName="telerik:GridViewDataColumn" Value="/Images/Project.png"/>
<!--<Image Source="/Images/Project.png" Height="20" Width="20" HorizontalAlignment="Center" VerticalAlignment="Center" />-->
</DataTrigger.Setters>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

my requirement is while loading data in to gridview  when BBilling value is true(1 or 0) then I need to show Image.Other wise leave empty cell.How to set setter property.

Thanks and Regrds
Naresh Mesineni

naresh
Top achievements
Rank 1
 asked on 11 Nov 2011
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?