Telerik Forums
UI for WPF Forum
2 answers
92 views

Hello everybody,

I have a RaDiagram which will be filled via MVVM.

Additionally my shapes and connections have custom properties - for the sake of convenience let's say every shape has a status property.

I customized the SettingsPane, so when entering a shape's SettingsPane I have a checkbox which changes the status property of the shape.
Checked -> shape.status = 1
Unchecked -> shape.status = 0

This is working fine.

Additionally I have a flag in my ViewModel which will be updated after the status change, so that my CanExecuteUndoCommand will set

1.e.CanExecute = True
2.e.Handled = True

 

Unfortunately the UndoRedoStack of the diagram tells me that there is nothing in the stack.
I guess that the UndoCommand (and of course the RedoCommand) only handles the default "Content" property of a shape.

Can you give me an example how I can extend your functionality, to the RadDiagram, that changing custom properties of a shape also fill the UndoRedoStack.

Thanks in advance,
Timon
Timon
Top achievements
Rank 1
 answered on 09 May 2017
1 answer
163 views

Hello Team,

 

I am getting 2 times row loaded getting fired in my application. How to handle this problem.

 

More detail : First time e.Row is GridViewHeaderRow and Second time e.Row is GridViewFooterRow.. But we are not using Footer row in our application.

 

How to handle this situation any help .

 

Thanks,

Sundar M.

 

Stefan
Telerik team
 answered on 09 May 2017
7 answers
231 views
I have implemented a chart which displays a dynamic set of series (displayed as points), using BitmapRenderOptions with a SeriesProvider in an MVVM environment.  However, I have been unable to figure out how to control the color of each series.  The color of the series lives in each DataObject instance in the ChartSeriesProvider Source collection.

I have been able to set the color of the series based on this value if I chart the data as a LineSeries (by setting the Stroke property in the LineSeries style within the CategoricalSeriesDescriptor.Style declaration), but I haven't found a solution for PointSeries' yet.  In other charts in the project (that don't require a SeriesProvider), I have been able to set the color for the point series via PointSeries.DefaultVisualStyle.

I am able to get each series to be a different color using a palette, but since I need the series to match a specific color, even a custom palette wouldn't work (as I have no way to link the correct color to the series).

I know that I can't use a PointTemplate, as I want/need the BitmapRenderOptions, so how do I bind the color?  I know there must be a simple solution that I'm missing!

Thanks
li
Top achievements
Rank 1
 answered on 09 May 2017
3 answers
599 views
Hi telerik,

We are plotting ScatterlineSeries on a RadCartesianChart. Works well.

However, as we plot several series in same chart, our users request a tooltip with the name of series to distinguish them.

I've tried to set the TooltipTemplate of the chart in which case I can get the tooltip for *points* and thought I could use that as a workaround and place Curve Name on each point. However, when I try to bind to an 'enriched' Datapoint I get an error as the points in the serie are ScatterDataPoints (though I've tried to add my 'customized' points, see below).

So I guess I'm missing the point here - or quite a few ;)

First of all, what is the recommended way of providing a serie-specific text on each curve as a tooltip?

And if my approach is not to far off, can you see what I do wrong?

Thanks,

Anders, Denmark

itemsSource.Add(new Rap1DDataPoint(valuesX[i], valuesY[i],curve.CurveName));

public class Rap1DDataPoint : DataPoint
{
    public string CurveName { get; set; }
 
    public Rap1DDataPoint(double x, double y, string curveName):base(x,y)
    {
        CurveName = curveName;
    }
}

var lineSeries = new ScatterLineSeries
                     {
                         ShowLabels = true,
                         ToolTip = legendHeader,
                         Stroke = serieColor,
                         StrokeThickness = 2,
                         //LegendLabel = legendHeader,
                         //SeriesDefinition = splineSeriesDefinition,
                         ItemsSource = itemsSource,
                         XValueBinding = new PropertyNameDataPointBinding("XValue"),
                         YValueBinding = new PropertyNameDataPointBinding("YValue"),
                         PointTemplate = pointTemplate                                   
                     };

Arvind
Top achievements
Rank 1
 answered on 08 May 2017
1 answer
247 views

Hi,

I want to achieve a radgrid view with nested collection. The twist is binding should create a new column and not like row details.

E.g. My data looks like

List<class1> lstObj1 = new List<class1>();

public class1

{

public string name;

public string id;

public List<class2> objClass2List = new List<class2>();

}

public class2

{

public string sub1;

public string sub2;

}

 

View should be like as attached:

Stefan
Telerik team
 answered on 08 May 2017
18 answers
565 views

Hi, I've got a situation where I need a chart to create a new line series based on user selection (i.e., user selects 3 Employees from a list of 10 to compare, and then the chart will show 3 Line series, each corresponding to the respective employee's annual revenue to date). 

Most of the examples rely on code-behind to create a new SeriesMapping and then add it to the chart's list of mappings. I'm curious if there would be any declarative way to account for a varying number of Series on a chart, similar to a DataTemplate used for other controls. To bind the number of Series to a collection where each Series binds to a sub-collection.

Here's a grid I have working for just one series:

<telerik:RadChart Name="LapTimes" DataContext="{Binding SelectedEmployees}" ItemsSource="{Binding Employee.SalesList}">
      <telerik:RadChart.SeriesMappings>
          <telerik:SeriesMapping LegendLabel="Employee">
              <telerik:SeriesMapping.SeriesDefinition>
                  <telerik:LineSeriesDefinition ShowItemLabels="False">                                            
                  </telerik:LineSeriesDefinition>                                        
              </telerik:SeriesMapping.SeriesDefinition>
              <telerik:SeriesMapping.ItemMappings>
                  <telerik:ItemMapping FieldName="SalesNum" DataPointMember="XValue"/>
                  <telerik:ItemMapping FieldName="SalesValue" DataPointMember="YValue"/>
              </telerik:SeriesMapping.ItemMappings>
          </telerik:SeriesMapping>
      </telerik:RadChart.SeriesMappings>
  </telerik:RadChart>

SelectedEmployees is an ObservableCollection<Employee> and each Employee type has an ObservableCollection<Sale>.

That actually shows the first Employee in the collection just fine. But, how would I template my RadChart in a way that for each Employee in SelectedEmployees there's a Line Series using that Employee's Sales collection - without using code-behind?
Martin Ivanov
Telerik team
 answered on 08 May 2017
2 answers
136 views

I have some functionality that I would like to have included in every instance of RadGridView in my application. This is on two events, DistinctValuesLoading and FilterOperatorsLoading.

 

I tried adding them via EventSetters in a global Style ResourceDictionary, but I'm getting error saying that they are not Routed Events.

 

Is  there another way to do this, or do I need to just add the functionality manually to every instance?

Mark
Top achievements
Rank 1
 answered on 05 May 2017
1 answer
240 views

I have a setup that each row detail contains a child gridview, and when parent row is expanded, the child gridview should show all its rows, ie. no scrollbar because we don't want "double" scrollbars.

The issue is when the child gridview has many rows (in our case, 100), it takes a while (~6s) from expand the parent row to display all children rows.

Do you have any tips to speed up this scenario?

Stefan Nenchev
Telerik team
 answered on 05 May 2017
1 answer
112 views

I have a RadGridView with ItemsSource bound to a collection of business objects.  The grid has a GridViewDataColumn bound to a property with a TwoWay binding.  The property has a validation attribute.

When the user is editing the cell, and presses <Enter>, the validation attribute's IsValid() method is invoked, and if validation succeeds, the griid navigates to the same column in the next row.  But if validation fails, the failure is visualized and the navigation does not occur.  In fact, any attempt to navigate away from the cell by any means causes validation, and if the validation fails, the navigation does not occur.  This is all good, and exactly as it should be.  Anything less would be wrong -- what's the point of validation if it doesn't force the user to enter valid data?

But here's my problem.  I also want the down and up arrows to navigate up and down while editing.  Seems as if it should be straight forward -- just preview KeyDown, handle up and down keys and execute the grid's MoveUp and MoveDown commands, right?  Wrong.  When the grid's MoveUp or MoveDown command is executed, the validation attribute's IsValid() method is still invoked, but a failed validation does not prevent the navigation.

This seems like such a routine requirement that I feel like I must be missing something.  The reason for the existence of the MoveUp, MoveDown, etc., commands seems to be the recognition that navigation controls might need to be more robust that the default behaviors.  But those command circumventing validation appears to make them useless.  Surely I'm just missing something.

 

Stefan
Telerik team
 answered on 05 May 2017
1 answer
50 views

Hi,

since we don't need the TimeRuler of the WeekView in our project, I've hid it and set the Minor/MajorTickLengthes to "1day", so all appointments of that day appear in one big cell.

Problem is, that - since the appointments happen at the "same time", they appear next to- instead of below each other.

When I activate the AllDayArea, my Appointments show up below each other but I still have the big - formerly TimeRuler - area, which I can't get rid of.

Any Ideas?

Thanks

ITC
Top achievements
Rank 1
 answered on 05 May 2017
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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?