Telerik Forums
UI for WPF Forum
6 answers
127 views

Howdy All,

     

Kevin
Top achievements
Rank 1
 answered on 08 Mar 2016
1 answer
261 views

 

 

I'm having probelas with the binding of radautocompletebox in raddatagridview , in this example the GridViewComboBoxColumn the ItemsSource works correctly but the ItemsSource RadAutoCompleteBox does not work.

Can anyone help.

 

*** VIEW

using ViewModels;
using System.Windows;

namespace Windows
{
     public partial class frmTestes : Window
    {
        public frmTestes()
        {
            InitializeComponent();
            this.DataContext = new vmTeste(myConnection, System.DateTime.Now);
        }
    }
}

 

**** XAML

<Window x:Name="window"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Windows"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

        x:Class="Windows.frmTestes" mc:Ignorable="d" Title="frmTestes" >
    <Grid>
        <TabControl x:Name="tabControl">
            <TabItem Header="TabItem1">
                <telerik:RadGridView CanUserDeleteRows="False"   
                                     AlternationCount="2"
                                     BorderThickness="0"
                                     ShowGroupPanel="True"
                                     AlternateRowBackground="#FFF0F0F0"
                                     AutoGenerateColumns="False"
                                     RowDetailsVisibilityMode="Collapsed"
                                     RowIndicatorVisibility="Collapsed"
                                     ItemsSource="{Binding linhas}">

                    <telerik:RadGridView.Columns>
                        <telerik:GridViewComboBoxColumn Header="Código" MinWidth="110" IsComboBoxEditable="True"  
                                                        DataMemberBinding="{Binding artigo}"
                                                        SelectedValueMemberPath="artigo"
                                                        DisplayMemberPath="artigo"
                                                        telerik:TextSearch.TextPath="artigo"
                                                        ItemsSource="{Binding DataContext.artigos, ElementName=window}">
                        </telerik:GridViewComboBoxColumn>

                        <telerik:GridViewDataColumn UniqueName="designacao" Header="Designação" Width="*" DataMemberBinding="{Binding desig1}">
                            <telerik:GridViewDataColumn.CellEditTemplate>
                                <DataTemplate>
                                    <telerik:RadAutoCompleteBox SelectedItem="{Binding artigos.desig1, Mode=TwoWay}"
                                                                ItemsSource="{Binding DataContext.artigos, ElementName=window}"
                                                                SelectionMode="Single" 
                                                                TextSearchMode="Contains"
                                                                DisplayMemberPath="desig1"
                                                                SearchText="{Binding desig1}"/>
                                </DataTemplate>
                            </telerik:GridViewDataColumn.CellEditTemplate>
                        </telerik:GridViewDataColumn>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </TabItem>
            <TabItem Header="TabItem2"/>
           </TabControl>
    </Grid>
</Window>

 

**** VIEWMODEL

using System;
using System.Collections.ObjectModel;
using System.Data.SqlClient;

namespace ViewModels
{
    public class vmTeste : BaseViewModel
    {
        public vmTeste(SqlConnection _connection, DateTime _datatrabalho)
        {
            linhas_ = getLinhasFromSQL(_connection, _datatrabalho);
            artigos_ = getArtigosFromSQL(_connection, _datatrabalho);
        }

        private ObservableCollection<Linha> linhas_;
        public ObservableCollection<Linha> linhas
        {
            get
            {
                return this.linhas_;
            }
            set
            {
                linhas_ = value;
            }
        }
   
        private ObservableCollection<Artigo> artigos_;
        public ObservableCollection<Artigo> artigos
        {
            get
            {
                return this.artigos_;
            }
        }
    }
}

Thanks
I'm having probelas with the binding of radautocompletebox in raddatagridview , in this example the GridViewComboBoxColumn the ItemsSource works correctly but the ItemsSource RadAutoCompleteBox does not work. Can anyone help .
I'm having probelas with the binding of radautocompletebox in raddatagridview , in this example the GridViewComboBoxColumn the ItemsSource works correctly but the ItemsSource RadAutoCompleteBox does not work. Can anyone help .
Yana
Telerik team
 answered on 08 Mar 2016
2 answers
95 views

Hi,

I have a grid view bound to a RadObservableCollection that contains around a million items. when I select all items and delete them from the grid view (using telerik:RadGridViewCommands.Delete), the whole application freezes and stops responding. I tried all the tricks and tips for optimizing the grid view, but that didn't help.

How do I solve the issue?

Thanks

Stefan Nenchev
Telerik team
 answered on 08 Mar 2016
1 answer
552 views

So as the title states, I'm trying to navigate between rows in a GridView when a cell* ( * : cell correspond to third row and quantity column in my case )  is editing by clicking up/down , so when i navigate up/down , the new selected row also have cell* editing   , here is my gridview

<telerik:RadGridView Grid.Row="2" Grid.ColumnSpan="3"
         x:Name="gridview"
         ItemsSource="{Binding CurrentDetailBLLs}"
         SelectedItem="{Binding SelectedCurrentDetailBLL,Mode=TwoWay}"                  
         SelectionMode="Extended"
         CanUserDeleteRows="True"
         CanUserInsertRows="True"
         IsReadOnly="False"
         IsFilteringAllowed="False"
         AutoGenerateColumns="False"
         GroupRenderMode="Flat"
         AutoExpandGroups="True"
         NewRowPosition="None"
         IsSynchronizedWithCurrentItem="True" KeyUp="dataGridView1_KeyUp">
            <!--SelectionUnit="FullRow"-->
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn
                            TextAlignment="Justify"
                            Width="auto"
                            HeaderTextAlignment="Center"
                            DataMemberBinding="{Binding Path=ProductID}"
                            Header="ProductCode" />
                <telerik:GridViewDataColumn
                            TextAlignment="Justify"
                            Width="auto"
                            HeaderTextAlignment="Center"
                            DataMemberBinding="{Binding Path=ProductName}"
                            Header="ProductName" IsReadOnly="True">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                            TextAlignment="Center"
                                    Width="auto"
                            HeaderTextAlignment="Center"
                            DataMemberBinding="{Binding Path=Quantity}"
                            Header="Quantity"/>
 
            </telerik:RadGridView.Columns>

the attached image make clear what i am talking about .

help plz !

Stefan Nenchev
Telerik team
 answered on 08 Mar 2016
16 answers
940 views
I need to provide arrow key navigation between rows and columns similar to how Excel works. I have implemented a custom keyboard command provided based on DefaultKeyboardCommandProvider following the instructions from this blog post (the example is actually incorrect. After clearing the command list, the example tried to Remove rather than Add a RadGridViewCommands command to this list).

It appears that if the cell is in edit mode, the custom command provider does not pick up the keyboard events. If I press ESC to cancel edit mode, then the provide gets called. Is there some problem with how I have defined my XAML? I would expect the "Key.Up" and "Key.Down" keys to propogate through the edit control (TextBox) and through to the command provider. Here's what the XAML looks like for the column I'm testing:

                <trgv:GridViewDataColumn Header="Quantity"
 MinWidth="75"
 HeaderTextAlignment="Right"
 ShowDistinctFilters="False">
                    <trgv:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Quantity}"
   HorizontalAlignment="Right"/>
                        </DataTemplate>
                    </trgv:GridViewDataColumn.CellTemplate>
                    <trgv:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <infctrl:NumberTextBox Value="{Binding Quantity, ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}"
   HorizontalAlignment="Stretch"
   DisplayFormat="N0"/>
                        </DataTemplate>
                    </trgv:GridViewDataColumn.CellEditTemplate>
                </trgv:GridViewDataColumn>

Maya
Telerik team
 answered on 08 Mar 2016
2 answers
615 views

Hello,

I have a RadTreeView that has different item HierarchicalDataTemplates based on the data type.  One of the templates calls for multi-column items.  Whenever I am performing a drag/drop operation the tooltip target appears to be taking the existing template (maybe put into a horizontal stack panel) and showing the info.  (See attachment)  This is not the results I want as it's even showing hidden buttons (X) that should only appear on hover.  

So my question is how can I update the circled part of the tooltip to only show the label (with the styling such as bold removed as well)?

 

Thank you for your assistance.

 

David
Top achievements
Rank 1
 answered on 07 Mar 2016
5 answers
1.1K+ views

I would like to display "Yes" or "No" for a Boolean in RadGridView instead of a checkbox. I would like to implement this changes in xaml. Columns are generating dynamically. This is how it's created now:

 <telerik:RadGridView x:Name="Data" Grid.Row="3" Margin="5" AutoGenerateColumns="False" CanUserSortColumns="True" IsFilteringAllowed="True"
                                 grid:RadGridViewColumnsBinding.ColumnsCollection="{Binding Path=Columns}"
                                 IsReadOnly="False" CanUserResizeColumns="True"/>

 

I am new in Silverlight coding. Will really appreciate if someone can help.

Dilyan Traykov
Telerik team
 answered on 07 Mar 2016
9 answers
156 views

Hi,

  We are trying to automate RADGridView using CUIT and AutomationElement but we are unable to auto scroll to required row. I have searched in the net and I found this article(http://docs.telerik.com/teststudio/advanced-topics/coded-samples/silverlight/radgridview-automation/scrolling) related to GridView for Sliverlight applications. Is there similar type of the code or any fix for WPF RadGridView? Any help to solve this problem is greatly appreciated.

 

Regards,

Nagasree.

 

Maya
Telerik team
 answered on 07 Mar 2016
6 answers
169 views

Hi,

I'm trying to get the current visible range of values in a Candlestick chart, in order to apply different levels of sampling threshold when zoom changes (in an attempt to get adaptative sampling to solve this issue: http://www.telerik.com/forums/adaptive-sampling-zoom-scrolling). Is there any way to get this value, or the limits of the visible area, or at least know when a point is visible or not when zooming in and out?

Thanks.

Petar Marchev
Telerik team
 answered on 07 Mar 2016
4 answers
193 views

Hie 

I declared all my property description in a LocalDataSourceProvider as below. On the first run it works well, but when I uncheck and re-check my custom property are removed (CustomName and AggregateFunction) and property are not put in the right bow (RowGroupDescription instead of ColumnGroupDescriptions) as shown in the attached file. Does it exist some property to set to not lose custom description ?

            <pivot:LocalDataSourceProvider x:Key="DataSourceProvider" ItemsSource="{Binding SynthesisData}">
                <pivot:LocalDataSourceProvider.RowGroupDescriptions>
                    <pivot:PropertyGroupDescription PropertyName="ElementName" CustomName="Element Name" />
                    <pivot:PropertyGroupDescription PropertyName="LatticeType" CustomName="Lattice Type" />
                </pivot:LocalDataSourceProvider.RowGroupDescriptions>
                <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                    <pivot:PropertyGroupDescription PropertyName="JibName" CustomName="Jib Name" />
                    <pivot:PropertyGroupDescription PropertyName="Type" />
                </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                <pivot:LocalDataSourceProvider.AggregateDescriptions>
                    <pivot:PropertyAggregateDescription PropertyName="Percentage" CustomName="Base %" AggregateFunction="Max" StringFormat="#.00\%" />
                    <pivot:PropertyAggregateDescription PropertyName="ModifiedPercentage" CustomName="Ruled %" AggregateFunction="Max" StringFormat="#.00\%"/>
                    <pivot:PropertyAggregateDescription PropertyName="Radius" CustomName="Radius" StringFormat="#.00 m"  AggregateFunction="Max"/>
                </pivot:LocalDataSourceProvider.AggregateDescriptions>
            </pivot:LocalDataSourceProvider>
 
...
 
<pivot:RadPivotGrid x:Name="Pivot" Margin="8,8,292,7.565" DataProvider="{StaticResource DataSourceProvider}" ColumnSubTotalsPosition="Right">
            <pivot:RadPivotGrid.RowGroupsExpandBehavior>
                <pivot:GroupsExpandBehavior Expanded="False" />
            </pivot:RadPivotGrid.RowGroupsExpandBehavior>
            <pivot:RadPivotGrid.ColumnGroupsExpandBehavior>
                <pivot:GroupsExpandBehavior Expanded="False" />
            </pivot:RadPivotGrid.ColumnGroupsExpandBehavior>
        </pivot:RadPivotGrid>
 
        <pivot:RadPivotFieldList Grid.Row="0" Margin="0,8,8,7.565" HorizontalAlignment="Right" Width="283" DataProvider="{StaticResource DataSourceProvider}" />

 

JC
Top achievements
Rank 1
 answered on 07 Mar 2016
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?