Telerik Forums
UI for WPF Forum
3 answers
169 views

I am the lead developer for a WPF application used internally by my company.  It includes an automated error reporting subsystem, and our users occasionally throw this exception:

Stack
trace: at
System.Windows.Controls.ItemContainerGenerator.ContainerFromIndex(Int32 index)
at
Telerik.Windows.Controls.RadTreeView.UpdateTabStopOnSelectionFromUI(IEnumerable`1
selectedItems) at Telerik.Windows.Controls.RadTreeView.OnCollapsed(Object
sender, RadRoutedEventArgs e)

 

Originally I used a RadTreeView in the application where the users were throwing this exception, but after weeks of trying to track it down unsuccessfully I replaced the control with a stock TreeView.  Now there is no RadTreeView *anywhere* the users cause this, but the number of these exceptions hasn't diminished at all.

 

I am using 2015.1.401.45 release on .NET 4.5.1.

Milena
Telerik team
 answered on 04 May 2015
2 answers
354 views

Hi all ,,

 am using MVVM and Telerik controls ,

 I have RadGrid with one Column as checkbox template.

My requiremnt is to select only One checkbox in the Grid ,So if one  Row is Selected the others is Unselected Immediately or show Message that one Row is Selected.

is there any way to uses this scenario in MVVM or Code Behind.  

Stefan
Telerik team
 answered on 04 May 2015
5 answers
187 views
I'm using version v.2014.1.331.45.
I'm use RadGridView with dynamic row item.

<telerik:RadGridView Name="RadgridHoover"
                                     DockPanel.Dock="Top"
                                     BorderThickness="1,0,0,0"
                                     BorderBrush="LightGray"
                                     CanUserDeleteRows="True"
                                     CanUserInsertRows="True"
                                     ShowColumnHeaders="True"
                                     ShowGroupPanel="{Binding IsShowGroupPanel, Mode=TwoWay}"
                                     AlternateRowBackground="WhiteSmoke"
                                     AlternationCount="2"
                                     AutoGenerateColumns="False"
                                     SelectionMode="Multiple"
                                     IsReadOnly="True" 
                                     IsFilteringAllowed="True"
                                     EditTriggers="CurrentCellClick"
                                     SelectionUnit="FullRow"
                                     EnableColumnVirtualization="False"
                                     EnableRowVirtualization="True"
                                     RowIndicatorVisibility="Collapsed"
                                     GridLinesVisibility="Both"
                                     behaviors:GridColumnsBindingBehavior.Columns="{Binding Columns, Mode=TwoWay}"
                                     ItemsSource="{Binding MembersTable, Mode=TwoWay}"
                                     SelectedItem="{Binding SelectedItem}"
                                     caliburn:Message.Attach="[Event SelectionChanged] = [Action MembersGridSelectionChanged($executionContext)];[Event DataLoaded] = [Action GridDataLoaded($executionContext)];[Event LoadingRowDetails] = [Action LoadingRowDetails($executionContext)]"
                                     DataLoadMode="Asynchronous"
                                     >
            </telerik:RadGridView>

The issue is when i group by a column, then i remove item in group panel, the size of group panel is not resize correctly.

See the image is attached.

Please help me review and give me your ideas.
Yoan
Telerik team
 answered on 01 May 2015
1 answer
786 views

We have 2 Radlistboxes within a usercontrol.  We can drag and drop items between both with no issues and can reorder within each listbox with no issues either. Each radlistbox is highly stylized with grid's within each to create the look we need and to position data when drag and drop occurs.

What we would like to do is allow items from radlistbox1 to be dragged into radlistbox2.  However, we do not want the item from radlistbox1 to be removed.  Is there a built in function that would allow us to do this relatively simply? 

All examples (in documentation) and demo wpf drag and drop but remove items.  Let's see an example that matches what we need.  Documentation and forums have not given us an ideas on how to implement this functionality.

Any code examples would be helpful also.

Thanks

 See partial Code below for the user control

 

<UserControl.Resources>
        <Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem">
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding ExhibitType}" Value="CE">
                    <Setter Property="BorderBrush" Value="#DAF2CB"></Setter>
                    <Setter Property="Background" Value="#F2F7EF"></Setter>
                    <Setter Property="Margin" Value="0,2,0,2"></Setter>
                </DataTrigger>
            </Style.Triggers>
        </Style>

    </UserControl.Resources>

<telerik:RadListBox x:Name="RadListBox1" TabIndex="1" Grid.Row="0" Margin="0,5,0,0" FontSize="11" 
                                            SelectionMode="Multiple"  
                                            ItemContainerStyle="{StaticResource DraggableListBoxItem}">
                            <telerik:RadListBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid telerik:DragDropManager.AllowDrag="True" >
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>
                                        <Button x:Name="btnPreviewReportLayoutImage" Click="btnPreviewReportLayoutImage_Click" 
                                                Height="16" Width="16" Margin="3 0 3 0" Grid.Column="0" 
                                                ToolTip="Click On Image To View Report Layout" HorizontalAlignment="Left">
                                            <Button.Template>
                                                <ControlTemplate>
                                                    <Image Source="../Images/ReportImage2.png"  />
                                                </ControlTemplate>
                                            </Button.Template>
                                        </Button>
                                        <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Grid.Column="1"></TextBlock>
                                    </Grid>
                                </DataTemplate>
                            </telerik:RadListBox.ItemTemplate>
                            <telerik:RadListBox.DragVisualProvider>
                                <telerik:ScreenshotDragVisualProvider />
                            </telerik:RadListBox.DragVisualProvider>
                            <telerik:RadListBox.DragDropBehavior>
                                <telerik:ListBoxDragDropBehavior />
                            </telerik:RadListBox.DragDropBehavior>
                        </telerik:RadListBox>

 

<telerik:RadListBox x:Name="RadListBox2" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" Margin="2,5,2,2" FontSize="11"
                                        AllowDrop="True" SelectionMode="Multiple" 
                                        ItemContainerStyle="{StaticResource DraggableListBoxItem}"
                                        ScrollViewer.CanContentScroll="True">
                        <telerik:RadListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid telerik:DragDropManager.AllowDrag="True" >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="400" />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="140" />
                                        <ColumnDefinition Width="2*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Name}" TextWrapping="Wrap"></TextBlock>
                                    <ComboBox x:Name="cbGroupLevel" Grid.Column="1" SelectedValuePath="Content" SelectedValue="{Binding Grouping}" Margin="0 0 15 0" >
                                        <ComboBoxItem>E</ComboBoxItem>
                                        <ComboBoxItem>P</ComboBoxItem>
                                        <ComboBoxItem>-</ComboBoxItem>
                                    </ComboBox>
                                    <ComboBox x:Name="cbTOCLevel" Grid.Column="2" SelectedValuePath="Content" SelectedValue="{Binding TOCLevel}" Margin="0 0 15 0">
                                        <ComboBoxItem>0</ComboBoxItem>
                                        <ComboBoxItem>1</ComboBoxItem>
                                        <ComboBoxItem>2</ComboBoxItem>
                                        <ComboBoxItem>3</ComboBoxItem>
                                        <ComboBoxItem>4</ComboBoxItem>
                                    </ComboBox>
                                    <ComboBox x:Name="cbPortfolios" Grid.Column="3" SelectedValuePath="Content" 
                                              SelectedValue="{Binding Portfolios}" Margin="0 0 15 0">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal">
                                                    <CheckBox IsChecked="{Binding IsSelected}" Width="20" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                        <ComboBoxItem IsSelected="True">All</ComboBoxItem>
                                        <ComboBoxItem>Placeholder</ComboBoxItem>
                                        <ComboBoxItem>Placeholder</ComboBoxItem>
                                        <ComboBoxItem>Placeholder</ComboBoxItem>
                                        <ComboBoxItem>Placeholder with a very long name.......................</ComboBoxItem>
                                        <ComboBoxItem>Placeholder</ComboBoxItem>
                                        <ComboBoxItem>Placeholder</ComboBoxItem>
                                        <ComboBoxItem>Placeholder</ComboBoxItem>
                                    </ComboBox>
                                    <TextBlock Grid.Column="4" Text="{Binding TOCTitle}"></TextBlock>
                                </Grid>
                            </DataTemplate>
                       </telerik:RadListBox.ItemTemplate>
                        <telerik:RadListBox.DragVisualProvider>
                            <telerik:ScreenshotDragVisualProvider />
                        </telerik:RadListBox.DragVisualProvider>
                        <telerik:RadListBox.DragDropBehavior>
                            <telerik:ListBoxDragDropBehavior AllowReorder="True"/>
                        </telerik:RadListBox.DragDropBehavior>

                    </telerik:RadListBox>

Nasko
Telerik team
 answered on 01 May 2015
2 answers
226 views

I have a custom usercontrol that is replacing the ContentTemplate for a RadDiagramShape. This usercontrol has a listbox containing other usercontrols.

I'm wondering how I can have the RadDiagram drag and selection events captured for the parent shape when clicking on items in the inner listbox?

 

Thanks

Terry
Top achievements
Rank 1
 answered on 30 Apr 2015
1 answer
234 views

I am using an HtmlFormatProvider to export HTML from a RichTextBox to a database field that eventually gets used in a report for SSRS. Thanks to the many settings available in HtmlExportSettings, I've been able to get very close to a format that works with SSRS. The biggest problem I have remaining is that the SSRS docs specifically state that font-size specified in 'px' units are not supported. Yet those are the only units I've been able to get the HtmlFormatProvider to export the font-size.

 Is there a way to change the units used in the font-size when exporting HTML?

Thank you!

Petya
Telerik team
 answered on 30 Apr 2015
3 answers
3.5K+ views
Good morning, all.

Does Telerik have a WPF textbox? I'm looking for a control for basic input, like the standard MS textbox. I'm new to Telerik so I may have just overlooked this.
Vanya Pavlova
Telerik team
 answered on 30 Apr 2015
3 answers
252 views

Hi,

 

I want to use Pan without press Ctrl. I have reach this result using the advice from the following thread

 http://www.telerik.com/forums/pan-without-ctrl-being-pressed

Now, I want to improve this functionality and when I select one or more shapes and/or connections I want  to deselect them when I click out of the select area. Is there a way to reach this result?

Thanks 

 Ciro

Martin Ivanov
Telerik team
 answered on 30 Apr 2015
13 answers
508 views
How do i position RadDiagramContainerShape? I tried setting Position in code behind but it does not work.

thanks,
John
Pavel R. Pavlov
Telerik team
 answered on 30 Apr 2015
1 answer
332 views

Seems it is impossible to use RadTabItem.HeaderTemplate if RatTabControl is not binded to collection.

Using Snoop i see that template itself is applied but DataContext is null. So any binding don't work in the template.

http://docs.telerik.com/devtools/wpf/controls/radtabcontrol/templating/item-templates-and-selectors say "The HeaderTemplate is mainly used when we bind the RadTabControl to a collection". ). It doesn't say that it is used ONLY for collection.

 

HeaderForeground seem is ignored completely. Using Snoop i see that foreground is taken from some resources if i don't use HeaderTemplate.

 

 

 

Kiril Vandov
Telerik team
 answered on 30 Apr 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?