<
telerik:ContainerBindingCollection
x:Name
=
"BindingProperties"
>
<
telerik:ContainerBinding
PropertyName
=
"IsLoadOnDemandEnabled"
Binding
=
"{Binding Path=Expand, Mode=TwoWay}"
/>
<
telerik:ContainerBinding
PropertyName
=
"IsDropAllowed"
Binding
=
"{Binding Path=DropAllowed, Mode=TwoWay}"
/>
</
telerik:ContainerBindingCollection
>
I dynamically built a form using a RadDocking, then a Vertical RadSplitContainer and inside the RadSpltContainer two Horizontal RadSplitContainers. The lower RadSplitContainer has three RadPaneGroups where the right outer contains three RadPanes.
The right outer container is filled like this:
radPaneGroupSystem.AddItem(ucStatusAlarms, Telerik.Windows.Controls.Docking.DockPosition.Top);
radPaneGroupSystem.AddItem(ucRSSFeed, Telerik.Windows.Controls.Docking.DockPosition.Left);
radPaneGroupSystem.AddItem(ucMessageViewer, Telerik.Windows.Controls.Docking.DockPosition.Right);
If I do that I get a "Object reference not set to an instance of an object." error, source "Telerik.Windows.Controls.Docking",
StackTrace
at Telerik.Windows.Controls.RadPaneGroup.GetPaneGroup()
at Telerik.Windows.Controls.RadPaneGroup.AddItem(RadPane pane, DockPosition dockPosition)
If I change the code and use panegroupParent.Items.Add(ucStatusAlarms), etc I get the three RadPanes as three Tabs functioning normally.
I checked the parameters going into the AddItem call, they are normally set to an instance.
Does anyone know why the Docking gives an Object reference not set to an instance of an object error and what I can do about it?
private
void
setGrouping() {
if
(
this
.grdScope !=
null
) {
this
.grdScope.GroupDescriptors.Clear();
GroupDescriptor serviceDescriptor =
new
GroupDescriptor();
serviceDescriptor.Member =
"Service"
;
serviceDescriptor.SortDirection = ListSortDirection.Ascending;
this
.grdScope.GroupDescriptors.Insert(0, serviceDescriptor);
}
}
//if radiobutton 1 is checked
private
void
rbService_Checked(
object
sender, RoutedEventArgs e) {
if
(
this
.grdScope !=
null
) {
this
.grdScope.GroupDescriptors.Clear();
GroupDescriptor serviceDescriptor =
new
GroupDescriptor();
serviceDescriptor.Member =
"Service"
;
serviceDescriptor.SortDirection = ListSortDirection.Ascending;
this
.grdScope.GroupDescriptors.Insert(0, serviceDescriptor);
}
}
//if radiobutton 2 is checked
private
void
rbPhase_Checked(
object
sender, RoutedEventArgs e) {
if
(
this
.grdScope !=
null
) {
GroupDescriptor phaseDescriptor =
new
GroupDescriptor();
phaseDescriptor.Member =
"Phase"
;
phaseDescriptor.SortDirection = ListSortDirection.Ascending;
this
.grdScope.GroupDescriptors.Insert(0, phaseDescriptor);
this
.grdScope.ShowGroupPanel =
false
;
}
}
RadDragAndDropManager.AddDragQueryHandler(
this
.Designer.View,
this
.Designer_DragQueryHandler);
this
.Designer.View.AddHandler(RadDragAndDropManager.DragQueryEvent,
new
EventHandler<DragDropQueryEventArgs>(
this
.Designer_DragQueryHandler),
true
);
Hi,
We are using RadRibbonView that contains RibbonTab with a number of Ribbon Groups. I want to show a textbox (for search functionality) and I want to be aligned to the right of the ribbon view. If I added this textbox inside a spate Ribbon Group, then that group is appended to the rest of the group, and not aligned to the right. Also, I tried to create a grid inside the Ribbon tab and set all the group on one column, and then have that textbox on the second column, but apparently Ribbon Tabs doesn’t accept Grid inside, I got a run time error.
Any idea how I can achieve this?!
Regards
<
telerik:RadTreeView
ItemsSource
=
"{Binding Doklad.polozky}"
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Grid.Column
=
"2"
>
<
Hyperlink
TextDecorations
=
"None"
Command
=
"{Binding EditPolozkaCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type UserControl}}}"
CommandParameter
=
"{Binding}"
>
<
Image
Grid.Column
=
"2"
Width
=
"16"
Source
=
"/Assets/Icons/Edit.png"
Cursor
=
"Hand"
/>
</
Hyperlink
>
</
TextBlock
>
</
Grid
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
</
telerik:RadTreeView
>