Telerik Forums
UI for WPF Forum
1 answer
164 views
Hello,
I am using Telerik version 2012.1
What I am trying to do is to build a chart with a single source of data. But the source, the chart type, and the color should be able to be selected in drop down comboboxes. I am having trouble figuring out how to get the color set, don't know if it is because I have a generic chart in the XAML and am setting the series definition in an attached property, or if there is another reason. Below is a sample of my code, let me know if you need more. Thank you,

Eli

        <charting:RadChart Grid.Row="3"<br>                           PaletteBrushesUseSolidColors="True"<br>                           Name="lineChart"><br>          <br>            <attached:SeriesMapper.BindingInfo><br>                <attached:SeriesBindingInfo DataTable="{Binding DataTable}"<br>                                            EmissionsTemplate="{Binding Template}" /><br>            </attached:SeriesMapper.BindingInfo><br><br>            <charting:RadChart.DefaultView><br>                <Charting:ChartDefaultView><br>                    <Charting:ChartDefaultView.ChartLegend><br>                        <Charting:ChartLegend Name="legend3" /><br>                    </Charting:ChartDefaultView.ChartLegend><br>                    <Charting:ChartDefaultView.ChartArea><br>                        <Charting:ChartArea LegendName="legend3"<br>                                            Legend="{Binding Template.CurrentTemplate}"><br>                            <Charting:ChartArea.ZoomScrollSettingsX><br>                                <Charting:ZoomScrollSettings ScrollMode="ScrollAndZoom"<br>                                                             MinZoomRange=".005" /><br>                            </Charting:ChartArea.ZoomScrollSettingsX><br><br>                            <Charting:ChartArea.AxisX><br>                                <Charting:AxisX DefaultLabelFormat="{Binding AxisXLabelFormat}"<br>                                                LabelStep="12"<br>                                                Title="Date"<br>                                                LayoutMode="Between" /><br>                            </Charting:ChartArea.AxisX><br>                            <Charting:ChartArea.AxisY><br>                                <Charting:AxisY AutoRange="True"<br>                                                Title="{Binding Template.SelectedYColumn.Alias}"<br>                                                ExtendDirection="None" /><br>                            </Charting:ChartArea.AxisY><br>                        </Charting:ChartArea><br>                    </Charting:ChartDefaultView.ChartArea><br>                </Charting:ChartDefaultView><br>            </charting:RadChart.DefaultView><br>        </charting:RadChart>

<br>        private static SeriesDefinition CreateSeriesDefinition(string seriesType)<br>        {<br>            SeriesDefinition series = null;<br><br>            switch (seriesType)<br>            {<br>                case "Line":<br>                    series = CreateLineSeriesDefinition();<br>                    break;<br>                case "Scatter":<br>                    series = CreateScatterSeriesDefinition();<br>                    break;<br>                case "Spline":<br>                    series = CreateSplineSeriesDefinition();<br>                    break;<br>            }<br><br>            series.Appearance.Foreground = new SolidColorBrush(SystemColors.ControlDarkColor);<br>            return series;<br>        }
Sia
Telerik team
 answered on 15 Mar 2012
2 answers
431 views
I have a page with a telerik RadGridView and a couple of buttons.  I'd like clicking the buttons to select the previous/next rows from the grid.  So I'm trying out RadGridViewCommands from the button's Click events:

private void prevButton_Click(object sender, RoutedEventArgs e)
{
    var cmd = RadGridViewCommands.MovePrevious as RoutedUICommand;
    cmd.Execute(null, myGrid);
}

The various move commands change the focus, but they do not change the selected row.

I've tried MoveUp, followed by SelectCurrentItem, but that doesn't seem to change the selection at all.

Ideas?
Jeff
Top achievements
Rank 1
 answered on 15 Mar 2012
6 answers
418 views
This has probably been asked / answer previously - I couldn't find what I was looking for in my searches, though.

I've got a WPF RadTreeView set up, on WPF 4, with the last 2010 release of the Telerik WPF 4 controls. I've enabled drag & drop within my Treeview, and I am able to correctly drag the selected object (an "Equipment" class) within my treeview.

I've looked at the sample apps that show how to drag an item from a RadTreeview to a Textbox and set up everything correctly, according to the sample. Dragging a basic piece of text, like the example shows, works. However, dragging my Equipment class from the treeview to the Textbox (a standard WPF textbox) does not work. It constantly tells me that the drop is not allowed, even though I've implemented the DragQuery event and set e.QueryResults = true

any tips, tricks, or tutorials to help me get my situation working?
Petar Mladenov
Telerik team
 answered on 15 Mar 2012
4 answers
353 views
Hi!

Maybe its better i start a new Thread for this.
I reffer to this old Topic: http://www.telerik.com/community/forums/wpf/gridview/need-to-change-background-color-of-a-row-based-on-a-condition.aspx

i'am using the StyleSelector to change the background of an GridViewRow in runtime. But i also want to implement an AlternateRowBackground, but - as Tony in the other Topic said - when i set the AlternateRowBackground and AlternationCount-Property in my Grid the StyleSelector doesnt work.
I don't want to create two different Styles for normal Rows and AlternateRows.
Is it possible to set both, RowStyleSelector and AlternateRowBackground or is their a way to implement the AlternateRowBackground in my StyleSelctor? Can i differ if the call comes from the AlternateStyleSelctor or from the RowStyleSelector?


Thank you for your help
Alex
Alexander
Top achievements
Rank 1
 answered on 15 Mar 2012
1 answer
181 views
When I open Backstage in - let say - Word, I can (at once) navigate with the arrow and tabkeys.
I can navigate to buttons like Close and Save and then use the enter-key to execute the methods.
I try to do the same in the RadViews backstage, but it won't work.
How could I get this expected behavior in this backstage?
I tried IsSelectable, IsStapstop and more, but could not get i right.
The keyboardnavigation in Telerik example of the BackStage (Telerik editor) does not work either.

<telerik:RadRibbonBackstage>
<telerik:RadRibbonBackstageItem Header="Modules" IsDefault="true">
<Grid>
....
</Grid>
</telerik:RadRibbonBackstageItem>

<telerik:RadRibbonBackstageItem Header="Setup">
<Grid>
....
</Grid>
</telerik:RadRibbonBackstageItem>

<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Open" Icon="open.png" Click="OpenClick" />
<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Edit"    Icon="edit.png" Click="EditClick" />
<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Save"  Icon="save.png" Click="SaveClick" />

<telerik:RadRibbonBackstageItem IsGroupSeparator="True"/>

<telerik:RadRibbonBackstageItem CloseOnClick="True" Header="Close" Icon="close.png" Click="CloseClick" />

</telerik:RadRibbonBackstage>

Viktor Tsvetkov
Telerik team
 answered on 15 Mar 2012
1 answer
162 views
Hi,

I use Telerik V2010.3.1314.35

I have a TabControl with 2 TabItems, the first one contain a text and the second one contain  RadCarousel with 3 images. Of course, the default TabItme is the first one (the one who contain the text). When I star my application, I add my text to my first TabItem and I add my 3 images into my carousel. After adding my images to my carousel, I do the following:

carousel.BringDataItemIntoView(carousel.Items[0]);

After finishing reading my text, I click on my second tab to see the first image of my carousel and it's not there, I have to click on the carousel navigation button to see my images...

xaml:
                                    <telerik:RadCarousel Background="Transparent" ToolTip="{StaticResource ObtainCarouselFullscreen}" Name="SignCtxDocsCarousel" MouseRightButtonDown="SignCtxDocsCarousel_MouseRightButtonDown" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" IsSynchronizedWithCurrentItem="True">
                                                <telerik:RadCarousel.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <telerik:RadCarouselPanel Path="{StaticResource horizontalPath}"/>
                                                    </ItemsPanelTemplate>
                                                </telerik:RadCarousel.ItemsPanel>
                                            </telerik:RadCarousel>

code:
-------

carousel.Items.Add(img);

if

 

(carousel.Items.Count > 0)

 

{

carousel.BringDataItemIntoView(carousel.Items[0]);


}


Thank's
Dimitrina
Telerik team
 answered on 15 Mar 2012
1 answer
101 views
Is there a way to prevent the panelbaritem from collapsing.... or better yet.  to stop all the panelbaritems inside of a panelbar from collapsing ?
Petar Mladenov
Telerik team
 answered on 15 Mar 2012
1 answer
295 views
Hi,

I am using RadTreeView in my WPF application and binding it to an object. Which is working as expected.

Problem: Whenever I add new item in RadTreeView or edit any existing item, I reload my RadTreeView binding object. But I always end up with my either my root node as selected or child of root node. I want my new item (which I have added recently) or edited item to be selected. In my case I have a root node and it can have any number of child node, and those child nodes can have any number of child node. So I have 3 level hierarchy. But after I refresh my binding object (which is TreeViewDataSource in my case) I always end up with my second level and third level never expands.

My XAML code for RadTreeView is:

<Grid >
                            <Grid.Resources>
                                <!--Data template for the Sensor object-->
                                <HierarchicalDataTemplate x:Key="SensorTemplate">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/MORASS;component/Images/Sensor.png" />
                                        <TextBlock Text="{Binding SensorName}" Margin="2" />
                                    </StackPanel>
                                </HierarchicalDataTemplate>
                                <!--Data template for the Logger object-->
                                <!--<Image Source="/MORASS;component/Images/Logger.png">-->
                                <HierarchicalDataTemplate x:Key="LoggerTemplate"
                                                          ItemTemplate="{StaticResource SensorTemplate}"
                                                          ItemsSource="{Binding Sensor}">
                                    <StackPanel Orientation="Horizontal">
                                        <Image>
                                            <Image.Style>
                                                <Style TargetType="{x:Type Image}">
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding IsManualType}" Value="false">
                                                            <Setter Property="Source" Value="/MORASS;component/Images/Logger.png"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding IsManualType}" Value="true">
                                                            <Setter Property="Source" Value="/MORASS;component/Images/Logger-Manual.png"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Image.Style>
                                        </Image>
                                        <TextBlock Text="{Binding LoggerDescription}" Margin="2" />
                                    </StackPanel>
                                </HierarchicalDataTemplate>
                                <!--Data template for the Location object-->
                                <HierarchicalDataTemplate  
                                        x:Key="LocationTemplate"  
                                        ItemsSource="{Binding Logger}"
                                        ItemTemplate="{StaticResource LoggerTemplate}">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/MORASS;component/Images/Location.png" />
                                        <TextBlock Text="{Binding LocationName}" Margin="2" />
                                    </StackPanel>
                                </HierarchicalDataTemplate>
                            </Grid.Resources>
                            <telerik:RadTreeView Name="radTreeViewMain" SelectedItem="{Binding SelectedItemNode}" IsLineEnabled="True" SelectedValuePath="{Binding Type}" SelectionChanged="radTreeViewMain_SelectionChanged"  >
                                <telerik:RadTreeViewItem Header="Locations" IsExpanded="True" ContextMenu="{Binding Source={StaticResource TreeContextMenu}}" ItemsSource="{Binding TreeViewDataSource}" ItemTemplate="{StaticResource LocationTemplate}">
                                    
                                </telerik:RadTreeViewItem>
                            </telerik:RadTreeView>
</Grid>


Any help will be highly appreciated.

Regards,
Moon
Petar Mladenov
Telerik team
 answered on 15 Mar 2012
1 answer
120 views
Hi All,

I am having the  parent RadGridView  and its RowDetailsTemplate has one more RadGridView
As my requirement is to display the data by Type and by classification.  I am binding the both parent and child RadGridView  with ObservableCollection with data refresh interval of 3 seconds. 

Issue is when i expand the child  RadGridView  and able to view data after 3 seconds new data binding entire parent and child GridView rows set to closed state.  ( user is unable to view the data properly )

I want data to refresh automatically and also user need to  expand and view the child rows properly. 

Please help me how to achieve this.  waiting for reply.



Regards,
Vivek
Vivekanand
Top achievements
Rank 1
 answered on 15 Mar 2012
0 answers
76 views
Hi,

I am using RadGridView in WPF application and binding it to a DataTable view. For my RadGridView I have set AutoGenerateColumns as "True" (to get my columns automatically).
 
Problem: In DataTable object (which I am binding to RadDataGridView) I have one DateTime column. In RadDataGridView it only shows Date calender in the dropdown for picking date, but no time. More over I want to change date format for DateTime column. As AutoGenerateColumns  is true, I don't have any control over the columns. Can anyone please show me how to show RadDateTimePicker in RadGridView column when AutoGenerateColumns is True?

My XAML code for RadGridView  is as below:

<telerik:RadGridView Grid.Row="1" AutoGenerateColumns="True" ItemsSource="{Binding ManualDataTable}" IsReadOnly="False" CanUserDeleteRows="True"  Name="radGridViewManualData" ShowInsertRow="True" />

Any help will be highly appreciated.


Regards,
Moon
Moon
Top achievements
Rank 1
 asked on 15 Mar 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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?