Telerik Forums
UI for WPF Forum
1 answer
129 views
Hi there, 

I have .NET ListView and I want to drag and item from the ListView to Telerik's RadTreeListView component.

I follow the example in here, but still doesn't work. Looks like the example only works two Telerik's component. So let's say if we want to do drag and drop between .NET standard component and Telerik component, how should I proceed?

Do I need to use .NET standard DragDrop manager and perform my own conversion to destination GridView (let's say we drop to RadGridView) ?

Regards, 

Arinto

Arinto
Top achievements
Rank 1
 answered on 28 Feb 2011
10 answers
250 views
Hi,

I have just started with evaluating telerik RadGridView. 
What I want is to make RadGridView behave like the wpf toolkit DataGrid regarding the last adding new row.
This row should be always visible and it should add the bound object to the underlaing list just when you click away or press enter.
A new empty adding row should be displayed as a last row immediately after.

I would really appreciate some hints on how to proceed with achieving this using telerik RadGridView.

Nikolay
Top achievements
Rank 1
 answered on 28 Feb 2011
3 answers
284 views

WPF 4.0, VB, 2010.3.110.40

If I put a button in the Header and click on it the IsExpanded property of the expander does not change (as I expected).
If I put a checkbox in the Header and click on it the IsExpanded property DOES change (as well as the IsChecked of the checkbox.  How can I have a checkbox in my header but not have it process as if the Expander Headerbar was clicked?

<telerik:RadExpander IsExpanded="True">
  <telerik:RadExpander.Header>
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
      </Grid.ColumnDefinitions>
      <Label Content="Filter Options" />
      <Button Grid.Column="1" Content="Test" />
      <CheckBox Name="showgrouppanel" Content="Show GroupBy Area" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right" />
    </Grid>
  </telerik:RadExpander.Header>
Tina Stancheva
Telerik team
 answered on 28 Feb 2011
1 answer
65 views
I am using a gridviewcomboboxcolumn to select a transaction code.  Because the description of the code may be fairly long, I would like to display the Code and Description in the Dropdown in Edit mode (e.g. 0110 Long Description) but when it is in Display mode I would like only the Code to show without the description (e.g. 0110).  (The ID of the transaction is saving perfectly to my MVVM model right now so this is a display issue only.)

thanks!
Maya
Telerik team
 answered on 28 Feb 2011
1 answer
165 views
Hi,

Is there any way to get the same EmptyText property in a GridViewComboBoxColumn as there is in a RadComboBox?

Many thanks
Jeremy
Maya
Telerik team
 answered on 28 Feb 2011
5 answers
292 views
RadControls for WPF Q3 2009.

I would like to know how best to represent two collections of data in two GridView controls.
We currently have situation where we have a collection of a data to be displayed and edited.  The objects in this collection have additional collections of other data, also which need to be edited.  (there are also cases where we have third level collections).

Currently we are forced to use WPF ListView controls to display this data, and edit them in TextBox/ComboBox fields.  The ListView supports the IsSynchronizedWithCurrentItem property, which synchonises the ListViews at multiple levels of the Business Object.

From what I can tell, the RadGridView does not appear to support IsSynchronizedWithCurrentItem.  I have attempted to use the SelectionChanged event on the RadGridView, with dissapointing results.  On particular occasions when clearing the binding on the second RadGridView, I get an exception "Cannot change ObservableCollection during a CollectionChanged event".
This occurs when the user clears the Row selection, by holding down the Ctrl key, and clicks on the row on the second time.  (Ie.  Selects a row, unselects the row, selects a row, unselects the row.)

Is there a particular method or way that I can occomplish this?

Here is an example of the ListView, next to our partially functioning RadGridView.
<Grid> 
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition/> 
            <RowDefinition/> 
        </Grid.RowDefinitions> 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition/> 
            <ColumnDefinition/> 
            <ColumnDefinition/> 
            <ColumnDefinition/> 
        </Grid.ColumnDefinitions> 
        <ListView Name="uxListView1" Grid.Column="1" Grid.Row="0">  
            <ListView.View> 
                <GridView> 
                    <GridView.Columns> 
                        <GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" /> 
                        <GridViewColumn Header="City" DisplayMemberBinding="{Binding City}" /> 
                        <GridViewColumn Header="Country" DisplayMemberBinding="{Binding Country}" /> 
                    </GridView.Columns> 
                </GridView> 
            </ListView.View> 
        </ListView> 
        <ListView Name="uxListView2" Grid.Column="1" Grid.Row="1">  
            <ListView.View> 
                <GridView> 
                    <GridView.Columns> 
                        <GridViewColumn Header="AreaCode" DisplayMemberBinding="{Binding AreaCode}" /> 
                        <GridViewColumn Header="Number" DisplayMemberBinding="{Binding Number}" /> 
                    </GridView.Columns> 
                </GridView> 
            </ListView.View> 
        </ListView> 
        <telerik:RadGridView xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
                Grid.Column="3" Grid.Row="0" 
                AutoGenerateColumns="False" CanUserFreezeColumns="False"   
                CanUserSortColumns="True" 
                CanUserInsertRows="True" 
                ShowGroupPanel="False" 
                x:Name="uxRad4GridView" UseAlternateRowStyle="False" telerik:StyleManager.Theme="Office_Black">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding Name}" /> 
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding City}"/>  
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding Country}"/>  
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
        <telerik:RadGridView xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
                Grid.Column="3" Grid.Row="1" 
                AutoGenerateColumns="False" CanUserFreezeColumns="False"   
                CanUserSortColumns="True" 
                CanUserInsertRows="True" 
                ShowGroupPanel="False" 
                x:Name="uxRad5GridView" UseAlternateRowStyle="False" telerik:StyleManager.Theme="Office_Black">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding AreaCode}" /> 
                <telerik:GridViewDataColumn IsFilterable="False" DataMemberBinding="{Binding Number}"/>  
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
</Grid> 
 
using System.Collections.ObjectModel;  
using System.ComponentModel;  
 
public class Customer : INotifyPropertyChanged  
{
    #region fields  
    private string _name;  
    private string _country;  
    private string _city;  
    private ObservableCollection<Phone> _phoneNumbers;
    #endregion  
 
    #region ctor  
    public Customer()  
    {  
        _phoneNumbers = new ObservableCollection<Phone>();  
    }  
 
    public Customer(string name, string country, string city)  
    {  
        _name = name;  
        _country = country;  
        _city = city;  
        _phoneNumbers = new ObservableCollection<Phone>();  
    }  
 
    public Customer(string name, string country, string city, ObservableCollection<Phone> phoneNumbers)  
    {  
        _name = name;  
        _country = country;  
        _city = city;  
        _phoneNumbers = phoneNumbers;  
    }
    #endregion  
 
    #region properties  
    public string Name  
    {  
        get { return _name; }  
        set 
        {  
            _name = value;  
            NotifyPropertyChanged("Name");  
        }  
    }  
 
    public string City  
    {  
        get { return _city; }  
        set 
        {  
            _city = value;  
            NotifyPropertyChanged("City");  
        }  
    }  
 
    public string Country  
    {  
        get { return _country; }  
        set 
        {  
            _country = value;  
            NotifyPropertyChanged("Country");  
        }  
    }  
 
    public ObservableCollection<Phone> PhoneNumbers  
    {  
        get { return _phoneNumbers; }  
        set 
        {  
            _phoneNumbers = value;  
            NotifyPropertyChanged("PhoneNumbers");  
        }  
    }
    #endregion  
 
    #region Interface INotifyPropertyChanged  
    public event PropertyChangedEventHandler PropertyChanged;  
 
    private void NotifyPropertyChanged(string propertyName)  
    {  
        if (PropertyChanged != null)  
            PropertyChanged(thisnew PropertyChangedEventArgs(propertyName));  
    }
    #endregion  
}  
 
public class Phone : INotifyPropertyChanged  
{
    #region fields  
    private string _areaCode;  
    private string _number;
    #endregion  
 
    #region ctor  
    public Phone()  
    {  
 
    }  
 
    public Phone(string areaCode, string number)  
    {  
        _areaCode = areaCode;  
        _number = number;  
    }
    #endregion  
 
    #region properties  
    public string AreaCode  
    {  
        get { return _areaCode; }  
        set 
        {  
            _areaCode = value;  
            NotifyPropertyChanged("AreaCode");  
        }  
    }  
 
    public string Number  
    {  
        get { return _number; }  
        set 
        {  
            _number = value;  
            NotifyPropertyChanged("Number");  
        }  
    }
    #endregion  
 
    #region Interface INotifyPropertyChanged  
    public event PropertyChangedEventHandler PropertyChanged;  
 
    private void NotifyPropertyChanged(string propertyName)  
    {  
        if (PropertyChanged != null)  
            PropertyChanged(thisnew PropertyChangedEventArgs(propertyName));  
    }
    #endregion  
}  
 
using System;  
using System.Collections.ObjectModel;  
using System.Windows;  
using System.Windows.Controls;  
using System.Windows.Data;  
using Telerik.Windows.Controls;  
 
/// <summary>  
/// Interaction logic for Window5.xaml  
/// </summary>  
public partial class Window5 : Window  
{  
    public Window5()  
    {  
        InitializeComponent();  
 
        Binding binding;
        #region ListView.  Works by using IsSynchronizedWithCurrentItem  
        ObservableCollection<Customer> list2 = CreateList();  
        binding = new Binding();  
        binding.Source = list2;  
        uxListView1.IsSynchronizedWithCurrentItem = true;  
        uxListView1.SetBinding(ListView.ItemsSourceProperty, binding);  
 
        binding = new Binding();  
        binding.Source = list2;  
        binding.Path = new PropertyPath("PhoneNumbers");  
        uxListView2.IsSynchronizedWithCurrentItem = true;  
        uxListView2.SetBinding(ListView.ItemsSourceProperty, binding);
        #endregion  
 
        ObservableCollection<Customer> list4 = CreateList();  
        binding = new Binding();  
        binding.Source = list4;  
        //uxRad4GridView.IsSynchronizedWithCurrentItem = true;   // Doesn't seem to be supported.  
        uxRad4GridView.SelectionChanged += new EventHandler<SelectionChangeEventArgs>(uxRad4GridView_SelectionChanged);  // Using this instead of IsSynchronizedWithCurrentItem  
        uxRad4GridView.SetBinding(RadGridView.ItemsSourceProperty, binding);  
 
        /// No point in binding it, as IsSynchronizedWithCurrentItem isn't supported.  
        //binding = new Binding();  
        //binding.Source = list4;  
        //binding.Path = new PropertyPath("PhoneNumbers");  
        //uxRad5GridView.IsSynchronizedWithCurrentItem = true;      // Doesn't seem to be supported.  
        //uxRad5GridView.SetBinding(RadGridView.ItemsSourceProperty, binding);  
    }  
 
    void uxRad4GridView_SelectionChanged(object sender, SelectionChangeEventArgs e)  
    {  
        /// When the user holds "ctrl" to unselect a row, we must clear the secondary Grid.  
        /// This however causes an exception to occur the second time a Row is unselected.  
        if (uxRad4GridView.SelectedItem == null)  
        {  
            uxRad5GridView.ClearValue(RadGridView.ItemsSourceProperty);  
        }  
        else 
        {  
            Binding binding = new Binding();  
 
            binding.Source = uxRad4GridView.SelectedItem;  
            binding.Path = new PropertyPath("PhoneNumbers");  
            uxRad5GridView.SetBinding(RadGridView.ItemsSourceProperty, binding);  
        }  
    }  
 
 
    private ObservableCollection<Customer> CreateList()  
    {  
        ObservableCollection<Customer> customers = new ObservableCollection<Customer>();  
        customers.Add(new Customer("John""USA""Chicago"new ObservableCollection<Phone>(new Phone[] { new Phone("XX""1234"), new Phone("XX""5678") })));  
        customers.Add(new Customer("Tim""USA""NY"new ObservableCollection<Phone>(new Phone[] { new Phone("AA""2345"), new Phone("AA""6789") })));  
        customers.Add(new Customer("Jeff""USA""W.D.C"new ObservableCollection<Phone>(new Phone[] { new Phone("ZZ""3456"), new Phone("ZZ""7890") })));  
        customers.Add(new Customer("Zhang""China""Shanghai"new ObservableCollection<Phone>(new Phone[] { new Phone("BB""4567"), new Phone("BB""8901") })));  
        customers.Add(new Customer("Li""China""Beijing"new ObservableCollection<Phone>(new Phone[] { new Phone("YY""5678"), new Phone("YY""9012") })));  
        customers.Add(new Customer("Wang""China""HongKong"new ObservableCollection<Phone>(new Phone[] { new Phone("CC""6789"), new Phone("CC""0123") })));  
        return customers;  
    }  
}  
 






Hidayet ÇELEN
Top achievements
Rank 1
 answered on 26 Feb 2011
3 answers
173 views
Hi,
  I was wondering if there is a way to implement a "load on demand" pattern using RadTreeListView?  I noticed that the feature is included with RadTreeView:

http://www.telerik.com/help/wpf/radtreeview-features-load-on-demand.html

But I cannot find any documentation related to it for RadTreeListView.

Thanks,
-Gabe
Hristo
Telerik team
 answered on 25 Feb 2011
1 answer
91 views
I would like to bind the LegendLabel to a property in my ViewModel, something like:

<telerikCharting:SeriesMapping LegendLabel="{Binding ViewModelField}" >

But this doesn't work, the LegendLabel at runtime is "Series 0" and I get the following output:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=ViewModelField; DataItem=null; target element is 'SeriesMapping' (HashCode=6313943); target property is 'LegendLabel' (type 'String')

How should I go about doing this?
Giuseppe
Telerik team
 answered on 25 Feb 2011
3 answers
153 views
Hello all.
I'm developing XBAP sidebar gadget (hosted in iframe) with stached bar within it.
I noticed one problem related to item tool tip (value of stacked bar segment on mouse over event).
Images with two cases are attached.
tooltip_ok.jpg shows correct behavior and tooltip_notok.jpg shows incorect behavior.
The wird is about blue segment within 5th (last one) bar.

If I run xbap in IE and do mouseover on tooltip is visible and it shows some amount.
If I run it within sidebar gadget, it will only blink (will be shown less than 1/100 sec) two or three times.
It seems that in case of gadget it has no 'much space'.
In case of browser we are able to see that tool tip and browser's white area are overlapping.

Can anyone can help me with this? Is there any way to 'move' tooltip somehow?
Thanx in advance.
    Nenad Djukic
Jan
Top achievements
Rank 1
 answered on 25 Feb 2011
1 answer
98 views
Why RadGridView source is updated after each cell edit?
Shouldn't it be updated after CommitEdit command? I am losing old cell values in this type of source updating...

regards
Yordanka
Telerik team
 answered on 25 Feb 2011
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?