Telerik Forums
UI for WPF Forum
7 answers
227 views

Hello,

 

I want to modify the icon that will be showed when a row in RadGridView is not valid. I found topics in yours forum, but just for WinForms, and the used event is not exists in WPF.

For WinForms, the ViewCellFormatting event is used, but I don't find the equivalent event for WPF.

 

Can you help me ?

 

Thank you.

Vladimir Stoyanov
Telerik team
 answered on 06 Nov 2017
9 answers
970 views
How do I hide the current row highlight of a grid?
Stefan
Telerik team
 answered on 06 Nov 2017
3 answers
134 views

I have several GridViews on my interface and then on one it has a ChildTableDefinition.  I am trying to have the TAB key insert a row if pressed on the end of the last line on each GridView.  I have followed the instructions and created the KeyboardCommandProvider that overrides the ProvideCommandsForKey method. I have then wired up the KeyboardCommandProvider in the code behind

myGrid1.KeyboardCommandProvider = new Commands.TabKeyCommandProvider(myGrid1);

however the definition for my Child Table is done via a DataTemplate

<telerik:RadGridView.ChildTableDefinitions>
    <telerik:GridViewTableDefinition />
 </telerik:RadGridView.ChildTableDefinitions>
 <telerik:RadGridView.HierarchyChildTemplate>
    <DataTemplate>
           <telerik:RadGridView ItemsSource="{Binding custom_identifier}"
                                              x:Name="ChildGrid1"
                                              ShowGroupPanel="False"
                                              AutoGenerateColumns="False">
                          <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding label}"
                                                                            Header="Custom Identifier"
                                                                            IsSortable="True"
                                                                            IsFilterable="False" />
                           </telerik:RadGridView.Columns>
                </telerik:RadGridView>
          </DataTemplate>
 </telerik:RadGridView.HierarchyChildTemplate>

Now as this child Grid is defined in a template, I can not reference it using the x:Name of "ChildGrid1" in the code behind.  So how do I attach the custom Command Provider to this grid?

 

Also - is there an MVVM way of doing this as doing it in Code Behind is not ideal ??

 

Any suggestions welcome

Stefan
Telerik team
 answered on 06 Nov 2017
1 answer
530 views

I have a chart that has two plots on it. I also have a ribbon bar with a few buttons that I'd like to use to control the pan and zoom behaviors of the chart. I'd like to accomplish this exclusively in the XAML file using data triggers. Please excuse the long code snip, but I'd like to provide a complete picture.

 

001.<Grid>
002.        <TabControl ItemsSource="{Binding TotalGradeProfile}">
003. 
004.            <TabControl.ItemTemplate>
005.                <DataTemplate>
006.                    <TextBlock Text="{Binding Name}"/>
007.                </DataTemplate>
008.            </TabControl.ItemTemplate>
009. 
010.            <TabControl.ContentTemplate>
011.                <DataTemplate>
012.                    <Grid>
013.                        <Grid.RowDefinitions>
014.                            <RowDefinition Height="Auto"/>
015.                            <RowDefinition Height="*"/>
016.                        </Grid.RowDefinitions>
017.                         
018.                        <Grid.ColumnDefinitions>
019.                            <ColumnDefinition Width="*"/>
020.                            <ColumnDefinition Width="Auto"/>
021.                        </Grid.ColumnDefinitions>
022. 
023.                        <Ribbon Grid.Row="0"
024.                                Grid.ColumnSpan="2">
025. 
026.                            <RibbonTab Header="Home" KeyTip="H">
027.                                <RibbonGroup x:Name="ZoomAndPanGroup"
028.                                             Header="Zoom and Pan">
029. 
030.                                    <RibbonButton Label="Zoom"
031.                                                  Name="zoomButton"/>
032. 
033.                                    <RibbonButton Label="Pan"
034.                                                  Name="panButton"/>
035.                                </RibbonGroup>
036.                            </RibbonTab>
037.                        </Ribbon>
038.                         
039.                        <telerik:RadCartesianChart x:Name="gradePlot"
040.                                                   Grid.Row="1"
041.                                                   Grid.Column="0"
042.                                                   Margin="2">
043.                             
044.                            <telerik:RadCartesianChart.Behaviors>
045.                                <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True"
046.                                                                ShowTrackInfo="True"
047.                                                                SnapMode="AllClosePoints"/>
048. 
049.                                <telerik:ChartPanAndZoomBehavior ZoomMode="Both"
050.                                                                 PanMode="None"
051.                                                                 x:Name="zoomBehavior"/>
052. 
053.                            </telerik:RadCartesianChart.Behaviors>
054.                         
055.                            <telerik:RadCartesianChart.HorizontalAxis>
056.                                <telerik:LinearAxis SmartLabelsMode="SmartStepAndRange"
057.                                                    IsStepRecalculationOnZoomEnabled="True"
058.                                                    RangeExtendDirection="None"/>
059.                            </telerik:RadCartesianChart.HorizontalAxis>
060. 
061.                            <telerik:RadCartesianChart.VerticalAxis>
062.                                <telerik:LinearAxis SmartLabelsMode="SmartStepAndRange"
063.                                                    IsStepRecalculationOnZoomEnabled="True"
064.                                                    RangeExtendDirection="None"/>
065.                            </telerik:RadCartesianChart.VerticalAxis>
066. 
067.                            <!-- Plot 1 -->
068.                            <telerik:ScatterSplineSeries XValueBinding="Mp"
069.                                                            YValueBinding="RegionGrade"
070.                                                            ItemsSource="{Binding GradeProfiles}"
071.                                                            Stroke="Blue"
072.                                                            StrokeThickness="1">
073. 
074.                                <telerik:ScatterSplineSeries.LegendSettings>
075.                                    <telerik:SeriesLegendSettings Title="Region"/>
076.                                </telerik:ScatterSplineSeries.LegendSettings>
077. 
078.                                <telerik:ScatterSplineSeries.TrackBallInfoTemplate>
079.                                    <DataTemplate>
080.                                        <StackPanel Orientation="Vertical">
081.                                            <TextBlock Text="{Binding DataPoint.XValue, StringFormat=Milepost: {0}}"/>
082.                                            <TextBlock Text="{Binding DataPoint.YValue, StringFormat=Region Grade: {0:0.000}}"
083.                                                        Foreground="Blue"/>
084.                                        </StackPanel>
085.                                    </DataTemplate>
086.                                </telerik:ScatterSplineSeries.TrackBallInfoTemplate>
087. 
088.                                <telerik:ScatterSplineSeries.RenderOptions>
089.                                    <telerik:BitmapRenderOptions/>
090.                                </telerik:ScatterSplineSeries.RenderOptions>
091.                                
092.                            </telerik:ScatterSplineSeries>
093. 
094.                            <!-- Plot 2 -->
095.                            <telerik:ScatterSplineSeries XValueBinding="Mp"
096.                                                            YValueBinding="SubdivGrade"
097.                                                            ItemsSource="{Binding GradeProfiles}"
098.                                                            Stroke="Red"
099.                                                            StrokeThickness="1">
100. 
101.                                <telerik:ScatterSplineSeries.LegendSettings>
102.                                    <telerik:SeriesLegendSettings Title="Subdivision"/>
103.                                </telerik:ScatterSplineSeries.LegendSettings>
104. 
105.                                <telerik:ScatterSplineSeries.TrackBallInfoTemplate>
106.                                    <DataTemplate>
107.                                        <TextBlock Text="{Binding DataPoint.YValue, StringFormat=Subdivision Grade: {0:0.000}}"
108.                                                    Foreground="Red"/>
109.                                    </DataTemplate>
110.                                </telerik:ScatterSplineSeries.TrackBallInfoTemplate>
111. 
112.                                <telerik:ScatterSplineSeries.RenderOptions>
113.                                    <telerik:BitmapRenderOptions/>
114.                                </telerik:ScatterSplineSeries.RenderOptions>
115.                                 
116.                            </telerik:ScatterSplineSeries>
117.                        </telerik:RadCartesianChart>
118. 
119.                        <telerik:RadLegend Items="{Binding LegendItems, ElementName=gradePlot}"
120.                                           BorderBrush="Black"
121.                                           BorderThickness="1"
122.                                           HorizontalAlignment="Right"
123.                                           VerticalAlignment="Top"
124.                                           Margin="0, 0, 2, 0"
125.                                           Grid.Row="1"
126.                                           Grid.Column="0"
127.                                           Background="White"/>
128.                        
129.                        <DataGrid Grid.Row="1"
130.                                  Grid.Column="1"
131.                                  ItemsSource="{Binding GradeProfiles}"
132.                                  AutoGenerateColumns="True"
133.                                  IsReadOnly="True">
134.                        </DataGrid>
135.                    </Grid>
136. 
137.                    <DataTemplate.Triggers>
138.                        <DataTrigger Binding="{Binding ElementName=panButton, Path=IsToggle}"
139.                                     Value="True">
140.                            <Setter TargetName="zoomBehavior"
141.                                    Property="ZoomMode"
142.                                    Value="None"/>
143.                            <Setter TargetName="zoomBehavior"
144.                                    Property="PanMode"
145.                                    Value="Both"/>
146.                        </DataTrigger>
147.                    </DataTemplate.Triggers>
148.                </DataTemplate>
149.            </TabControl.ContentTemplate>
150.        </TabControl>
151.    </Grid>
Martin Ivanov
Telerik team
 answered on 06 Nov 2017
4 answers
232 views

Hello Team,

I am facing one issue while using RadAutoCompleteBox. Wrong mouse cursor is displayed when we type any text in the text box and list is shown.

Please refer attached screen shot for your reference.

 

Please let me know if you need any details futher.

 

Thanks,

Ganesh Sahastrabuddhe

Ganesh
Top achievements
Rank 1
 answered on 06 Nov 2017
0 answers
136 views

Hello Team,

 

Using RadAutoComplete textbox, we are tying to achieve functionality similar to Google search.

We are facing one issue with capital letters.

When we are typing capital letter which is present in the list, the letters are not shown in Capital case, rather they are shown in small case.

I have attached videos, one is of Google, the functionality which we are tying to achieve and second is of the issue. Attached files are jpg, please rename those to mp4.

 

Thanks,

Ganesh Sahastrabuddhe

Ganesh
Top achievements
Rank 1
 asked on 06 Nov 2017
4 answers
379 views

Hello,

 

I am working on a diagram generator which I would like to make every connection path very obvious using AStarRouter. But the problem I have is connections lines overlaps in some scenarios and I have no control preventing them. See the attached CurrentResult.jpg. I would like to prevent them overlapping as the ExpectedResult.jpg

 

Thanks in advanced!

Amiel
Top achievements
Rank 1
 answered on 03 Nov 2017
6 answers
169 views

Hi,

I am working on some requirement where I have hierarchical data(attached sample XML) to represent in a tree view(almost like tree view, attached sample) with customizing lines between the nodes and on-demand expansion/collapse features. I am new to WPF UI, please help me kick start my implementation by providing a sample project with the attached samples as reference. Thanks in advance. 

<root>
      <system name="a" id="1" img-src="">
             <sub-system name="a1" label="a1" id="101">
                        <component name="a1.1" label="a1.1" id="1100">
                               <test name="a1.1.1" label="a1.1.1" id="1101" />
                               <test name="a1.1.2" label="a1.1.2" id="1102" />
                               <test name="a1.1.3" label="a1.1.3" id="1103" />
                                <test name="a1.1.4" label="a1.1.4" id="1104" />
                               <test name="a1.1.5" label="a1.1.5" id="1105" />
                               <test name="a1.1.6" label="a1.1.6" id="1106" />
                         </component>
                          <component name="a1.2" label="a1.2" id="1200">
                                <test name="a1.2.1" label="a1.2.1" id="1201" />
                                <test name="a1.2.2" label="a1.2.2" id="1202" />
                                <test name="a1.2.3" label="a1.2.3" id="1203" />
                                <test name="a1.2.4" label="a1.2.4" id="1204" />
                                 <test name="a1.2.5" label="a1.2.5" id="1205" />
                          </component>
                     </sub-system>
                    <sub-system name="a2" label="a2" id="201">
                            <component name="a2.1" label="a2.1" id="2100">
                                   <test name="a2.1.1" label="a2.1.1" id="2101" />
                            </component>
                            <component name="a2.2" label="a2.2" id="2200">
                                     <test name="a2.2.1" label="a2.2.1" id="2201" />
                            </component>
                            <component name="a2.3" label="a2.3" id="2300">
                                     <test name="a2.3.1" label="a2.3.1" id="2301" />
                            </component>
                            <component name="a2.4" label="a2.4" id="2400">
                                     <test name="a2.4.1" label="a2.4.1" id="2401" />
                                     <test name="a2.4.2" label="a2.4.2" id="2401" />
                                     <test name="a2.4.3" label="a2.4.3" id="2401" />
                                     <test name="a2.4.4" label="a2.4.4" id="2401" />
                             </component>
                      </sub-system>
                      <sub-system name="a3" label="a3" id="301">
                             <component name="a3.1" label="a3.1" id="3100">
                                     <test name="a3.1.1" label="a3.1.1" id="3101" />
                             </component>
                             <component name="a3.2" label="a3.2" id="3200">
                                     <test name="a3.2.1" label="a3.2.1" id="3201" />
                             </component>
                      </sub-system>

               </system>
          </root>

 

 

Thanks,

Cha

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Nov 2017
1 answer
72 views
Hi,
I have an object data source which is returning among other things, a list of bitmap images. I can see this object in the Data Explorer plain. They are however a vast array of properties from which to choose from, but no actual image. For example, DpiX, DpiY, Width, Height, but no actual image from which I can drag and drop onto my picture box. I can't find any online examples on how to do so. The applications intended use should populate the report with an array of images when clicked on from a wpf desktop application. Can anybody point me in the correct direction, perhaps with some screenshots or examples? Thanks in advance.

Kind regards,
David
Dilyan Traykov
Telerik team
 answered on 03 Nov 2017
1 answer
194 views

Hi,

I have an object data source which is returning among other things, a list of bitmap images. I can see this object in the Data Explorer plain. They are however a vast array of properties from which to choose from, but no actual image. For example, DpiX, DpiY, Width, Height, but no actual image from which I can drag and drop onto my picture box. I can't find any online examples on how to do so. The applications intended use should populate the report with an array of images when clicked on from a wpf desktop application. Can anybody point me in the correct direction, perhaps with some screenshots or examples. Thanks in advance.

 

Kind regards,

David

Dilyan Traykov
Telerik team
 answered on 03 Nov 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?