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 imageaxisX.LabelRotationAngle = -45;axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;<DataTemplate x:Key="tinyTemplate"> <TextBlock FontSize="7pt" Text="{Binding}" /></DataTemplate>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; }}
I 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
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. }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 ?
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?
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.
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.