Telerik Forums
UI for WPF Forum
2 answers
148 views
I have an MVVM WPF app with a RadTreeListView that is populated via a Generic List<T> using nested sets from a database. Only the first column of the TreeListView gets populated. What class would be appropriate to replace the generic List so that I can pass multiple columns of data to the TreeListView?

I posted this same question, with code, on the WPF Forum of MSDN and was told that my existing approach with List<T> should work with the TreeListView.  I was also told that since the question involves a third party control, i.e., Telerik, I should move the question to the Telerik forum.

My xaml showing the data binding:
<telerik:RadTreeListView.Columns>
  <telerik:GridViewDataColumn DataMemberBinding="{Binding Tag}"
                              Header="Tag"
                              Width="Auto"/>
  <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}"
                              Header="Description"
                              Width="Auto" />
  <telerik:GridViewDataColumn DataMemberBinding="{Binding ImportedEquipmentType}"
                              Header="Imported Equipment Type"
                              Width="Auto"/>       
</telerik:RadTreeListView.Columns>
The "Description" and "Imported Equipment Type" columns do not get populated.

My code for my data class is as follows. My xaml ItemSource is bound to Children:

public class TagItem
{
    public List<TagItem> _children = new List<TagItem>();
    public List<TagItem> Children
    {
        get { return _children; }
    }
    public string EquipmentID { get; set; }
    public string SystemID { get; set; }
    public string Tag { get; set; }
    public string TagNodeText { get; set; }
    public string Tag2 { get; set; }
    public string Description { get; set; }
    public string Description2 { get; set; }
    public string ImportedEquipmentType { get; set; }
    public string ManuallyAdded { get; set; }
    public string ParentID { get; set; }
    public string NodeLeft { get; set; }
    public string NodeRight { get; set; }
    public string Depth { get; set; }
    public string Mpath { get; set; }
}

The constructor for my navigator ViewModel is:
readonly EquipmentListTreeViewModel _equipmentTree;
 
public EquipmentListNavigator()
{
    InitializeComponent();
 
    // Get raw family tree data from a database.
    TagItem rootTagItem = Database.GetEquipmentTree();
 
    // Create UI-friendly wrappers around the
    // raw data objects (i.e. the view-model).
    _equipmentTree = new EquipmentListTreeViewModel(rootTagItem);
 
    // Let the UI bind to the view-model.
    base.DataContext = _equipmentTree;
}

And the service that fills the list:
public static TagItem GetEquipmentTree()
{
    nTI.Tag = "ASSET REGISTER";
    FillTreeView("", nTI);        
    return nTI;
}
 
private static void FillTreeView(string currKeyRoot, TagItem nTI = null)
{
    DataRows.MyRow row = drows.GetNextRow();
    while (row != null)
    {
        if (NodeStartsWith(row.MPath, currKeyRoot))
        {
            TagItem tnChild = new TagItem();
            tnChild.SystemID = row.SystemID;
            tnChild.EquipmentID = row.EquipmentID;
            tnChild.Description = row.Description;
            tnChild.ParentID = row.ParentID;
            tnChild.Mpath = row.MPath;
            tnChild.Depth = row.Depth;
            tnChild.Tag = row.Tag;
            tnChild.Tag2 = row.Tag2;
            tnChild.Description2 = row.Description2;
            tnChild.ImportedEquipmentType = row.ImportedEquipmentType;
            tnChild.ManuallyAdded = row.ManuallyAdded;
            tnChild.NodeLeft = row.NodeLeft;
            tnChild.NodeRight = row.NodeRight;
 
            nTI.Children.Add(tnChild);                   
            FillTreeView(row.MPath, tnChild);
        }
        else
        {
            drows.MovePrev();
            return;
        }
        row = drows.GetNextRow();
    }


All of this works except that the tree is populated only in the "Tag" column. "Description" and "Imported Equipment Type" are blank.
Rob
Top achievements
Rank 1
 answered on 09 Oct 2012
1 answer
97 views
Hi,

we use in our application the Telerik OfficeBlue theme, does anybody know how to to get the OfficeBlue theme for the GridSplitter and RadExpander component???

Both of these components are white (too many shade of white in my RadWindow) actually and the splitter doesn't have the "....." indicator so for a user it's a little bit difficult to find where he havr to achor the splitter to change his window disposition.

Thank's
Tina Stancheva
Telerik team
 answered on 09 Oct 2012
1 answer
159 views
Hi,

we use VS2008 and Telerik V2012.2.912.35 and we have a docking application with 4 pans and when we start to undock a pan, the pan we start to undock start shaking....

When the pan is is floating and we start to dock it, no problem. If we start to undock it again, the pan start shaking again.

One thing to consider, in my XAML is have such kind of binding for each RadPane:
IsHidden="{Binding ElementName=Me, Path=PaneVisibility}

This binding is to hide each RadPanel when I change the Visibility of my main window.

Any thought???

Thank's
Konstantina
Telerik team
 answered on 09 Oct 2012
3 answers
310 views
Hi there,

We have an application that uses the RadRichTextBox multiple times in the same dialog, one for each row of data. Each RadRichTextBox makes use of spellchecking. What we've found is that with spellchecking enabled, the memory is not released when the dialog is closed, while it is mostly reclaimed when spellchecking is disabled.

I might be wrong, but what I've figured from using ANTS Memory Profiler is that it seems to be attributed to the DataChanged event on the SpellChecker; the event doesn't seem to be unsetting when the host object should be disposed. This appears to be causing all related controls to remain in memory.

As this control is heavily used in our app, the problems quickly add up, and we've seen OutOfMemoryExceptions occur. The attached file shows the ANTS results. Notice the memory usage between the blue and red markers at the top - the rise in memory usage is attributed to repeatedly opening and closing the same item.

Any assistance with this would be greatly appreciated.
Alex
Telerik team
 answered on 09 Oct 2012
1 answer
90 views
Hi,  
      I have found an issue with find and replece functionality. Actually while find and replace process the text box does not copy the format and styles while replacing text in Replaceall command. It does work with replace commond but with ReplaceAll its not. Can any one suggest me some thing in this regard thanks.
Vasil
Telerik team
 answered on 09 Oct 2012
2 answers
171 views
Hello, I have a WCF Web Service, that makes a SQL query  to a data base and returns  a DataSet with the data.
In my WPF browser app I have a gridView and it's ItemsSource is the DataSet that the service returns, at first I got this code:

  if (grid.ItemsSource == null)
  {
      //Creates the reference for the duplex Service
      InstanceContext instanceContext = new InstanceContext(new CallbackHandler());
      ServiceReference1.ServiceDuplexClient client2 = new ServiceDuplexClient(instanceContext);
       
      this.Cursor = System.Windows.Input.Cursors.Wait;
      //Call the service functon that returns the DataSet
      DataSet ds = client2.EventSummary();
      this.Cursor = System.Windows.Input.Cursors.Arrow;
 
      if (ds != null)
      {
          if (ds.DataSetName.Equals("OK"))
          {
              //If it's OK the DataSet is the ItemsSource of the grid
              grid.ItemsSource = ds;
          }
     }
}

It works fine, and does what it's supposed to do, the call to the service takes some moments, so I decided to change the cursor to a clock, but once I had it all working I like to change it for a busy indicator, so I added it to my code:

<telerik:RadBusyIndicator x:Name="busyIndicator" BusyContent="Loading data...." Grid.ColumnSpan="3" Grid.RowSpan="3">

a
public partial class Page1 : Page
{
   //Declare my background worker
    BackgroundWorker workerOperAct = new BackgroundWorker();
     
     public Page1()
     {
     InitializeComponent();
        workerOperAct.DoWork += this.WorkerOperActDoWork;
     workerOperAct.RunWorkerCompleted += WorkerOperActRunWorkerCompleted;
     }
     
     private void WorkerOperActDoWork(object sender, DoWorkEventArgs e)
    {
        //Create the reference for the service
        InstanceContext instanceContext = new InstanceContext(new CallbackHandler());
     ServiceReference1.ServiceDuplexClient client2 = new ServiceDuplexClient(instanceContext);
        //Call the service function that returns the DataSet
     DataSet ds = client2.EventSummary();
     if (ds != null)
     {
          if (ds.DataSetName.Equals("OK"))
              {
                grid.ItemsSource = ds;
              }
      
}
  }
    void WorkerOperActRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
        grid.Visibility = Visibility.Visible;
           this.busyIndicator.IsBusy = false;
    }
    //More code....
}

It's the same code, and it should work, but when I try to call the service:
DataSet ds = client2.EventSummary();

I get an exception:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in Unknown Module.
Additional information: Index was out of range. Must be non-negative and less than the size of the collection.

If I remove the busy indicator and the background worker it works fine and I can't understand what's happening, I have no clue,
I hope somebody can help me.
Thanks!!

Rocio
Top achievements
Rank 1
 answered on 09 Oct 2012
5 answers
178 views
I create an RadChart in the code and i want to export it to a file "png".
I disabled animations!

Now the point is in PieSeriesDefinition & LineSeriesDefinition this is correctly working, but in the BarSeriesDefinition & StackedBarDefinition is painting everything except of the bars!

See screenshots..

Any clue why this could occur? I think the BarSeries has some additional Animations?


Nikolay
Telerik team
 answered on 09 Oct 2012
1 answer
260 views

when i use the chart,and use chart.Series[0].ItemsSource = tempDrw ( here the tempDW is a double type array; to draw the line like the attachment.

but i have a problem: when the data in the tempDrw change but the chat can not updata.

Petar Marchev
Telerik team
 answered on 09 Oct 2012
6 answers
157 views
I have a scatter series where all the values are aligned at Y == 1.0. The RadChart is inside a grid with a gridsplitter controlling the space available for the RadChart. Now, if I scale the view vertically, sometimes values are displayed incorrectly (see red triangles in the example screenshots below). This issue doesn't appear always, but often enough to be a serious problem for us. If the problem occurs, the only way to fix it is to resize the RadChart again, horizontally (always fixes the problem) or vertically (usually fixes the problem, sometimes the problem reappears).

We are not changing the data bindings or anything like that, we are simply rescaling the grid view with the gridsplitter. With the data in the screenshots it is very easy to see that triangles were rendered at incorrect Y-values. But we have other visualizations where the scatter data is not aligned to a single Y axis value and we can't afford the items to be displayed at incorrect values!

I'm limited to version Q2 2011, what can we do to fix this?

   - Jussi

View opens:


After scaling vertically:


And after additional scaling:


Here's an example of the blue and red scatter series, both using exactly the same data binding:


Obviously, this is not acceptable.
Ves
Telerik team
 answered on 09 Oct 2012
3 answers
212 views
We are currently using the RadPropertyGrid control to display information for different types of Business Objects. We're also using the Command pattern to support undo / redo functionality for certain actions (adding a new Business Object, removing a Business Object, etc.).

What we would like to be able to do is somehow hook our RadPropertyGrid into our Undo/Redo Service. We have considered listening to the PropertyChanged event of the object that is currently being display through the RadPropertyGrid, but wanted to see if anyone else had tackled this problem before, or could point us in the correct direction.

Any help would be greatly appreciated.

Thanks,
Derrick
Vlad
Telerik team
 answered on 09 Oct 2012
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?