Telerik Forums
UI for WPF Forum
1 answer
83 views
Hello Again;

I've recently hit up against another wall, in an attempt to use FluidContentControl within my TileViewItems I seem to lose data binding, charts that worked outside the control's properties no longer receive data, and same for data grids, I'm not sure how to proceed. The following is an example of my xaml (the small is meant to be 'blank' while the medium and large share the same content since I was experimenting with the controls), the chart is tied to an observable collection of objects each of which has an observable collection of 'dates' and 'decimal values' for which to populate the chart.

<telerik:RadTileViewItem Header="Equity"  MinimizedWidth="100">
                    <telerik:RadFluidContentControl>
                        <telerik:RadFluidContentControl.SmallContent>
                            <Grid Width="100"></Grid>
                        </telerik:RadFluidContentControl.SmallContent>
                        <telerik:RadFluidContentControl.Content>
                            <Grid>
                                <DockPanel LastChildFill="True">
                                    <telerik:RadLegend DockPanel.Dock="Bottom"   x:Name="legends" Items="{Binding ElementName=chartz, Path=LegendItems}" HorizontalAlignment="Center">
                                        <telerik:RadLegend.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <telerik:RadWrapPanel Orientation="Horizontal"/>
                                            </ItemsPanelTemplate>
                                        </telerik:RadLegend.ItemsPanel>
                                    </telerik:RadLegend>
                                    <telerik:RadCartesianChart DockPanel.Dock="Bottom" x:Name="chartz" Palette="Windows8" >
                                        <telerik:RadCartesianChart.Grid>
                                            <telerik:CartesianChartGrid MajorLinesVisibility="Y"/>
                                        </telerik:RadCartesianChart.Grid>
                                        <telerik:RadCartesianChart.Behaviors>
                                            <telerik:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Horizontal"/>
                                        </telerik:RadCartesianChart.Behaviors>
                                        <telerik:RadCartesianChart.HorizontalAxis>
                                            <telerik:DateTimeContinuousAxis LabelFitMode="Rotate" LabelFormat="dd MMM yyyy"/>
                                        </telerik:RadCartesianChart.HorizontalAxis>
                                        <telerik:RadCartesianChart.VerticalAxis>
                                            <telerik:LinearAxis HorizontalAlignment="Right"></telerik:LinearAxis>
                                        </telerik:RadCartesianChart.VerticalAxis>
                                        <telerik:RadCartesianChart.SeriesProvider>
                                            <telerik:ChartSeriesProvider Source="{Binding VisiblePortfolios}">
                                                <telerik:ChartSeriesProvider.SeriesDescriptors>
                                                    <telerik:CategoricalSeriesDescriptor ItemsSourcePath="EquityCurve" ValuePath="Value" CategoryPath="Date">
                                                        <telerik:CategoricalSeriesDescriptor.Style>
                                                            <Style TargetType="telerik:LineSeries">
                                                                <Setter Property="StrokeThickness" Value="2"/>
                                                                <Setter Property="LegendSettings" Value="{Binding Name, Converter={StaticResource SeriesSourceNameToSeriesLegendSettigsConverter}}"/>
                                                            </Style>
                                                        </telerik:CategoricalSeriesDescriptor.Style>
                                                    </telerik:CategoricalSeriesDescriptor>
                                                </telerik:ChartSeriesProvider.SeriesDescriptors>
                                            </telerik:ChartSeriesProvider>
                                        </telerik:RadCartesianChart.SeriesProvider>
                                    </telerik:RadCartesianChart>
                                </DockPanel>
                            </Grid>
                        </telerik:RadFluidContentControl.Content>
                        <telerik:RadFluidContentControl.LargeContent>
                            <Grid>
                                <DockPanel LastChildFill="True">
                                    <telerik:RadLegend DockPanel.Dock="Bottom"   x:Name="legend" Items="{Binding ElementName=chart, Path=LegendItems}" HorizontalAlignment="Center">
                                        <telerik:RadLegend.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <telerik:RadWrapPanel Orientation="Horizontal"/>
                                            </ItemsPanelTemplate>
                                        </telerik:RadLegend.ItemsPanel>
                                    </telerik:RadLegend>
                                    <telerik:RadCartesianChart DockPanel.Dock="Bottom" x:Name="chart" Palette="Windows8" >
                                        <telerik:RadCartesianChart.Grid>
                                            <telerik:CartesianChartGrid MajorLinesVisibility="Y"/>
                                        </telerik:RadCartesianChart.Grid>
                                        <telerik:RadCartesianChart.Behaviors>
                                            <telerik:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Horizontal"/>
                                        </telerik:RadCartesianChart.Behaviors>
                                        <telerik:RadCartesianChart.HorizontalAxis>
                                            <telerik:DateTimeContinuousAxis LabelFitMode="Rotate" LabelFormat="dd MMM yyyy"/>
                                        </telerik:RadCartesianChart.HorizontalAxis>
                                        <telerik:RadCartesianChart.VerticalAxis>
                                            <telerik:LinearAxis HorizontalAlignment="Right"></telerik:LinearAxis>
                                        </telerik:RadCartesianChart.VerticalAxis>
                                        <telerik:RadCartesianChart.SeriesProvider>
                                            <telerik:ChartSeriesProvider Source="{Binding VisiblePortfolios}">
                                                <telerik:ChartSeriesProvider.SeriesDescriptors>
                                                    <telerik:CategoricalSeriesDescriptor ItemsSourcePath="EquityCurve" ValuePath="Value" CategoryPath="Date">
                                                        <telerik:CategoricalSeriesDescriptor.Style>
                                                            <Style TargetType="telerik:LineSeries">
                                                                <Setter Property="StrokeThickness" Value="2"/>
                                                                <Setter Property="LegendSettings" Value="{Binding Name, Converter={StaticResource SeriesSourceNameToSeriesLegendSettigsConverter}}"/>
                                                            </Style>
                                                        </telerik:CategoricalSeriesDescriptor.Style>
                                                    </telerik:CategoricalSeriesDescriptor>
                                                </telerik:ChartSeriesProvider.SeriesDescriptors>
                                            </telerik:ChartSeriesProvider>
                                        </telerik:RadCartesianChart.SeriesProvider>
                                    </telerik:RadCartesianChart>
                                </DockPanel>
                            </Grid>
                        </telerik:RadFluidContentControl.LargeContent>
                    </telerik:RadFluidContentControl>
                </telerik:RadTileViewItem>

Your assistance is appreciated.
Peshito
Telerik team
 answered on 26 Aug 2013
5 answers
319 views
Hi,

I have bound to a TreeListView a collection of instances that raise the PropertyChanged from a thread that is not the main UI thread (the event is raised from a FileSystemWatcher event). When PropertyChanged is risen I meet the following exception:

InvalidOperationException was unhandled: The calling thread cannot access this object because a different thread owns it.

   en System.Windows.Threading.Dispatcher.VerifyAccess()
   en System.Windows.DependencyObject.GetValue(DependencyProperty dp)
   en Telerik.Windows.Controls.RadRowItem.get_Item() en c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\RadRowItem.cs:línea 30
   en Telerik.Windows.Controls.GridView.GridViewRow.BeginProcessDataItemPropertyChanged(Object dataItem, String propertyName) en c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRow.cs:línea 2201
   en Telerik.Windows.Controls.GridView.GridViewRow.Telerik.Windows.Data.IWeakEventListener<System.ComponentModel.PropertyChangedEventArgs>.ReceiveWeakEvent(Object sender, PropertyChangedEventArgs args) en c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRow.cs:línea 2196
   en Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) en c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:línea 33
   en System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   en RadControlsWpfApp1.NodoFile.OnPropertyChanged(String propiedad) en g:\Users\Ruben\Mis documentos\Visual Studio 2012\Projects\RadControlsWpfApp1\RadControlsWpfApp1\NodoFile.cs:línea 66
   en RadControlsWpfApp1.NodoFile.set_Nombre(String value) en g:\Users\Ruben\Mis documentos\Visual Studio 2012\Projects\RadControlsWpfApp1\RadControlsWpfApp1\NodoFile.cs:línea 42
   en RadControlsWpfApp1.NodoFile._watch_Renamed(Object sender, RenamedEventArgs e) en g:\Users\Ruben\Mis documentos\Visual Studio 2012\Projects\RadControlsWpfApp1\RadControlsWpfApp1\NodoFile.cs:línea 48
   en System.IO.FileSystemWatcher.OnRenamed(RenamedEventArgs e)
   en System.IO.FileSystemWatcher.NotifyRenameEventArgs(WatcherChangeTypes action, String name, String oldName)
   en System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   en System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

It really surprised me because I've previously bound other telerik WPF controls in an analogue situation and they worked flawlessly. Having a peek on GridViewRow.BeginProcessDataItemProperty I've noticed that it makes a call through the Dispatcher (which should avoid the exception) but the call to retrieve the dataItem for the row is outside the Dispatcher.BeginInvoke and that's (I pressume) the cause of the exception.

I don't know if this is intended behaviour or just a little bug but any feedback would be greatly appreciated.

Thanks in advance.


Rossen Hristov
Telerik team
 answered on 26 Aug 2013
1 answer
221 views
In WinForms there is (or was?) an attribute "[PasswordPropertyText(true)]" for displaying string properties as "*****" or something like that. How can I achieve this with WPF PropertyGrid?
Ivan Ivanov
Telerik team
 answered on 26 Aug 2013
1 answer
141 views
Hi, I have a RadPropertyGrid with a combination of predefined and auto-generated properties organized in groups. I'm trying to implement a feature that remembers expanded/collapsed state of each group.
There's no problem with saving those states, a simple foreach on GroupDefinitions collection with all the groups is sufficient when a view is closing. But I can't find an event to subscribe to on the RadPropertyGrid when the view is being generated and GroupDefinitions collection is not empty. I have tried Loaded, Grouped, IsVisibleChanged and many more but no luck so far. Only if I pause an application when the view is already showed I can verify, that GroupDefinitions collection is indeed not empty. Maybe there's something I've missed, so I would appreciate any help. Thanks!
Maya
Telerik team
 answered on 26 Aug 2013
5 answers
230 views
Hello,
Is there any reason why the dropdown would not have a Border?
Thanks in advance,
Steve
Masha
Telerik team
 answered on 26 Aug 2013
1 answer
79 views
Hi,

I need the following changes to be applied for my chart.

1. Display data item labels below the point marks in chart.
2. Need to remove green color for Data item labels in chart.
3. Display data item labels in vertical alignment as in desired chart(attachment).

Please find my attachments. I need to make my existing chart look-a-like desired chart.
I am using Q3 2011 version of telerik controls.


Regards,
Rakesh Kumar

Peshito
Telerik team
 answered on 26 Aug 2013
1 answer
97 views
Hello there,

is it possible to access a second SplitContainer in MVVM pattern in the ViewModel which is not the DocumentHost and add new Panes to it ? I have 2 Panes to search for Documents in a SplitContainer and want to re-add them to it in case that they have been closed by the user. The first SplitContainer contains the searchresults, which are editable, this is why that one is the DocumentHost. I can access the RadDocking in the ViewModel, which is passed to it as a CommandParameter. Thank you for your help!

Regards,
Achim
Vladi
Telerik team
 answered on 26 Aug 2013
1 answer
133 views
Hi,

I need to remove the point marks in attached radchart. Please find my attachment.Please let me know how can i achieve this.


Regards,
Rakesh Kumar
Peshito
Telerik team
 answered on 26 Aug 2013
1 answer
147 views
Hi,

I am executing sql queries that are returning over 100,000 rows.  The grid visualization handles these large results easily.  From what I can gather the rows visible on screen are in memory and the rest are in some kind of cache.  I am saving the results that I set in itemssource for future review where the client does not have access to the database. I want to provide a result viewer where the client can drill down on very large data sets using the excellent adhoc filtering capabilities of the grid   The major problem that I am having is the amount of time it takes to serialize and deserialize and sometimes getting out of memory.  Since the grids UI virtualization capabilities must have dealt with these issues in some form I was hoping that you could provide me with some ideas on how to handle the serialization problem.

The following shows the coding to get the data. clientData.Result is what needs to be serialized and deserialized.  As you can see this is generic code to handle any resultset.  

clientData.Result = new ObservableCollection<dynamic>()

while (dataReader.Read())
{
  Dictionary<string, object> clientRow = new Dictionary<string, object>();

         for (int i = 0; i < dataReader.FieldCount; i++)
         {
             string myKey = clientData.ColumnInfo[i].UniqueColumnName;
             object myValue = null;

             if (DBNull.Value != dataReader[i] && clientData.ColumnInfo[i].ProviderSpecificDataType != "Microsoft.SqlServer.Types.SqlHierarchyId")
             {
myValue = dataReader[i];
             }
             clientRow.Add(myKey, myValue);
         }
clientData.Result.Add(new CloudburstUtilities.ClientRow(ToDictionary(clientRow)));
}


public static IDictionary<string, object> ToDictionary(IDictionary<string, object> row)
{
            var dict = new Dictionary<string, object>();
            foreach (KeyValuePair<string, object> column in row)
            {
                dict.Add(column.Key, column.Value);
            }
            return dict;
 }

Thanks
Rich
Rossen Hristov
Telerik team
 answered on 26 Aug 2013
0 answers
164 views
Hi, I have:
1) Telerik 2013 Q2 SP1;
2) Entity Framework DB (Linq to MySql);
3) Simple table: FirstName(NotNull),  LastName(NotNull), Date(Null).
4) Checked for NULL (in MySQL DB and in my Project), i.e. both properties must be NotNull;
5) Made a row validation (it's working, but when I press ESC and then trying to edit another row => the TargetInvocationException fires or smth similar in files such as Cell....cs, Gridview.....cs - I even don't have it);
The question is how to prevent this?
Code:

private TestDB testDB;

public MainWindow()
{
InitializeComponent();
testDB = new testDBEntities();
radGridView.ItemsSource = testDB.Person;

}

private
void radGridView_AddingNewDataItem(object sender, GridViewAddingNewEventArgs e)
       {
           e.NewObject = new Person();
           testDB.Persons.Add((Person)e.NewObject);
       }
        
           private void radGridView_RowEditEnded(object sender, GridViewRowEditEndedEventArgs e)
       {
           if (e.EditAction == GridViewEditAction.Cancel)  return;
           if (e.EditOperationType == GridViewEditOperationType.Edit)
           {
                   testDB.SaveChanges();
                   radGridView.Rebind();
           }
           else if (e.EditOperationType == GridViewEditOperationType.Insert)
           {
               testDB.SaveChanges();
               radGridView.Rebind();
           }
       }
Dan
Top achievements
Rank 1
 asked on 25 Aug 2013
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?