Telerik Forums
UI for WPF Forum
9 answers
377 views
Hello!

We have an issue with databinding and raddocking mode change. 
When you switch to floating mode, the databind fails.
After you swich back to docked state/tabbed document, the databinding works again.
We experienced this issue when we had a usercontrol inside of the radpane. Also tried to manually update the datacontext at every panestatechange, but when the pane was in tabbed document mode by default, it just made it worse (it failed, and never get works again).

Here's a small code piece we used to make our proof-of-concept:

Window1.xaml
<telerikDocking:RadDocking HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" AllowUnsafeMode="True" x:Name="InfoPanel_RadDocking">
            <telerikDocking:RadDocking.DocumentHost>
                <telerikDocking:RadSplitContainer >
                    <telerikDocking:RadPaneGroup telerikDocking:ProportionalStackPanel.RelativeSize="1000,400">
                        <telerikDocking:RadPane x:Name="InfoPane" Header="Pane1" BorderThickness="0" >
                            <TelerikDockingBugPOC:DemoControl />
                        </telerikDocking:RadPane>
                        <telerikDocking:RadPane x:Name="Pane2" Header="Pane2" BorderThickness="0" IsEnabled="{Binding Path=LayoutStateHandler.IsWagnisTabEnabled, Mode=OneWay}">
                        </telerikDocking:RadPane>
                        <telerikDocking:RadPane x:Name="Pane3" Header="Pane3" BorderThickness="0">
                        </telerikDocking:RadPane>
                    </telerikDocking:RadPaneGroup>
                </telerikDocking:RadSplitContainer>
            </telerikDocking:RadDocking.DocumentHost>
        </telerikDocking:RadDocking>

The Democontrol.xaml:
<Grid Background="LightGreen">
        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"  Text="{Binding DemoText}" />
   </Grid>

The binding points to a dummy string property of Window1 (so it's NOT in the Democontrol.xaml.cs).

We're using the latest version of radcontrols.

Thank you for your help!

Greetings, 
Thomas
Kalin
Telerik team
 answered on 27 Mar 2014
4 answers
200 views
I am using a Unity dependency container and microsoft Prism. I am injecting views into my docking panels, and this works fine. I have a button on Pane  A that injects a new view into Pane B. Both of these panes are docked. If I undock ether of the panes and click the button in Pane A, the region manager cannot find the region anymore, and I get the following exception.

An unhandled exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in Microsoft.Practices.Prism.dll
Additional information: The region manager does not contain the MapInteractionPanel region.

This is the line that causes the exception:
 IRegion region = regionManager.Regions["MapInteractionPanel"];

This works PERFECTLY fine if I leave both panes docked, so clearly the telerik docking is doing something when it undocks. Any ideas? Thanks.
None
Top achievements
Rank 1
 answered on 27 Mar 2014
4 answers
171 views
Hello!
I have Self-referenced hierachical GridView sach as:

<telerik:RadGridView RowIsExpandedChanged="RadGridView1_OnRowIsExpandedChanged" DataLoadMode="Asynchronous" AutoGenerateColumns="False" DataLoading="RadGridView1_OnDataLoading" GroupRenderMode="Flat"  ItemsSource="{Binding Path=., Mode=TwoWay}" x:Name="RadGridView1" ShowGroupPanel="False" Grid.Row="3" Grid.ColumnSpan="2">
            <telerik:RadGridView.Resources>
                <DataTemplate x:Key="CellTemplateForColorOfLinesEdit">
                    <telerik:RadColorPicker SelectedColorChanged="OnSelectedColorChanged" SelectedColor="{Binding StoreLayouts[0].ColorForLines.Color, Mode=TwoWay}"></telerik:RadColorPicker>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForColorOfLines">
                    <Border Background="{Binding StoreLayouts[0].ColorForLines}">
                        <TextBlock></TextBlock>
                    </Border>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForX">
                    <telerik:RadNumericUpDown ValueChanged="OnXValueChanged"  Value="{Binding StoreLayouts[0].X, Mode=TwoWay}" CustomUnit="м." NumberDecimalDigits="2" ValueFormat="Numeric" SmallChange="0.01"/>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForY">
                    <telerik:RadNumericUpDown ValueChanged="OnYValueChanged" Value="{Binding StoreLayouts[0].Y, Mode=TwoWay}" CustomUnit="м." NumberDecimalDigits="2" ValueFormat="Numeric" SmallChange="0.01"/>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForWidth">
                    <telerik:RadNumericUpDown ValueChanged="OnWidthChanged" Value="{Binding StoreLayouts[0].Width, Mode=TwoWay}" CustomUnit="м." NumberDecimalDigits="2" ValueFormat="Numeric" SmallChange="0.01"/>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForHeight">
                    <telerik:RadNumericUpDown ValueChanged="OnHeightChanged" Value="{Binding StoreLayouts[0].Height, Mode=TwoWay}" CustomUnit="м." NumberDecimalDigits="2" ValueFormat="Numeric" SmallChange="0.01"/>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForGWidth">
                    <telerik:RadNumericUpDown ValueChanged="OnGridWidthChanged" Value="{Binding StoreLayouts[0].Grid_width, Mode=TwoWay}" CustomUnit="м." NumberDecimalDigits="2" ValueFormat="Numeric" SmallChange="0.01"/>
                </DataTemplate>
                <DataTemplate x:Key="CellTemplateForGHeight">
                    <telerik:RadNumericUpDown ValueChanged="OnGridHeightChanged" Value="{Binding StoreLayouts[0].Grid_height, Mode=TwoWay}" CustomUnit="м." NumberDecimalDigits="2" ValueFormat="Numeric" SmallChange="0.01"/>
                </DataTemplate>
            </telerik:RadGridView.Resources>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Наименование" DataMemberBinding="{Binding Storename}"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Цвет линий" CellTemplate="{StaticResource CellTemplateForColorOfLines}" CellEditTemplate="{StaticResource CellTemplateForColorOfLinesEdit}" ></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Шаг сетки по ширине" CellTemplate="{StaticResource CellTemplateForGWidth}"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Шаг сетки по высоте" CellTemplate="{StaticResource CellTemplateForGHeight}"></telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.FilterDescriptors>
                <telerik:FilterDescriptor Member="Storeparentid" Operator="IsEqualTo" Value="null"></telerik:FilterDescriptor>
            </telerik:RadGridView.FilterDescriptors>
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition>
                    <telerik:GridViewTableDefinition.Relation>
                        <telerik:TableRelation IsSelfReference="True">
                            <telerik:TableRelation.FieldNames>
                                <telerik:FieldDescriptorNamePair
                            ParentFieldDescriptorName="Storeid"
                            ChildFieldDescriptorName="Storeparentid" />
                            </telerik:TableRelation.FieldNames>
                        </telerik:TableRelation>
                    </telerik:GridViewTableDefinition.Relation>
                </telerik:GridViewTableDefinition>
            </telerik:RadGridView.ChildTableDefinitions>
        </telerik:RadGridView>


With my data there are 5 level of nested grid. I have another tree view with this hierarchy. My goal is to synchronize opened element between this 2 control. But my nested GridView filled in code behid sach as:

 var datacontrol = (RadGridView)sender;
            if (datacontrol.ParentRow == null) return;
            datacontrol.ShowGroupPanel = false;
            datacontrol.AutoGenerateColumns = false;
            datacontrol.DataLoadMode = DataLoadMode.Asynchronous;
            var storeNameColumn = new GridViewDataColumn { DataMemberBinding = new Binding("Storename"), Header = "Наименование" };
            datacontrol.Columns.Add(storeNameColumn);
            var storeTypeName = new GridViewDataColumn { DataMemberBinding = new Binding("StoreType.StoreTypeName"), Header = "Тип" };
            datacontrol.Columns.Add(storeTypeName);
            var storeNumber = new GridViewDataColumn { DataMemberBinding = new Binding("Storenumber"), Header = "Номер" };
            datacontrol.Columns.Add(storeNumber);
            var xColumn = new GridViewDataColumn { Header = "X", CellTemplate = RadGridView1.Resources["CellTemplateForX"] as DataTemplate, UniqueName = "XCOL" };
            datacontrol.Columns.Add(xColumn);
            var yColumn = new GridViewDataColumn { Header = "Y", CellTemplate = RadGridView1.Resources["CellTemplateForY"] as DataTemplate };
            datacontrol.Columns.Add(yColumn);
            var widthColumn = new GridViewDataColumn { Header = "Ширина", CellTemplate = RadGridView1.Resources["CellTemplateForWidth"] as DataTemplate };
            datacontrol.Columns.Add(widthColumn);
            var heightColumn = new GridViewDataColumn { Header = "Высота", CellTemplate = RadGridView1.Resources["CellTemplateForHeight"] as DataTemplate };
            datacontrol.Columns.Add(heightColumn);
            var colorPickerColumn = new GridViewDataColumn
            {
                DataMemberBinding = new Binding("ColorForLines"),
                Header = "Цвет линий",
                CellTemplate = RadGridView1.Resources["CellTemplateForColorOfLines"] as DataTemplate,
                CellEditTemplate = RadGridView1.Resources["CellTemplateForColorOfLinesEdit"] as DataTemplate
            };
            datacontrol.Columns.Add(colorPickerColumn);
            var gridWidthColumn = new GridViewDataColumn { CellTemplate = RadGridView1.Resources["CellTemplateForGWidth"] as DataTemplate, Header = "Шаг сетки по ширине" };
            datacontrol.Columns.Add(gridWidthColumn);
            var gridHeightColumn = new GridViewDataColumn { CellTemplate = RadGridView1.Resources["CellTemplateForGHeight"] as DataTemplate, Header = "Шаг сетки по высоте" };
            datacontrol.Columns.Add(gridHeightColumn);

As I understand the event  DataLoading="RadGridView1_OnDataLoading" occures when row is expanded. Before that moment I can't find element in nested grid. My querstion is:
1)How to force DataLoading event for all nested grid (I want for the grid will be loaded immediately and full without rise DataLoading event)
2)How to find element in nested grid (may be on 3 or 4 level)
3)Is it possible to expand element in nested grid and recursevly expand all his parent row.
Sorry for my English. 



ilusha
Top achievements
Rank 1
 answered on 27 Mar 2014
1 answer
119 views
Hello,
when using the Office2013 theme, the TextBox and PasswordBox have not the same internal margin at the left of the text. This makes the display strange when they are displayed one below the other.
Patrick
Yordanka
Telerik team
 answered on 27 Mar 2014
1 answer
181 views
I have a RadListBox that I am loading about 3000 items into.  I am using a CollectionViewSource so that I can group on a certain attribute of the object.  It takes like a minute to load the items into the Listbox.  I know it takes a hit with the grouping.  Is there anything I can do to speed it up?  Does RadListbox virtualization get turned off on grouping just like the Microsoft control? Because even after things are loaded, just scrolling up and down is slow.  The who control doesn't run well.
George
Telerik team
 answered on 27 Mar 2014
1 answer
177 views
Hi,
I need to retrieve data in datagrid from database with all colors and images.

Can you please help me on this...

Thanks,
vij
Dimitrina
Telerik team
 answered on 27 Mar 2014
3 answers
133 views
I have a chart that loads with both PanAndZoom enabled. I am experimenting with zoom and in my constructor I am setting zoom as follows:

myRadCartesianChart.Zoom = new Size(10, 1);

When I do this, the pan and zoom bar is always on the far left side by default. Is there a way I can set the initial PanAndZoom so that it is set from the right? So if my X-axis is a continuous datetime, I want the panandzoom bar to initialize from the latest datetime to some earlier period of time.

See attached images. Currently it loads as zoombarload. I want zoombardesired.png. 

Also, in the event where there are a lot of dates along the the X-axis, there X-axis gets crowded. Is there a setting so that the interval of dates displayed are appropriately chosen and spaced to avoid crowding?

Thanks.
Petar Marchev
Telerik team
 answered on 27 Mar 2014
1 answer
86 views
Hi,
Please find the framework attached..
Can u help me build this UI.
The data grid must display all the colors for data at run time from database table.
Yana
Telerik team
 answered on 27 Mar 2014
3 answers
176 views
Our application contains HTML data that does not display properly in the RadRichTextBox when importing with the HtmlFormatProvider.

For example, our HTML looks like the following using Internet Explorer:

1. Item one
   1. Item one sub one
   2. Item one sub two
2. Item two
   1. Item two sub one
   2. Item two sub two

In the RadRichTextBox is looks like the following:

0. Item one
   0. Item one sub one
   1. Item one sub two
1. Item two
   0. Item two sub one
   1. Item two sub two

I constructed the same list in Telerik RadRichTextBox and exported with the HtmlFormatProvider.  I noticed that the <ul> added start="1" and the <li> added value="1".

It appears that the Telerik editor depends on "start" and "value" attributes set properly in order to maintain the correct numbering when reloading the data.

Is there are way to prevent the zero based ordering without modifying my existing HTML?

Below is the original HTML data:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI; COLOR: #000000; DIRECTION: ltr">
<p style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Numbered</span>
</p>
<p style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
&nbsp;
</p>
<ol style="LIST-STYLE-TYPE: decimal; MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px" type="1">
<li>
<div style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Item one</span>
</div>
</li>
<li>
<ol style="LIST-STYLE-TYPE: decimal" type="1">
<li>
<div style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Item one sub one</span>
</div>
</li>
<li>
<div style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Item one sub two</span>
</div>
</li>
</ol>
</li>
<li>
<div style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Item two</span>
</div>
</li>
<li>
<ol style="LIST-STYLE-TYPE: decimal" type="1">
<li>
<div style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Item two sub one</span>
</div>
</li>
<li>
<div style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Item two sub two</span>
</div>
</li>
</ol>
</li>
</ol>
<p style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
&nbsp;
</p>
<p style="MARGIN-BOTTOM: 0px; DIRECTION: ltr; MARGIN-TOP: 0px">
<span style="FONT-SIZE: 16pt; FONT-FAMILY: Segoe UI">Last line.</span>
</p>
</body>
</html>
Ralph
Top achievements
Rank 1
 answered on 26 Mar 2014
1 answer
417 views
I can not find where you have hidden the download link for the Offline Documentation. Could you please provided it here?
Dimitrina
Telerik team
 answered on 26 Mar 2014
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?