Telerik Forums
UI for WPF Forum
1 answer
91 views

Hello,

I have been digging through the documentation and I am unable to find any information on the ability to include the header/row values when copying the cells from a pivot grid.  The actual values copy in to excel just fine, but I would like to include the header/row values.

Would someone be able to point me in the right direction?  Thank you.

Dinko | Tech Support Engineer
Telerik team
 answered on 18 Dec 2017
2 answers
1.3K+ views

Hey guys,

since i dont get it to work since 3 hours now i registered here in the hope you have a solution.

I have a GridView in my View:

<tel:RadGridView ItemsSource="{Binding CompareTablesResultView, Mode=OneWay}" ColumnWidth="Auto" x:Name="grdComparedData"
                         IsFilteringAllowed="False" CanUserReorderColumns="False" CanUserFreezeColumns="False"
                         CanUserSortColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" ShowGroupPanel="False"
                         tel:StyleManager.Theme="Windows7" DataLoaded="grdComparedData_DataLoaded">
        </tel:RadGridView>
        <tel:RadDataPager x:Name="DataPager" Source="{Binding Items, ElementName=grdComparedData}"
                          PageSize="30"  Grid.Row="1" tel:StyleManager.Theme="Windows7"/>

The GridView Itemssource is bound to a DataView Property in my ViewModel.

The DataView is simply the .DefaultView of the Datatable i want to display.

With the data in my datatable i did some validation. In my validation i receive information which cells are invalid (rownumber and columnnumber/columnname).

Now my target is to set the style for the cells that are invalid (foreground color to red). But i cant get it working to get the GridViewCell based on the infos if have.

In some forum posts i saw code like MyGridView.Rows(index).Cells(anotherIndex) but the RadGridView dont have an accessable Row property for me.

I also tried some other things to get the cell like to get access the .Items Property or some attempts with the .ChildrenOfType<> method but nothing worked for me.

Is there any way to set the Cell-Style for a specific cell when bound to a DataTable or DataView? I cant use a cellstyle selector cause its not the value of the cell itself that is invalid, its only invalid in the context of row and column. The same value can be valid in another row or in another column.

You guys have any ideas?

Could i mark the DataView Cell in any way that i could react from a cellstyle selector on it or something like that?

Stefan
Top achievements
Rank 1
 answered on 18 Dec 2017
3 answers
166 views
I would like to be able to create a bar chart dynamically and assign the color of the series based on the selected slice of the pie chart.  I am using the ChartSelectionBehavior_SelectionChanged event but I am not sure where to get the color of the pie slice from the ChartSelectionChangedEventArgs provided by the event.  I am using the Windows8 palette for my pie chart.
Martin Ivanov
Telerik team
 answered on 18 Dec 2017
14 answers
593 views
When I drag the scrollbar in a RadGridView, OnDragInitialize is called. I can't find anything in the DragInitializeEvenArgs that could tell me whether the user is dragging the rows (in which case I am interested) or dragging the scrollbar (in which I want to ignore it). Ditto for the sender (the RadGridView). Its IsScrolling property is set to false whether I am scrolling or not.

How can I just do dragging when the user has chosen rows, and not other controls such as the scrollbar or vertical frozen column separator.
Jay
Top achievements
Rank 1
 answered on 15 Dec 2017
2 answers
232 views

Sirs,

I'm using RadVirtualGrid with a Custom DataProvider and I would like to format its columns where some columns would fit their width to their content, others to their cells' content, some columns would have their cells aligned to left, others to right, and so on.

I mean I want to apply a different style to each column in my RadVirtualGrid, however I don't know how to handle these styles.

Thanks in advance,

Vladimir Stoyanov
Telerik team
 answered on 15 Dec 2017
4 answers
1.9K+ views

I'm trying to bind EditEnding to my ViewModel with a RadDataForm

I get a null object to my command method. I need to have access to the EditAction property of the EditEndedEventArgs but I'm getting nada. 

Here's my ViewModel info:

public ReservePartViewModel()
{
    EditEndingCommand = new Telerik.Windows.Controls.DelegateCommand(OnEditEnding);
}
 
public ICommand EditEndingCommand { get; set; }
 
private void OnEditEnding(object obj)
{
    if (obj is EditEndedEventArgs)
    {
        var args = obj as EditEndingEventArgs;
        //do stuff here?
    }
}

 

Here's my View info:

<telerik:RadDataForm CurrentItem="{Binding}" AutoEdit="True" CommandButtonsVisibility="Commit,Cancel">
    <telerik:EventToCommandBehavior.EventBindings>
        <telerik:EventBinding Command="{Binding EditEndingCommand}" EventName="EditEnding" />
    </telerik:EventToCommandBehavior.EventBindings>
</telerik:RadDataForm>
Vladimir Stoyanov
Telerik team
 answered on 15 Dec 2017
1 answer
92 views

Hi,

 

I'm changing my winform application into WPF therefore i need to se the equivalent docking methods for WPF.

In winform I was using Raddock.RemoveWindow(window, DockWindowCloseAction.CloseAndDispose) while disposing the DockControl, I want to know it's equivalent method for WPF docking.

 

Thanks.

Dilyan Traykov
Telerik team
 answered on 15 Dec 2017
3 answers
100 views

Hi,

I have a project where we are creating recurring appointments in the ScheduleView. The date of the last occurrence is very important to the rest of the system. Is there a built-in way to determine the actual date of the last occurrence of a recurring appointment? I am not allowing the "no date" or "end after x occurrences" options, only the "end by" option. However, I can't rely on this date, because the last occurrence can occur before this date.FYI: I have a number of database queries that work based on the actual end date of an appointment, so this is why I need to calculate the date of the last occurrence.

Thanks!

Kalin
Telerik team
 answered on 15 Dec 2017
0 answers
86 views

when the window is display at a big monitor

I hide the RadRibbonView by click the expander  on the right ,when click a RadRibbonTab  header  the RadRibbonTab's width is not stretch to the screen' width

How to resolve this

 

rui
Top achievements
Rank 1
 asked on 15 Dec 2017
5 answers
202 views

I have three questions for my project. The output is attached.

  1. The first one is the tooltip is not shown. I tried both DefaultVisualStyle and PointTemplate. This is the main thing so I post it in ToolTip sub-forum.
  2. I want to line up the legend and Y axis. Which means the left side of colorful squares line up with the Y axis of the chart. I guess may  e ItemsPanel can be changed. 
  3. Because I added margin to the series Margin="30,0". So the entire series shifts to the right. a little. Notice the right side the series is beyond the line scope. Is it possible to extend the line so the series is still within the line.
<Grid>
       <StackPanel>
           <telerik:RadCartesianChart Palette="Windows8" Height="300">
               <telerik:RadCartesianChart.Behaviors>
                   <telerik:ChartTooltipBehavior Placement="Top" />
               </telerik:RadCartesianChart.Behaviors>
               <telerik:RadCartesianChart.VerticalAxis>
                   <telerik:LinearAxis Margin="0 0 20 0" MajorTickLength="0" LineStroke="Transparent">
                       <telerik:LinearAxis.LabelStyle>
                           <Style TargetType="TextBlock">
                               <Setter Property="Margin" Value="0 0 10 0" />
                           </Style>
                       </telerik:LinearAxis.LabelStyle>
                   </telerik:LinearAxis>
               </telerik:RadCartesianChart.VerticalAxis>
               <telerik:RadCartesianChart.HorizontalAxis>
                   <telerik:CategoricalAxis Margin="0 20 0 0" MajorTickLength="0" LineStroke="Transparent"/>
               </telerik:RadCartesianChart.HorizontalAxis>
 
               <telerik:AreaSeries CategoryBinding="Category" ValueBinding="YValue"
                               ItemsSource="{Binding Items}" Fill="Blue" Margin="30,0">
                   <telerik:AreaSeries.TooltipTemplate>
                       <DataTemplate>
                           <ItemsControl ItemsSource="{Binding Converter={StaticResource MyConverter}}">
                               <ItemsControl.ItemTemplate>
                                   <DataTemplate>
                                       <TextBlock Text="{Binding}" FontSize="14">
                                       </TextBlock>
                                   </DataTemplate>
                               </ItemsControl.ItemTemplate>
                           </ItemsControl>
                       </DataTemplate>
                   </telerik:AreaSeries.TooltipTemplate>
                   <telerik:AreaSeries.DefaultVisualStyle>
                       <Style TargetType="Path">
                           <Setter Property="Fill" Value="Transparent"/>
                       </Style>
                   </telerik:AreaSeries.DefaultVisualStyle>
               </telerik:AreaSeries>
 
               <telerik:RadCartesianChart.Grid>
                   <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
               </telerik:RadCartesianChart.Grid>
           </telerik:RadCartesianChart>
           <telerik:RadLegend>
               <telerik:RadLegend.ItemsPanel>
                   <ItemsPanelTemplate>
                       <telerik:RadWrapPanel Orientation="Vertical" ItemWidth="120" />
                   </ItemsPanelTemplate>
               </telerik:RadLegend.ItemsPanel>
               <telerik:RadLegend.Items>
                   <telerik:LegendItemCollection>
                       <telerik:LegendItem MarkerFill="#FF55AA33" MarkerStroke="Black" Title="Legend item 1" />
                       <telerik:LegendItem MarkerFill="#FFCC3399" MarkerStroke="Black" Title="Legend item 2" />
                       <telerik:LegendItem MarkerFill="#FF5511BB" MarkerStroke="Black" Title="Legend item 3" />
                       <telerik:LegendItem MarkerFill="#FF55AA33" MarkerStroke="Black" Title="Legend item 4" />
                       <telerik:LegendItem MarkerFill="#FFCC3399" MarkerStroke="Black" Title="Legend item 5" />
                       <telerik:LegendItem MarkerFill="#FF5511BB" MarkerStroke="Black" Title="Legend item 6" />
                       <telerik:LegendItem MarkerFill="#FF55AA33" MarkerStroke="Black" Title="Legend item 7" />
                       <telerik:LegendItem MarkerFill="#FFCC3399" MarkerStroke="Black" Title="Legend item 8" />
                       <telerik:LegendItem MarkerFill="#FF5511BB" MarkerStroke="Black" Title="Legend item 9" />
                   </telerik:LegendItemCollection>
               </telerik:RadLegend.Items>
           </telerik:RadLegend>
       </StackPanel>
   </Grid>

The converter is simple, it is just returning a string.

public class MyConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return "Test";
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

Thanks.

Trump
Top achievements
Rank 1
 answered on 14 Dec 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?