Telerik Forums
UI for WPF Forum
2 answers
128 views

I'm having this weird issue with the RadChartView when I try to use label rotation to try to improve label legibility, but it seems like a lot of space is being wasted. I'm only adding the following code:

axisX.LabelTemplate = (DataTemplate)Resources["tinyTemplate"];
// The following lines are commented to achieve the noRotation.png image
axisX.LabelRotationAngle = -45;
axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;


<DataTemplate x:Key="tinyTemplate">
   <TextBlock FontSize="7pt"  Text="{Binding}" />
</DataTemplate>


axisX.LabelTemplate = (DataTemplate)Resources["tinyTemplate"];
axisX.LabelRotationAngle = -45;
axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;
Fabrice
Top achievements
Rank 1
 answered on 09 May 2016
1 answer
148 views

Hello,

I want to have a custom contextmenu per cell, I implemented this succesfully with the example given in this thread.

Now I want to add the functionality that the contextmenu will be displayed based on the row where the cursor is and the contextmenu is called, in another thread they point me to the RadContextMenu example of the Telerik Demos. 

So I created a custom class which inherits from the RadContextMenu and attach an implementation for the open event:

protected void GridViewContextMenu_Opened(object sender, RoutedEventArgs e)
{
    RadContextMenu menu = (RadContextMenu)sender;
    GridViewRow row = menu.GetClickedElement<GridViewRow>();
 
    if (row != null)
    {
        row.IsSelected = row.IsCurrent = true;
        GridViewCell cell = menu.GetClickedElement<GridViewCell>();
        if (cell != null)
        {
            cell.IsCurrent = true;
        }
    }
    else
    {
        menu.IsOpen = false;
    }
}

 

created 4 different contextmenus, 1 default and 3 other that depend on the cell where the user calls the contextmenu.

When I try setting this custom contextmenu in XAML as default for my GridView and as contextmenu for some cells using styles. I receive an InvalidOperationException stating that the given contextmenu is not a valid value for the ContextMenu property?

It worked with the regular ContextMenu, but when I change my custom ContextMenu to inherit from this class I cant call the function GetClickedElement<GridViewCell>()?

 

How can I solve this, I dont exactly understand why I get this exception with RadContextMenu and not with a regular ContextMenu.

Any help would be appreciated.

Regards,

 

Marcel

 

Stefan
Telerik team
 answered on 09 May 2016
5 answers
1.3K+ views

I'm trying to iterate through my RadGridView rows, but when I have more than 20 or 30 items, the loop doesn't get all rows.
For example: using this code in a radgridview with 5 items, I can get all of them and do whatever I want, but when my grid has more than 20 items, it gets only 10 rows. Is this a bug or something like that? How can I solve it?
Here's my code:

 

01.private List<object> ReturnListFounds(string text)
02.        {
03.            List<object> a = new List<object>();
04.            foreach (var item in myGrid.Items)
05.            {
06.                if (item == null)
07.                    continue;
08.                GridViewRow row = myGrid.ItemContainerGenerator.ContainerFromItem(item) as GridViewRow;
09. 
10.                if (row == null)
11.                    continue;
12. 
13.                foreach (GridViewCell cell in row.Cells)
14.                {
15.                    if (cell != null && cell.Value != null)
16.                    {
17.                        string str = cell.Value.ToString();
18. 
19.                        if (str.Equals(text, StringComparison.InvariantCultureIgnoreCase) || str.ToLower().Contains(text.ToLower()))
20.                        {
21.                            a.Add(row.Item);
22.                            break;
23.                        }
24.                    }
25.                }
26.            }
27. 
28.            return a;
29.        }

Dilyan Traykov
Telerik team
 answered on 09 May 2016
1 answer
223 views

Hello,
I am using RadCartesianChart with multiple series. I am using ScatterLineSeries. 

My requirement is, I want to click on ScatterLineSeries and show a Popup window with details related to that series.

Is it possible with RadCartesianChart and scatter lines series ? If so, how ? If not, what is the other way to do this ?

Petar Marchev
Telerik team
 answered on 09 May 2016
16 answers
486 views
I know you can double click the ScheduleView and show the add/edit appointment dialog, is it possible to show it using code behind (C#)?
Kalin
Telerik team
 answered on 09 May 2016
1 answer
128 views

I have a listbox which the user can drag from and drop on a scheduleview.. however I've restricted the user so that they can't drop back onto the listbox and therefore they also can't re-order the listbox.

To get this working was simple enough - however I had a bit of difficulty getting rid of the DropVisual that happens when you hover on the listbox with an item you are dragging.  (The visual I am talking about is the bar that appears above/below each listboxitem to indicate where it is going to drop - I want to get rid of this because the user can't drop here - I'm surprised its not supressed when AllowDrop is set to False).

I tried setting the DropVisualProvider to null on the Listbox itself - this in turn caused loads of silent NullReferenceExceptions and caused flickering when holding an item over the ListBox.  I then set the DropVisualProvider to a class which inherited from LinearDropVisualProvider and overrode the CreateDropVisual method to just return a blank StackPanel - this works flawlessly, but is there an easier/less hacky way of achieving this?

Masha
Telerik team
 answered on 09 May 2016
9 answers
347 views
I am trying use RibbonView in my prism project. I want to have each module inject its own Ribbon Tab . I have gotten this work following the PribbonViewPrism example project.

I have just one problem. I want the initial Screen to display a login control. This screen should not display the Ribbon View.

In all examples, the RibbonView is "baked into the shell". So, when I display the screen it shows the empty RibbonView.

I tried to add the RibbonView as a Module too. I added a ContentControl that is mapped to the "RibbonRegioon" in teh shell. Then I load the ribbonView and ribbontabs into this region. RibbonView is loaded and displayes. When I try and load a RibbonTab, it  does not work because,  RibbonView is not defined as a Region in the shell and is just another view.

How to get this to work?. Is there a way to load the RibbonView Region without displaying in the initial screen?
Kiril Vandov
Telerik team
 answered on 09 May 2016
2 answers
199 views

When the ribbon group is in collapsed mode and it contains a combo box, how can I prevent the group from closing when an item in the combo box is selected? It's causing some unwanted behavior due to other events attached to the combo box, which doesn't happen when the group is not collapsed.

Geoffrey
Top achievements
Rank 1
 answered on 09 May 2016
3 answers
179 views
Hi,
   i have a raddocking inside which radpanes are added. if i remove a radpane from raddocking it becomes float pane. Now if i overlap(not fully) the raddocking such that raddocking is beneath the toolwindow. if i click the radpane now, toolwindow remains top and raddocking is still below the toolwindow. But i want raddocking to come on top.
Kalin
Telerik team
 answered on 09 May 2016
1 answer
298 views

Hi,

I have a database in which images are stored by its URLs,

so I'd like to use the url to load image from viewmodel to view.

Thanks.

 

Todor
Telerik team
 answered on 09 May 2016
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?