Telerik Forums
UI for WPF Forum
1 answer
190 views

I have a MVVM setup with GraphSource etc. as described in this example: http://docs.telerik.com/devtools/wpf/controls/raddiagram/populating-with-data/data-databinding

When I delete a node, the connecting edges are not getting deleted. I see this working in various other examples, but for me, the edges remain on the diagram. I found an old post from 2013 about this functionality not working, but I expect that in 2017, that bug has been fixed: http://www.telerik.com/forums/remove-connections-when-removing-node

Before I post more (code) details: Is the behavior expected to work? If yes, what's a good way to debug why edges are not getting correctly deleted for me?

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Jun 2017
1 answer
81 views

I'm trying to drag&drop from my radlistbox that has ItemSource with my Collection (by MVVM)

I valued RadDiagramShape.Tag property with my object, I would to send this one also.

But into ItemsChanged event I found Tag = null.

How can I do this?

DragDropManager.AddDragInitializeHandler(MacchineDaCaricareRadListBox, OnDragInitialize);
 
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
    args.AllowedEffects = DragDropEffects.All;
 
    //RadDiagramShape draggedShape = (args.OriginalSource as ListBoxItem).Content as RadDiagramShape;
    GruppoPianoDiCarico pallet = (args.OriginalSource as RadListBox).SelectedValue as GruppoPianoDiCarico;
 
    RadDiagramShape macchina = new RadDiagramShape()
    {
        Width = pallet.Lunghezza / SCALE,
        Height = pallet.Larghezza / SCALE,
        Content = $"[{pallet.NumeroRiga}] {pallet.Description.ToUpper()}",
        Tag = pallet
    };
    macchina.Geometry = ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape);
    macchina.Background = IMBALLO;
    macchina.Foreground = IMBALLO_TITLE;
    macchina.FontWeight = FontWeights.Bold;
    macchina.Stroke = Brushes.Black;
    macchina.StrokeThickness = 1;
    macchina.StrokeDashArray = new DoubleCollection(new Double[] { 5, 1 });
    macchina.FontSize = 20;
 
    List<RadDiagramShape> shapes = new List<RadDiagramShape>();
    shapes.Add(macchina);
    SerializationInfo serializaedInfo = SerializationService.Default.SerializeItems(shapes);
    args.Data = serializaedInfo;
}

 

private void topRadDiagram_ItemsChanged(object sender, DiagramItemsChangedEventArgs e)
{
    [...]

if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add)
{
foreach (var item in e.NewItems)
{
var currenItem = (RadDiagramShape)item;

//it founds Tag = null!!!!
if (currenItem.Tag.GetType() == typeof(GruppoPianoDiCarico))
{
var macchina = (GruppoPianoDiCarico)currenItem.Tag;

vm.MacchineDaCaricare.Remove(macchina);
vm.MacchineCaricate.Add(macchina);
}
}
}
}

Petar Mladenov
Telerik team
 answered on 02 Jun 2017
9 answers
118 views

Is it possible for the sparkline points to have unique tooltips?  I'd like the user to be able to hover over the sparkline and see XValue and YValue in a tooltip.

 

Thanks,

Bryan
Top achievements
Rank 1
 answered on 01 Jun 2017
2 answers
1.0K+ views

I am trying to make some gridview pannel.

I want to make fixed GridView width in the windows. like p1.png. but it can'not be stretched dynamically.

bacause p1.png is made as fixing width in the xaml code (like grid Width="1200" in grid, and my original window width is also 1200). but i don't want to fix width like this.

so i change the code like Width="*" in grid. then gridview pannel can be p2.png.

It shift all panel in window. I don't want it.

How to make fixed gridview Width on the window and can be dynamically stretched.

 

--my code

<Grid HorizontalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <telerik:RadGridView Name="tradeListPanel" AutoGenerateColumns="False" ItemsSource="{Binding tradeList}" ShowSearchPanel="True" FrozenColumnCount="7"
                             IsReadOnly="True" EnableRowVirtualization="False" EnableColumnVirtualization="False"
                             FontSize="12" telerikControls:StyleManager.Theme="Summer"
                             ShowColumnFooters ="True" RowIndicatorVisibility ="Collapsed"
                             IsSynchronizedWithCurrentItem ="True" RowDetailsVisibilityMode="VisibleWhenSelected" 
                             Margin="0,0,0,0" Padding="0,0,0,0">

            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="GridContextMenu" 
                                    ItemContainerStyle="{StaticResource MenuItemContainerStyle}"
                                    Opened="GridContextMenu_Opened"
                                    ItemClick="GridContextMenu_ItemClick"
                                    />
            </telerik:RadContextMenu.ContextMenu>

            <telerik:RadGridView.ControlPanelItems>
                <telerik:ControlPanelItem ButtonTooltip="Column chooser">
                    <telerik:ControlPanelItem.Content >
                        <ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <CheckBox Content="{Binding Header, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </telerik:ControlPanelItem.Content>

.................

................

</telerik:RadGridView>
    </Grid>

 

Thank you.

 

 

 

 

 

 

Dilyan Traykov
Telerik team
 answered on 01 Jun 2017
3 answers
274 views

Hi Telerik,

 

We are using a RadGridView bound to an ObservableCollection wrapped in a CollectionViewSource. Sorting a large number of rows seems to be slower than creating a new collection, sorting this collection using LINQ, then rebinding the RadGridView to the collection. We've attempted to use the QueryableCollectionView as the underlying collection source for the RadGridView and the performance is not improved over the CollectionViewSource when sorting (i.e. clicking on a column in the RadGridView to sort asc/desc/none).

Could you please offer suggestions to help speed up sorting performance? We have followed all suggestions in the "Degraded Performance" article for the UI for WPF suite. Please note that we are using proxy types for entities and prefer not to implement or derive from base classes.

For example, is there a WPF version for this article?:

http://www.telerik.com/support/kb/winforms/details/use-custom-comparer-to-speed-up-the-sorting-in-radgridview

 

Kind regards

Stefan
Telerik team
 answered on 01 Jun 2017
3 answers
98 views

Hi,

Is 2nd feature available in GanttView?

* Click in a Selects the row. Deselect all other rows (This one is existing)
* Hold Ctrl and Adds the row to the selection. Remove if already selected (the Addition is existing but the Remove is not)
* Hold Shift and Adds to the selection (This one is also existing)

Regards,

John

Dilyan Traykov
Telerik team
 answered on 01 Jun 2017
1 answer
181 views

Hi,

We are using your RadGridView in a lot of screens.

For the first time, we have to use the full text search (ctrl F) on a grouped gridview.

In our case (300 lines grouped in 6 groups), we are facing of some performance issue (which give the grid unusable for a final user: too slow).

Do you have a recommandation or best practices for the fulltext search ?

 

The problem disapear if we do that : control the lauch of the search after a timer of 300ms.
So, we change the RadGridView property IsSearchingDeferred="True" and add the following code in the code behind of our view (named ContractDocumentsView)

01....
02. 
03.// Constructor of ContractDocumentsView
04.        public ContractDocumentsView(IServiceLocator serviceLocator)
05.        {
06.            InitializeComponent();
07. 
08.            if (DesignerProperties.GetIsInDesignMode(this))
09.            {
10.                return;
11.            }
12. 
13.            // UserActionDelay is DispatcherTimer timer of 300 ms that execute an Action
14.            this.userActionDelay = new UserActionDelay(this.UpdateFilterOnSearchText);
15.            this.documentsGridView.SearchPanelVisibilityChanged += (sender, args) =>
16.            {
17.// We are keeping a var on the telerik GridViewSearchPanel, initialized once when SearchPanelVisibilityChanged
18.                if (this.gridSearchPanel != null)
19.                    return;
20. 
21.                if (args.NewVisibility == Visibility.Visible)
22.                {
23.                    // ChildrenOfType is a method that search in the visual tree children...
24.                    this.gridSearchPanel = this.documentsGridView.ChildrenOfType<GridViewSearchPanel>().First();
25.                    this.gridSearchPanel.PreviewTextInput += SearchViewPanelOnPreviewTextInput;
26.                }
27.            };
28.        }
29. 
30.        private void SearchViewPanelOnPreviewTextInput(object sender1, TextCompositionEventArgs textCompositionEventArgs)
31.        {
32.            this.gridSearchPanel.PreviewTextInput -= SearchViewPanelOnPreviewTextInput;
33.           var searchBox = this.gridSearchPanel.ChildrenOfType<TextBox>().First();
34.            searchBox.TextChanged += SearchTextBox_TextChanged;
35.        }
36. 
37.        private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
38.        {
39.            this.searchText = ((TextBox)e.OriginalSource).Text;
40.            userActionDelay.DoAction();
41.        }
42. 
43.        private void UpdateFilterOnSearchText()
44.        {
45.            var searchViewModel  = this.gridSearchPanel.DataContext as Telerik.Windows.Controls.GridView.SearchPanel.SearchViewModel;
46.            if (searchViewModel != null)
47.            {
48.                searchViewModel.SearchText = this.searchText;
49.            }
50.        }
51. 
52....
Stefan
Telerik team
 answered on 01 Jun 2017
0 answers
124 views

Hello,

I am trying to add row level validation for my RawTableParamView. RadGridView contains observable collection of SingleRow objects. This class extends from prism BindableBase. One of SingleRow properties is BindableDPDataItem which implements INotifyDataErrorInfo interface and checks if NewValue property showed in custom viewCell template is valid. I attach all important files here. Could you tell me how may I achieave row level validation and if its possible cell level validation for custom cell defined in RadGridView. I found your tutorial and git examples but don't understand how to configure RadGridView to look for BindableDPDataItem validation. Could you please show me how modify my code to make it work?

Maciej
Top achievements
Rank 1
 asked on 01 Jun 2017
2 answers
130 views

Is there a way to get the zoom and pan controls that are in the RapMap to be stand alone, or a way to use the RadMap as a container?  

 

Example, i have a simple display that I want the user to be able to interact with just like if it were a map.  But in this scenario, it could be anything within a RadPanl (or dockpanel).

Tyler
Top achievements
Rank 1
 answered on 31 May 2017
3 answers
361 views

I'm trying to understand the best path forward to implement a column of CheckBoxes in a RadGridView. The CheckBoxes need to be conditionally visible (or hidden) per row-level business logic (a boolean value for each row, a different property from the one represented in the CheckBox).

While I have been able to implement this successfully using a DataTemplateSelector, which switches in either a CellTemplate containing the CheckBox, or an "empty" CellTemplate... I am still having a challenge with controlling the UI behavior. What happens is if a user clicks the empty cell, it goes into Edit Mode, as if accepting text; I don't want this to happen... it should remain empty and not allow any interaction. For the cell with the CheckBox, I can click inside and toggle the CheckBox on and off (checked/unchecked), which is great... but if a user clicks just outside the CheckBox but still inside the cell where the CheckBox resides, it too will enter Edit Mode, as if accepting text (and it hides the CheckBox). Again, I don't want this to happen.

What's the best path for allowing only a CheckBox inside such a column, and disallowing any UI elements other than the conditionally appearing CheckBoxes?

Thanks in advance for your help.
Dilyan Traykov
Telerik team
 answered on 31 May 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?