Telerik Forums
UI for WPF Forum
6 answers
121 views
Hi

I am implementing self reference hierarchy and i have used the code below which works fine for default columns.
<telerik:RadGridView x:Name="RadGridView1"
     DataLoading="RadGridView1_DataLoading" RowLoaded="RadGridView1_RowLoaded" GridLinesVisibility="Horizontal" 
    CanUserFreezeColumns="False" IsReadOnly="True" AutoGenerateColumns="False" Margin="10">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn  DataMemberBinding="{Binding TaskId}" />
          
        <telerik:GridViewDataColumn Header="Task Name" DataMemberBinding="{Binding TaskName}" />
        <telerik:GridViewDataColumn Header="Read">
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <CheckBox x:Name="checkBoxRead" IsChecked="{Binding Read}" />
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Header="Write">
            <telerik:GridViewColumn.CellTemplate>
                <DataTemplate>
                    <CheckBox x:Name="checkBoxWrite" IsChecked="{Binding Write}" />
                </DataTemplate>
            </telerik:GridViewColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
    <telerik:RadGridView.FilterDescriptors>
        <telerik:FilterDescriptor Member="ParentTaskId" Operator="IsEqualTo"  Value="0"/>
    </telerik:RadGridView.FilterDescriptors>
    <telerik:RadGridView.ChildTableDefinitions>
        <telerik:GridViewTableDefinition>
            <telerik:GridViewTableDefinition.Relation >
                <telerik:TableRelation IsSelfReference="True"     >
                    <telerik:TableRelation.FieldNames>
                        <telerik:FieldDescriptorNamePair  
                            ParentFieldDescriptorName="TaskId" 
                            ChildFieldDescriptorName="ParentTaskId" />
                    </telerik:TableRelation.FieldNames>
                </telerik:TableRelation>
            </telerik:GridViewTableDefinition.Relation>
        </telerik:GridViewTableDefinition>
    </telerik:RadGridView.ChildTableDefinitions>
      
</telerik:RadGridView>

I have a problem when I add dynamic columns columns are showing at rool level but does not get added at child node level. If you notice in the screenshot RolePermissions[0], RolePermissions[1], RolePermissions[2] are dynamic columns. I have attached the screenshot. Is there a simple way to fix it please suggest.

Regards
Kiran


Kiran
Top achievements
Rank 1
 answered on 07 Sep 2010
1 answer
29 views
Hi!

I've a RadGridView, I wish to set some field to a default value when I create it.

I can't find the good event for this. 

Example:

I click on the Add new item of the RadGridView
An event intercept this action
--> I change some field
Life continue ;)

I'm sure this is made very easily but I can't find how :(
Veselin Vasilev
Telerik team
 answered on 07 Sep 2010
2 answers
113 views

Hello,

I have a GridView with a HierarchyChildTemplate with two datatriggers :

01.<telerik:RadGridView.HierarchyChildTemplate>
02.    <DataTemplate>
03.        <DockPanel>
04.            .......
05.        </DockPanel>
06.        <DataTemplate.Triggers>
07.            <DataTrigger Binding="{Binding Name}" Value="Value1">
08.                <Setter TargetName="Border1" Property="Visibility" Value="Visible" />
09.            </DataTrigger>
10.            <DataTrigger Binding="{Binding Name}" Value="Value2">
11.                <Setter TargetName="Border2" Property="Visibility" Value="Visible" />
12.            </DataTrigger>
13.        </DataTemplate.Triggers>
14.    </DataTemplate>
15.</telerik:RadGridView.HierarchyChildTemplate>

With Rad Controls WPF 2010 Q1 triggers work fine.

With Rad Controls WPF 2010 Q2 (or Q2 SP1) triggers don't work (If I use a converter in the binding and put a breakpoint in the converter the breakpoint is never reached).

The only change is the version of Rad Controls.

Could you help me ?

Thanks in advance.

Patrick

Patrick VADEL
Top achievements
Rank 1
 answered on 07 Sep 2010
1 answer
180 views
Hi,

I am facing a problem with the GridViewComboBoxColumn.  I have a view set up with a RadGridView using three columns, one of which is a ComboBoxColumn.  The ComboBoxColumn is bound to an ObservableCollection which consists of 9 "Service" items.  The combobox is updating correctly and containing the proper items, and all of the databindings I'm using (using the MVVM model) are working correctly.

The situation is as such.  When I click on the "Click here to add new item" row, and it generates the item to add, the combobox initially has a blank value selected (and it shows blank).  If I click on the combobox, I see all 9 items as options, and there is no blank option to select.  However, if I just click on another cell, the combobox selection stays blank.  If I select one of the specific items in the combobox, then it will update to the item I selected and I will not be able to change it back to a blank value.

The problem I face is this.  I don't want the user to be able to leave that combobox item blank.  I'd prefer, when I initially click the "Click here to add new item" indicator, for the combobox to automatically default to the first item in its list and to display accordingly.  Alternatively, I'd like to configure it to not allow you to add the new row unless a specific item is selected in the combobox.  I haven't been able to find the appropriate properties or methods to call to accomplish there.  Does anyone know how I can set this up?

Thank you,
Jason
Maya
Telerik team
 answered on 07 Sep 2010
11 answers
252 views
I am using RadControls for WPF build 2010.1.416.35. I have a radchart and define the SeriesMappings in XAML and when it tries to render the XAML below in VS2008 or Blend 3 I get the error "Invalid property or field - 'TimeStamp' for type: Double" in design view.
<telerik:RadChart x:Name="hydroChart" Margin="8,34,0,0" ItemsSource="{Binding DataPoints, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Top" 
                          telerik:Theming.Theme="Summer">  
            <telerik:PointMark Size="1">  
                  
            </telerik:PointMark> 
            <telerik:RadChart.SamplingSettings> 
                <telerik:SamplingSettings SamplingFunction="KeepExtremes" SamplingThreshold="50"/>  
            </telerik:RadChart.SamplingSettings> 
            <telerik:RadChart.AnimationSettings> 
                <telerikChart:AnimationSettings ItemAnimationDuration="00:00:00" ItemDelay="00:00:00" DefaultSeriesDelay="00:00:00"/>  
            </telerik:RadChart.AnimationSettings> 
            <telerik:RadChart.DefaultView> 
                <telerik:ChartDefaultView>                    
                    <telerik:ChartDefaultView.ChartArea> 
                        <telerik:ChartArea NoDataString="No Data....." LegendName="chartLegend">  
                            <telerikChart:ChartArea.AdditionalYAxes> 
                                <telerikChart:AxisY AutoRange="False" AxisName="TEMPER" DefaultLabelFormat="#VAL F" MaxValue="110" MinValue="50" Step="20" Title="Temperature in F"/>  
                            </telerikChart:ChartArea.AdditionalYAxes> 
                            <telerikChart:ChartArea.AxisY> 
                                <telerikChart:AxisY AutoRange="False" MinValue="0" MaxValue="25000" Step="1000" Title="PSI" AxisName="PSI"/>  
                            </telerikChart:ChartArea.AxisY> 
                            <telerik:ChartArea.AxisX> 
                                <telerik:AxisX LabelRotationAngle="90" LabelStep="2" Title="Time" IsDateTime="True" DefaultLabelFormat="#VAL{hh:mm:ss}"/>  
                            </telerik:ChartArea.AxisX>                              
                        </telerik:ChartArea>                                
                    </telerik:ChartDefaultView.ChartArea>                      
                    <telerik:ChartDefaultView.ChartLegend> 
                        <telerik:ChartLegend x:Name="chartLegend" Header="In-Process Hydro" UseAutoGeneratedItems="True" ></telerik:ChartLegend> 
                    </telerik:ChartDefaultView.ChartLegend> 
                </telerik:ChartDefaultView> 
            </telerik:RadChart.DefaultView> 
            <telerik:RadChart.SeriesMappings> 
                <telerik:SeriesMappingCollection> 
                    <telerik:SeriesMapping LegendLabel="Inlet PSI">   
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}">  
                                  
                            </telerik:LineSeriesDefinition> 
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="InletPressure"  /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Outlet PSI">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="PSI" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="OutletPressure" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping>      
                    <telerik:SeriesMapping LegendLabel="Ambient Temp">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewAmbientTemp" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp In">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempIn" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                    <telerik:SeriesMapping LegendLabel="Fluid Temp Out">  
                        <telerik:SeriesMapping.SeriesDefinition> 
                            <telerik:LineSeriesDefinition AxisName="TEMPER" ShowItemLabels="False" ShowItemToolTips="True" 
                                                          PointMarkItemStyle="{StaticResource PointMarkStyle}"/>  
                        </telerik:SeriesMapping.SeriesDefinition> 
                        <telerik:SeriesMapping.ItemMappings> 
                            <telerik:ItemMapping DataPointMember="XValue" FieldName="TimeStamp" FieldType="sys:DateTime"/>  
                            <telerik:ItemMapping DataPointMember="YValue" FieldName="NewFluidTempOut" /> 
                        </telerik:SeriesMapping.ItemMappings> 
                    </telerik:SeriesMapping> 
                </telerik:SeriesMappingCollection> 
            </telerik:RadChart.SeriesMappings> 
            <telerik:RadChart.DefaultSeriesDefinition> 
                <telerik:LineSeriesDefinition LegendDisplayMode="SeriesLabel" ShowItemLabels="False" ShowItemToolTips="True"/>  
            </telerik:RadChart.DefaultSeriesDefinition> 
        </telerik:RadChart> 

But when I only have 1 SeriesMapping everything works as expected. Is this a known bug, or am I missing something?

 Everything compiles fine, and when I run the program it renders properly. Any help is appreciated.

Thanks,
Ryan
Velin
Telerik team
 answered on 07 Sep 2010
3 answers
166 views

Hi,

I’m calling an asynchronous WCF service and adding the items into the RadComboBox.  I would like to call the same service as I am typing in the RadComboBox (text passed as a parameter to the service) and auto fill and display the results. Please advise.

Thanks
RJ

Konstantina
Telerik team
 answered on 07 Sep 2010
3 answers
222 views

Hello

In this point the  property  ValidatesOnDataErrors  available in SL only

When this will be available for WPF?

Best regards

Ehud

Nedyalko Nikolov
Telerik team
 answered on 07 Sep 2010
1 answer
235 views
Hello,

I have a little problem with editing value when ValueFormat is set to Percent. When control has no focus, the value I see is "250 %". When I focus the control to edit value, the value of control change to "2.5". Can the edited value be "250 %" instead of "2.5" ?

The control is set something like that: 

<telerik:RadNumericUpDown Value="{Binding Rate, Mode=TwoWay}" ValueFormat="Percentage" LargeChange="0.2" SmallChange="0.1">
<telerik:RadNumericUpDown.NumberFormatInfo>
<sysGlob:NumberFormatInfo PercentDecimalDigits="0"/>
</telerik:RadNumericUpDown.NumberFormatInfo>
</telerik:RadNumericUpDown>

 

 

 

 


Thanks in advance.

David
Boyan
Telerik team
 answered on 07 Sep 2010
1 answer
115 views
Hi,

This is probably some flag I am missing. But the behavior I see is:
When I select a child node in my tree view, the contents on the treeview shift to the left so that the left edge of the selected child item is a few pixels from the treeview edge. This causes the treeview to be partially obscured (till the selector arrow thing of the parent item has been shifted out of view.)

Oh and it stops doing that if I set my root node to have a set width that is less than the width of my treeview. But I dont want to do it since I do not know how big the nodes will be.

Any idea what I am doing wrong?

thanks,
JK
Hristo
Telerik team
 answered on 07 Sep 2010
4 answers
152 views
Hello I have a problem with RadCarousel, at runtime you can not add items to the carousel OpenDialog because when I connect my ItemSource with images not see it, I realized that if the images are not shown in project resources can not be seen ...
What I have to do to see the images that are not in the resources folder?

DataTemplate?

C # code?

thank you very much, sorry for my english

 

   
  
public partial class Window1 : Window 
    {
        List<Image> lista; 
        private const String Extension = "(*.jpg)|*.jpg|(*.png)|*.png"
  
        public Window1() 
        {
            InitializeComponent();
            lista = new List<Image>();
            Microsoft.Win32.OpenFileDialog dialog ;
         }
  
        private void button1_Click(object sender, RoutedEventArgs e) 
            {
  
                lista.Clear();
                dialog = new Microsoft.Win32.OpenFileDialog { RestoreDirectory = true, Filter = Extension, Multiselect = true }; 
            
       if (dialog.ShowDialog() == true
                    {
                         foreach (string Name in dialog.FileNames) 
                 {
                        Image Im = new Image()
                Im.Source = new BitmapImage(new Uri(fName, UriKind.Relative)); 
                         lista.Add(Im);
  
                }
  
            this.radCarousel1.ItemsSource = lista; 
   
            }
  
        }
  
    }
  
}

Vic
Top achievements
Rank 1
 answered on 06 Sep 2010
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?