Telerik Forums
UI for WPF Forum
0 answers
79 views
Hi Support

I have two ItemPropertDefinition Which binded to two different combo box, I want to filter ItemSource of second one according to Selected Item of first Combo. is it possible  in DataFilter? how can I implement it?

Thanks in advance
Mehri
Mehri
Top achievements
Rank 1
 asked on 28 Sep 2011
1 answer
57 views
Hi,

I have a table like the below

ID   Name          Parent ID
1    Benefits        NULL
2    Enrolment     NULL
3    Health             1
4    Employee       1
5    Initial               2

and i need the output like

-Benefits
      - Health
      - Employee
- Enrolment
      - Initial

Now I am getting the hierachy correctly, but instead of showing only the parents my grid shows all the 5 rows. Any idea please.

Thanks,
Ramasamy
Ramasamy
Top achievements
Rank 1
 answered on 28 Sep 2011
1 answer
125 views
Hi,

I am using the CommonHeaders stuff for the multiple column headers. 

 

<i:Interaction.Behaviors>
<local:ColumnGroupsBehavior>
<local:ColumnGroupsBehavior.CommonHeaders>
<local1:CommonHeader StartColumnIndex="0" Caption="" ColumnSpan="3" />
<
/local:ColumnGroupsBehavior.CommonHeaders>
</local:ColumnGroupsBehavior>
</i:Interaction.Behaviors>

My common headers are dynamic and need set in code behind. How it can be achieved at runtime.

Thanks,
Ramasamy

Ramasamy
Top achievements
Rank 1
 answered on 28 Sep 2011
3 answers
134 views
Hi,

I am new to WPF and Telerik controls.  I have been through the online documentation, the RadControls Demos that install with the controls, various forums and reference material including the telerik forums.  I have tried several pieces of code and I can't get the TwoWay binding to work.  I can achieve what I want to do with CodeBehind but that is sort of defeating the purpose.

So I have a RadGridView that is populated by a dataset.  I do this by the code below. rgvSamples is the RadGridView.  dsMain is a dataset.

rgvSamples.ItemsSource = dsMain.Tables["Samples"];

In XAML I then set the various DataContext and Bindings as seen below.

<StackPanel Height="357" HorizontalAlignment="Left" Margin="736,25,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="211">
            <Grid Height="51" Name="grid1" Width="212" DataContext="{Binding ElementName=rgvSamples, Path=SelectedItem}">
                <TextBox Height="23" HorizontalAlignment="Left" Margin="55,6,0,0" x:Name="textBox1" VerticalAlignment="Top" Width="143" Text="{Binding Path=CodeStr, Mode=TwoWay}"/>
                <Label Content="Label" Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" Name="label1" VerticalAlignment="Top" Width="43" />
            </Grid>
        </StackPanel>

The above code above does not actually work even though it is almost identical to some of the solutions posted on this forum.  I also have a standalone Textbox as seen in the code below which also does not work.

<TextBox Height="36" HorizontalAlignment="Left" Margin="580,145,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" Text="{Binding ElementName=rgvSamples, Path=SelectedItem.CodeStr}"/>

Now by making the following changes I get the first value in the GridView to show but that is it.  If I select a different row then the value in the textbox does not change.

rgvSamples.ItemsSource = dsMain.Tables["Samples"];
            stackPanel1.DataContext = rgvSamples.ItemsSource;

<StackPanel Height="357" HorizontalAlignment="Left" Margin="736,25,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="211">
            <Grid Height="51" Name="grid1" Width="212" DataContext="{Binding CurrentItem}">
                <TextBox Height="23" HorizontalAlignment="Left" Margin="55,6,0,0" x:Name="textBox1" VerticalAlignment="Top" Width="143" Text="{Binding CodeStr, Mode=TwoWay}"/>
                <Label Content="Label" Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" Name="label1" VerticalAlignment="Top" Width="43" />
            </Grid>
        </StackPanel>

So I have been going through forum posts etc for about 3 days now trying to see what i am doing wrong.  can some one please point me in the correct direction.

Thanx
Kind Regards
Richard
Dimitrina
Telerik team
 answered on 27 Sep 2011
1 answer
133 views
In short I've been unable to modify the style settings for the gridview row reorder example.
The demo example can not locate the style settings. I've been messing around and narrowed it down that this line of code does not expose the gridview namespace because the RowStyle property would state "Cannot resolve path."

Question:
How would I be able to modify the top and bottom lines of the DraggedTemplate?
From:
Line 1: Customer: Bob (Orange background)
Line 2: Drop after Customer: James

To:
Line1: Method 21 (Blue Background)
Line2: Drop after Sequence Run 30


I included this to expose the GridViewRow

xmlns:gd="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"

For x:Key="DraggedRowStyle

<Grid.Resources>
            <Style TargetType="gd:GridViewRow" x:Key="DraggedRowStyle">
                <Setter Property="dragAndDrop:RadDragAndDropManager.AllowDrag" Value="True" />
            </Style>
            <Style TargetType="treeView:TreeViewDragCue" x:Key="CueStyle">
                <Setter Property="DragTooltipVisibility" Value="Collapsed"/>
            </Style>
            <DataTemplate x:Key="DraggedItemTemplate">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding Sender}" FontWeight="Bold" />
                    <TextBlock Text=", (" Foreground="Gray" />
                    <TextBlock Text="{Binding Subject}" Foreground="Gray" />
                    <TextBlock Text=")" Foreground="Gray" />
                </StackPanel>
            </DataTemplate>
            <LinearGradientBrush x:Key="DropPossibleBackground" StartPoint="0 0" EndPoint="0 1">
                <GradientStop Offset="0" Color="White" />
                <GradientStop Offset="1" Color="#FFE699" />
            </LinearGradientBrush>
            <DataTemplate x:Key="testTemplate1">
                <Border Width="50" Height="50" Background="Red">
                </Border>
            </DataTemplate>
            <DataTemplate x:Key="testTemplate2">
                <Border Width="50" Height="50" Background="Green">
                </Border>
            </DataTemplate>
        </Grid.Resources>

Here is my gridview

<telerik:RadGridView HorizontalAlignment="Stretch" Name="RadGridView1"
                     VerticalAlignment="Stretch" AutoGenerateColumns="False"
                     CanUserFreezeColumns="False" CanUserReorderColumns="False"
                     ShowColumnHeaders="True" ShowGroupPanel="False" ShowInsertRow="True"
                     DataContext="{Binding Source={StaticResource SequenceCollectionData}}"
                     dragAndDrop:RadDragAndDropManager.AllowDrop="True" RowStyle="{StaticResource DraggedRowStyle}">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Sample Name" UniqueName="gvcSample" IsGroupable="False"
                                    IsReorderable="False" DataMemberBinding="{Binding Path=SampleName}" />
        <telerik:GridViewDataColumn Header="ID" UniqueName="gvcGuidID" IsGroupable="False"
                                    IsReorderable="False" DataMemberBinding="{Binding Path=GuidID}"
                                    IsReadOnly="True"/>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Restating Question: How would I be able to modify the top and bottom lines of the DraggedTemplate?
From:
Line 1: Customer: Bob
Line 2: Drop after Customer: James

To:
Line1: Method 21
Line2: Drop after Sequence Run 30

Thank you,
Dimitrina
Telerik team
 answered on 27 Sep 2011
1 answer
161 views
I have an issue with detecting floating panes being closed.

On our dock manager we use both PaneStateChange and ActivePaneChanged to try to track which panes in the dock mgr are visible and give the user visual options to show and hide panes.

When a pane is floating and they click the close button, sometimes the ActivePaneChanged event will fire and sometimes it doesn't leaving our pane visual switchboard incorrect.

What would be the sure way to detect floating panes being closed?

Preferrably a trigger from the dock manager because some of our panes are dynamically generated at runtime and I would rather not have triggers attached to every possible pane for this purpose.
Konstantina
Telerik team
 answered on 27 Sep 2011
1 answer
110 views
Hello,

I notice in the release notes for the Q2 2011 SP1 there is nothing mentioned concerning the Image Editor UI control. It was mentioned in another thread that the Q2 2011 SP1 release would contain improvements to the control, but I went ahead and installed the update just to be sure and I didn't notice any changes to the customizability of the control.

Is there a chance I might be overlooking these changes, or should we look forward to the next release for improvements to the Image Editor UI control? Just thought I'd ask.

Thank you for your time,
Kyle
Boby
Telerik team
 answered on 27 Sep 2011
1 answer
125 views
hi,

I am using an Chart with more then one Y-Axis ( multiple data on chart).
I want the user to choose what data to see ( bij checking checkboxes).
When toggling a checkbox the correspondent  Data-Series and Y-Axis should be collapsed ( invisible) .
This works for all the DataSeries,
This works fine for the Main Y-Axis, but does not work for the 'Additional Axis' ) ->

Cannot find governing FrameworkElement or FrameworkContentElement for target element.

code :
 

<telerik:RadChart.DefaultView>
                           <telerik:ChartDefaultView ChartLegendPosition="Top">
                               <telerik:ChartDefaultView.ChartArea>
                                   <telerik:ChartArea x:Name="chartarea" Padding="5,10,20,5" LegendName="legend">
                                       <telerik:ChartArea.AxisX>
                                           <telerik:AxisX DefaultLabelFormat="ddd dd.MM"/>
                                       </telerik:ChartArea.AxisX>
                                       <telerik:ChartArea.AxisY>
                                           <!--<telerik:AxisY Title="Temperatuur (°C)" AxisName="Temperatuur" MinValue="34" MaxValue="44" ExtendDirection="Smart"/>-->
                                           <telerik:AxisY Title="Temperatuur (°C)" AxisName="Temperatuur" MinValue="0" MaxValue="80" Step="10" ExtendDirection="Smart"
                                               Visibility="{Binding Path=IsChecked,ElementName=checkboxViewSeriesTemp, Converter={StaticResource _BooleanToVisibilityYAxisConverter}}">
                                               <telerik:AxisY.AxisStyles>
                                                   <telerik:AxisStyles AxisLineStyle="{StaticResource AxisLineStyleTemp}"
                                                               TickLineStyle="{StaticResource MajorTickLineStyleTemp}"
                                                               MinorTickLineStyle="{StaticResource MinorTickLineStyleTemp}"
                                                               ItemLabelStyle="{StaticResource CustomLabelTemp}"/>
                                               </telerik:AxisY.AxisStyles>
                                           </telerik:AxisY>
                                       </telerik:ChartArea.AxisY>
                                       <telerik:ChartArea.AdditionalYAxes>
                                           <telerik:AxisY  AxisName="Gewicht" Title="Gewicht (Kg)" MinValue="0" MaxValue="200" Step="5" ExtendDirection="Smart"
                                               Visibility="{Binding Path=IsChecked,ElementName=checkboxViewSeriesTemp, Converter={StaticResource _BooleanToVisibilityYAxisConverter}}">                                                
                                               <telerik:AxisY.AxisStyles>
                                                   <telerik:AxisStyles AxisLineStyle="{StaticResource AxisLineStyleGewicht}"
                                                               TickLineStyle="{StaticResource MajorTickLineStyleGewicht}"
                                                               MinorTickLineStyle="{StaticResource MinorTickLineStyleGewicht}"
                                                               ItemLabelStyle="{StaticResource CustomLabelGewicht}"/>
                                               </telerik:AxisY.AxisStyles>
                                           </telerik:AxisY>
                                           <telerik:AxisY  AxisName="Pijn" Title="Pijn (Vas)" MinValue="0" MaxValue="10" Step="1" ExtendDirection="Smart"
                                               Visibility="{Binding Path=IsChecked,ElementName=checkboxViewSeriesPijn, Converter={StaticResource _BooleanToVisibilityYAxisConverter}}">
                                               <telerik:AxisY.AxisStyles>
                                                   <telerik:AxisStyles AxisLineStyle="{StaticResource AxisLineStylePijn}"
                                                                   TickLineStyle="{StaticResource MajorTickLineStylePijn}"
                                                                   MinorTickLineStyle="{StaticResource MinorTickLineStylePijn}"
                                                                   ItemLabelStyle="{StaticResource CustomLabelPijn}"/>
                                               </telerik:AxisY.AxisStyles>
                                           </telerik:AxisY>
Yavor
Telerik team
 answered on 27 Sep 2011
1 answer
80 views
Hello everybody!
I've questions to you and specially Telerik's developers.

1. We changed library from full version Q1 (2011.1.0419.35) to full version Q2 (2011.2.0712.35). Both versions are full and were bought (not any trials).
After this change very important functionality for us - dragging / moving on map after click right button mouse - don't work.
We use Visual Studio 2010 and Team Foundation Server for software development. Our project is made in WPF(C#). 
Any old libraries (Q1) were replaced on new Q2 version (in TFS and local machines).

Interestingly if I make simple project in WPF and use this radmap Q2 version (without any TFS connection) this moving maps functionality works.
What should we do? any idea????

2. We changed Q1 to Q2, because new version has new functionality available by SqlGeospatialDataReader, and .... here is another problem namely: SqlGeospatial gets good data and don't display any polygon or points on informationlayer. Example code is shown below:

xaml:
................
           <telerik:InformationLayer x:Name="layer1" Visibility="Visible">
                <telerik:InformationLayer.Reader>
                    <telerik:SqlGeospatialDataReader x:Name="sqlGeospatialDataReader">
                        
                    </telerik:SqlGeospatialDataReader>
                </telerik:InformationLayer.Reader>
            </telerik:InformationLayer>
.................


code behind:
............
           DBContext.DataClasses1DataContext db = new DBContext.DataClasses1DataContext();

           List<string> mylist = new List<string>();

     


           foreach (var element in db.usp_GetRegions().ToList())
           {
              
               mylist.Add(element.WKT);
              
           }
           sqlGeospatialDataReader.Source = mylist;

at sqlGeospatialDataReader.Source = mylist, the SqGeoSpatialDataReader.Source gets complete list of WKT's as strings. This code has debugged and contains correct data required by SqlGeoSpatialDataReader (I think so :-)). 
usp_GetRegions() is stored procedure that gets data from SQL Server and works fine (return correct format of data).


Can you give (link example or some other) me any example of use this class in codebehind. I tried "List<IEnumerable> mylist" and don't work also.

I will be grateful for help.
Pablo


Andrey
Telerik team
 answered on 27 Sep 2011
1 answer
143 views
Hi,

How can I set the color for the additional y axis so that is same than series color (which uses that y axis)?

In my WPF project chart can include several series and user can change the series color during runtime so I need to set same color to the yaxis also.

I'm using 2011.2.712.40 version of WPF  RadChart

Regards,
Auvo
Evgenia
Telerik team
 answered on 27 Sep 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?