Telerik Forums
UI for WPF Forum
6 answers
106 views
 CellRequestBringIntoView says its obsolete.  What is its replacement?  I'm using it to automatically enter edit mode.
Sean O'Dea
Top achievements
Rank 1
 answered on 17 Dec 2009
3 answers
224 views
Hi, I'm facing some problems with the RadGridView hierarchy. Any help would be greatly appreciated.

1. Nested DataTable works, but anyway to do it without loading the data of all child tables?

The following is an XML representation of the structure for the DataTable object used:
<CustomerTable> 
  <Customer> 
    <Name>John</Name> 
    <Sex>Male</Sex> 
    <AccountTable> 
      <Account> 
        <AccountNo>0001</AccountNo> 
        <Status>Active</Status> 
      </Account> 
    </AccountTable> 
  </Customer> 
  <Customer> 
    <Name>Lily</Name> 
    <Sex>Female</Sex> 
    <AccountTable> 
      <Account> 
        <AccountNo>0002</AccountNo> 
        <Status>Active</Status> 
      </Account> 
      <Account> 
        <AccountNo>0003</AccountNo> 
        <Status>Terminated</Status> 
      </Account> 
    </AccountTable> 
  </Customer> 
</CustomerTable> 

I've managed to get the hierarchy to work using this DataTable object, but I would have to load the data of all child tables (in this case

the AccountTable) before binding to the ItemsSource of the RadGridView control. Is there anyway to load the child table data only when a row is expanded?
Also, for my case I cannot hard code the structure in class files  (ie: creating Customer and Account classes) as shown in the examples in the demo.

2. Is there an event fired when a row is expanded to display child tables  (ie: + sign clicked)?

3. Can anyone provide an example on how to use the BuildHierachyFromDataSet method in the RadGridView?

Jeffrey
Top achievements
Rank 1
 answered on 17 Dec 2009
2 answers
104 views
Opening any .xaml files in the C# or VB demo's provided via the trial install causes Visual Studio 2008 to crash without warning.

Opening the same xaml files from the same solution in Blend 3, however, causes no issues.

I'd prefer to be able to browse the xaml in Visual Studio. Any insight into what may be causing this behaviour?

The event viewer shows the following application event which coincides with the visual studio crash:

.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A2E1132) (0)
David Romanchuk
Top achievements
Rank 1
 answered on 17 Dec 2009
1 answer
119 views
Hi,

I am facing a problem while deleting a record from the GridView, after clicking on the delete button, methods get executed and record is successfully deleted from the XML File and from the Observable collection property but the grid is not getting refreshed.  
could you please suggest me asap.

File Code:

Binding to grid using MVVM pattern i.e. datasource list is observable collection which assign to the view datacontext.

View Model Class:

public class ScenerioViewModel : ViewModelBase
    {
        private IScenerioRepository _repository;
        ObservableCollection<Scenerio> scenerio = new ObservableCollection<Scenerio>();
        #region Constructor
        public ScenerioViewModel (): this(new ScenerioRepository())
        {
            // Blank
        }
        public ScenerioViewModel(IScenerioRepository repository)
        {
            _repository = repository;
            GetAllRecords();
        }
        #endregion Constructor
        public ObservableCollection<Scenerio> OCScenario
        {
            get { return scenerio; }
        }
        
        private void GetAllRecords()
        {
            scenerio.Clear();
            List<Scenerio> scenerioList = _repository.GetAllRecords();
            foreach (Scenerio sce in scenerioList)
            {
                scenerio.Add(sce);
            }
        }

        private RelayCommand deleteData;
        public ICommand ICDeleteData
        {
            get
            {
                if (deleteData == null)
                {
                    deleteData = new RelayCommand(param => DeleteData());
                }
                return deleteData;
            }
        }

        private void DeleteData()
        {
            _repository.DeleteRecord(scenerio.FirstOrDefault());
            GetAllRecords();
        } 

XAML File code:
<telerik:RadGridView x:Name="YeildCurveGrid"  ItemsSource="{Binding Path=OCScenario/ListYeildCurve}" AutoGenerateColumns="False" DataLoadMode="Asynchronous"  ColumnWidth="*" RowIndicatorVisibility="Collapsed" IsFilteringAllowed="False" ShowGroupPanel="False" >
<telerik:GridViewDataControl.Columns>
 <telerik:GridViewDataColumn Header="Select" DataMemberBinding="{Binding IsSelected}" IsFilterable="False" IsSortable="False">
    <telerik:GridViewDataColumn.CellTemplate>
          <DataTemplate>
               <CheckBox IsChecked="{Binding IsSelected}"/>
         </DataTemplate>
   </telerik:GridViewDataColumn.CellTemplate>
 </telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Header="GUID" IsVisible="False" IsFilterable="False" DataMemberBinding="{Binding GUID}" IsReadOnly="True" IsSortable="False" ></telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Header="Code" IsFilterable="False" DataMemberBinding="{Binding CrncyCode}" IsReadOnly="True" IsSortable="False"  Background="BlanchedAlmond" ></telerik:GridViewDataColumn>
</telerik:GridViewDataColumn>
</telerik:GridViewDataControl.Columns>
</grid:RadGridView>

<Button x:Name="btnDelete" Command="{Binding ICDeleteData}" Content="Delete" ></Button>


Thanks,
Gorakhnath Choudhary
Milan
Telerik team
 answered on 17 Dec 2009
3 answers
146 views
I'm working on application using Prism and yours Q3 WPF controls. Unfortunately when I'm trying to dock control in another dock region the InvalidOperationException is thrown. Exception message says I should use ItemsControl.ItemsSource instead of ItemsSource and I really don`t known how to solve this.

Below you'll find my region adapter class, dockable view class and docking container declaration in main window

Region adapter
namespace LTD.Desktop.Common 
    public class RadPaneGroupRegionAdapter : RegionAdapterBase<RadPaneGroup> 
    { 
        public RadPaneGroupRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory) 
            : base(regionBehaviorFactory) 
        { 
        } 
 
        protected override void Adapt(IRegion region, RadPaneGroup regionTarget) 
        { 
            region.Views.CollectionChanged += (s, e) => 
            { 
                switch (e.Action) 
                { 
                    case NotifyCollectionChangedAction.Add: 
                        foreach (var item in e.NewItems.OfType<RadPane>()) 
                        { 
                            regionTarget.AddItem(item, Telerik.Windows.Controls.Docking.DockPosition.Center); 
                        } 
                        break
                    case NotifyCollectionChangedAction.Remove: 
                        foreach (var item in e.OldItems.OfType<RadPane>()) 
                        { 
                            item.RemoveFromParent(); 
                        } 
                        break
                    case NotifyCollectionChangedAction.Replace: 
                        { 
                            var oldItems = e.OldItems.OfType<RadPane>(); 
                            var newItems = e.NewItems.OfType<RadPane>(); 
                            var newItemsEnumerator = newItems.GetEnumerator(); 
                            foreach (var oldItem in oldItems) 
                            { 
                                var parent = oldItem.Parent as ItemsControl; 
                                if (parent != null && parent.Items.Contains(oldItem)) 
                                { 
                                    parent.Items[parent.Items.IndexOf(oldItem)] = newItemsEnumerator.Current; 
                                    if (!newItemsEnumerator.MoveNext()) 
                                    { 
                                        break
                                    } 
                                } 
                                else 
                                { 
                                    oldItem.RemoveFromParent(); 
                                    regionTarget.Items.Add(newItemsEnumerator.Current); 
                                } 
                            } 
                        } 
                        break
                    case NotifyCollectionChangedAction.Reset: 
                        regionTarget 
                            .EnumeratePanes() 
                            .ToList() 
                            .ForEach(p => p.RemoveFromParent()); 
                        break
                    default
                        break
                } 
            }; 
 
            foreach (var view in region.Views.OfType<RadPane>()) 
            { 
                regionTarget.Items.Add(view); 
            } 
        } 
 
        protected override IRegion CreateRegion() 
        { 
            return new AllActiveRegion(); 
        } 
    } 

Dockable view
namespace LTD.Examples.Modularity.Views 
    /// <summary> 
    /// Interaction logic for ExampleView.xaml 
    /// </summary> 
    public partial class ExampleView : RadDocumentPane 
    { 
        public ExampleView() 
        { 
            InitializeComponent(); 
        } 
    } 

<telerik:RadDocumentPane x:Class="LTD.Examples.Modularity.Views.ExampleView" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    Header="Example panel"/> 
 

ExampleView class in design time also generate en error: Could not create an instance of type 'RadDocumentPane'

Views container:
<!-- Workspaces container --> 
        <telerik:RadDocking Name="Workspaces" DockPanel.Dock="Bottom" cal:RegionManager.RegionName="Workspaces"
            <telerik:RadDocking.DocumentHost> 
                <telerik:RadSplitContainer> 
                    <telerik:RadPaneGroup cal:RegionManager.RegionName="MainRegion" /> 
                </telerik:RadSplitContainer> 
            </telerik:RadDocking.DocumentHost> 
        </telerik:RadDocking> 

It's critical for me, so I'll be appreciate for any help.

Regards,
MC.
Maciej Czerwiakowski
Top achievements
Rank 1
 answered on 17 Dec 2009
1 answer
152 views
How do we commit the changes made to data in a datagrid when using a dataset as a datasource.?

Ive tried using the tableapapter.update()
and
the radgridview.commitchanges()
methods but the changes are not persisted to the database.

Do we need to use the Telereik ORM (which I have never looked at)..will ORM work with access MDB's?

or should I work towards updating my access to sql and use entity models. (of which I have spent some time working so I'm familiar with it) ??
then just use the context.save() and let entity framework handle the plumbing

Suggestions, advice..Success/horror stories? 
Nedyalko Nikolov
Telerik team
 answered on 17 Dec 2009
1 answer
110 views
I'd like to bind SelectTime to a DateTime value, how can I do this ?
4ward s.r.l.
Top achievements
Rank 1
 answered on 17 Dec 2009
1 answer
100 views
I watched the "What's new" and saw the Ctrl-Home and End but I am wondering if the arrow navigation made it into the current relase?

Thanks,
-Sid.
Nedyalko Nikolov
Telerik team
 answered on 17 Dec 2009
1 answer
133 views
I was wondering if someone of the Telerik team could post the entire code project of the example given at http://www.telerik.com/help/wpf/gridview-selection-via-checkbox.html.

Thanks in advance.
Milan
Telerik team
 answered on 17 Dec 2009
1 answer
101 views
So, here is my problem.
I am new to teleric RadCharts for WPF and I wanted to draw a chart that has points who have 
1. Different shapes based on their values
2. Different animated tooltips when the user hovers over them (again) based on their values

Is this possible to do? Can some one please walk me through an approach?

Thanks
Giuseppe
Telerik team
 answered on 17 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?