Telerik Forums
UI for WPF Forum
7 answers
156 views
I'm trying to create an effect where sometimes elements of a RadChart are hidden, but I'm having problems on the Axes (X and Y). I would like to hide everything BUT the title on the Y Axis, and hide only the title on the X axis.

My problem is that this seems impossible to do through XAML, and the examples seem convinced that I'm using Expression and codebehind. I'm not, and I'm not, because charts may not be instantiated when this effect occurs, and will miss the event.  I'm bewildered by the various properties and classes for supporting an Axis. What is the difference between AxisYStyle, AxisY.Styles, and AxisYItemLabelStyle? The RadCharts' Axes seem to ignore whatever style I place on them, and the only way I'm seeing to achieve my effect is to hardcode it into the XAML, which is not what I want because this effect is supposed to be conditional.
Sia
Telerik team
 answered on 29 Apr 2011
1 answer
111 views

Hi,

 

I have a Pie Chart and the following code:

 

DataSeries series = new DataSeries();
series.Definition = new PieSeriesDefinition();
series.Definition.InteractivitySettings.SelectionMode = ChartSelectionMode.Single;
series.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Item;
 
series.Add(new DataPoint(1));
series.Add(new DataPoint(2));
series.Add(new DataPoint(3));
series.Add(new DataPoint(4));
radChart.DefaultView.ChartArea.DataSeries.Add(series);
radChart.DefaultView.ChartArea.SelectItem(0);

 

What I would like to do is to “pre-select” an item immediately after generating the chart. However, the SelectItem in my code doesn’t work because it seems the SelectItem needs the chart to first be rendered. If I call the SelectItem from a timer (and then the chart has been rendered), then it works. Is there a way to call the SelectItem when the chart hasn’t been rendered? Or is there a way to know when the chart and the different elements  have been generated so that the SelectItem will work?

 

Thanks!

Tsvetie
Telerik team
 answered on 29 Apr 2011
1 answer
100 views
Regarding grid view control, the "First Look" example shows a tab control for each row. We can also have a hierarchical grid as shown in "Custom Hierarchy" example. Can we have a grid for both functionalities together? Like we can goto 3rd level hierachy and on this level, we provide a tab for each record.
Vlad
Telerik team
 answered on 29 Apr 2011
1 answer
122 views
Hello!
Found one problem with radgridviev, which I dont know how to fix.

My scenario:

WPF app for .NET Framework 4
Windows 7 (x64) Ultimate
Version of Telerik dll's: 2011.1.419.40

Here's a structure of document that i'm querying from data source:
Client 
-- Animals
----- Receptions 
(there's other relations like Client - Contacts and so on...)

I show the data to user using the following hierarchy:

RadGridView (showing clients)
-- TabControl
----- RadGridView (showing animals)
---------- TabControl
--------------- RadGridView (showing receptions)


Now, for the problem:

Every RadGridView in hierarchy has handlers for: SelectionChanged, Deleted, RowEditEnded. 
When i add any of SelectionChanged, Deleted, RowEditEnded handler to receptions RadGridView my app shows only the clients grid (the topmost one) with "+" that's not expandable.
Without handlers everything (in leaf RadGridView) works as expected.
If i use a debugger it shows that i have exception: NullReferenceException that's throwed from GridViewRow.OnIsExpandedChanged.

Here's a part of xaml i use :
http://pastebin.com/84hQ9rAP

Any suggestions about what am i doing wrong?

EDIT: 

if i delete "RowStyleSelector="{StaticResource ReceptionRowStyleSelector}" and add handlers to my nested grid - then all seems to work again an there's no exception. But i have no row styling for grid.

That's my ReceptionRowStyleSelector code:

public class ReceptionRowStyleSelector : StyleSelector<br>  
{
  
public override Style SelectStyle(object item, DependencyObject container)
  {            
if (item is Reception)   
{  
            var reception = (Reception)item;
            if (reception.IsCompleted) return CompletedReception;
            
if (reception.IsCanceledByClient) return CanceledReception;
    
if (reception.IsClientNotified) return NotifiedReception;
 }
return DefaultStyle;
 }

...

Styles i use a very simple:

<local:ReceptionRowStyleSelector x:Key="ReceptionRowStyleSelector">
            <local:ReceptionRowStyleSelector.DefaultStyle>
                <Style TargetType="telerik:GridViewRow"></Style>
            </local:ReceptionRowStyleSelector.DefaultStyle>
            <local:ReceptionRowStyleSelector.CompletedReception>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="#4502FF49"/>
                </Style>
            </local:ReceptionRowStyleSelector.CompletedReception>
            <local:ReceptionRowStyleSelector.CanceledReception>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="#40000000"/>                
                </Style>
            </local:ReceptionRowStyleSelector.CanceledReception>
            <local:ReceptionRowStyleSelector.NotifiedReception>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="Background" Value="#4FA4B700"/>
                </Style>
            </local:ReceptionRowStyleSelector.NotifiedReception>
        </local:ReceptionRowStyleSelector>

Thanks, Alex Yakimaskiy

Vlad
Telerik team
 answered on 29 Apr 2011
3 answers
211 views
    <DataTemplate x:Key="CustomToolTipDataTemplate2" x:Name="toolTipTemplate2">
        <StackPanel Margin="10,5">
            <TextBlock FontWeight="Bold" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='NAME', StringFormat=County: {0}}" />
            <TextBlock x:Name="KPITip" FontFamily="Trebuchet MS" FontSize="12" Text="{Binding Converter={StaticResource ExtendedDataConverter}, ConverterParameter='PAT_EST', StringFormat='Percentage of Paternity Established: {0:0.##}'}" />
        </StackPanel>
    </DataTemplate>
</Grid.Resources>


How can I programmatically change the ConvertParameter in those TextBlocks and also change the Colorizer ExtendedPropertyName? I can't seem to figure out how to get to them.

Andrey
Telerik team
 answered on 29 Apr 2011
1 answer
149 views
Hi,

If a user double clicks on any element in the RadGridView the RowActivated event fires... This is especially annoying as you double click the text box in the filter options to select all text in the textbox (standard windows things) but this triggers the event.

Thanks,
Maya
Telerik team
 answered on 29 Apr 2011
1 answer
241 views
Is it possible to have a multiple column GridViewComboBoxColumn where the dropdown shows multiple columns - almost like another grid?

I've got a dropdown that concatenates 3 data points and it would be cool if the dropdown rendered a mini-grid of values instead of a list of concatenated string values.  Even cooler would be sorting and filtering within the min-grid...
Maya
Telerik team
 answered on 29 Apr 2011
5 answers
209 views
I'm trying to get a handle to the Grouping Event but I'm not having any luck.
Please Help.
Yavor Georgiev
Telerik team
 answered on 28 Apr 2011
3 answers
91 views
I have a WPF application which calls a dialog using the ShowDialog method and then sets the e.NewObject of the GridView event to the newly created row. Everything works very well, however I am attempting to change the ShowDialog calls to remove the synchronous actions. This is to get the code working in an XBap environment and to get it closer to Silverlight if a port is needed.

I am however baffled as to how to do this without blocking the UI thread to wait for the dialog information.

This is basically what I am doing now:

RadWindow NewWindow = new RadWindow();
  
NewWindow.ShowDialog();
e.NewObject = NewWindow.NewRow;

This is what I would like to do

RadWindow NewWindow = new RadWindow();
  
NewWindow.Closed += delegate
{
  e.NewObject = NewWindow.NewRow;
};
  
NewWindow.Show();
Yavor Georgiev
Telerik team
 answered on 28 Apr 2011
3 answers
225 views
Hi. I'm using the WPF RadTreeListView with EnableRowVirtualization = false and EnableColumnVirtualization = false. I hook the TreeListViewRow's IsExpandedChanged event and, in the handler, I go through all the RadTreeListView's Items. Ultimately, I want to get the item containers (the TreeListViewRows) for each item.

But when an row is collapsed (as opposed to expanded) all its child items disappear from RadTreeListView's Items collection! When I expand the row, the child items come back.

Even if virtualization were on, that should only affect the existance of TreeListViewRows, not the existence of Items. How do I fix this?

Thanks,
   Bob Alexander
Bob
Top achievements
Rank 1
 answered on 28 Apr 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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?