Hi,
in the RadDocking control I have defined DocumentHost with RadPaneGroup. Inside that group I have many tabs (RadPanes). So now I want to move whole RadPaneGroup not separate RadPanes. I know it is possible with basic RadPaneGroup (not inside DocumentHost), but then headers of the tabs are on bottom and I want to display them on top?
Hello,
This is my first wpf thread and i have started working on window. I am trying to set RadWindow as mainwindow as i have seen and downloaded sample project by using the following post.
http://www.telerik.com/support/kb/wpf/window/details/how-to-use-radwindow-as-main-window
But when i copy and paste code in my project and runs, it open two windows one window is fine and displaying it as expected and second window shows the same window under the browser type window. Image is attach after an application runs. Please anyone help to rectify my issue.
Thanks in advance :).
Hi!
I need use a different image from data base, i will asign the image(PNG) in order of an specific process.
The images recovered from data base are created in a temporal folder in order to use them in the dynamic process when i need chage the image.
At this moment the asignation of an image is ok but i can not see the image in the button:
RadRibbonButton objArea = new RadRibbonButton();
objArea.LargeImage = new BitmapImage(new Uri(auxPath + (string)dt.Rows[i].ItemArray[1], UriKind.Relative));
objArea.Size = Telerik.Windows.Controls.RibbonView.ButtonSize.Large;
If i use a RadRibbonButton created manually in xaml, i can change the image and the result is ok.
//control created in xaml
btnExample.LargeImage = new BitmapImage(new Uri(auxPath + (string)dt.Rows[i].ItemArray[1]));
If you help me i will be greateful.
Hi,
i'm looking for help with removing lines/border from column where i have hierarchical tree.
Property GridLinesVisibility is not solution because removes/adds lines in whole grid, but i want remove only in my first column.
I created styles based on GridviewCellStyle and applied them to cells, but without any results. RadTreeListView shows or not lanes only according to GridLinesVisibility, my styles changes nothing.
<
Window.Resources
>
<
Style
x:Key
=
"CellWithoutLanes"
TargetType
=
"telerik:GridViewCell"
BasedOn
=
"{StaticResource GridViewCellStyle}"
>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
</
Style
>
<
Style
x:Key
=
"CellWithLanes"
TargetType
=
"telerik:GridViewCell"
BasedOn
=
"{StaticResource GridViewCellStyle}"
>
<
Setter
Property
=
"BorderBrush"
Value
=
"Black"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"5,5,5,5"
/>
</
Style
>
</
Window.Resources
>
<
Grid
>
<
telerik:RadTreeListView
ItemsSource
=
"{Binding Processes}"
AutoGenerateColumns
=
"False"
TreeLinesVisibility
=
"Visible"
RowIndicatorVisibility
=
"Collapsed"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Items}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"Element"
CellStyle
=
"{StaticResource ResourceKey=CellWithoutLanes}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Grid.Column
=
"0"
Text
=
"{Binding Id}"
/>
<
TextBlock
Grid.Column
=
"1"
Text
=
"{Binding Name}"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Id}"
Header
=
"Id"
CellStyle
=
"{StaticResource ResourceKey=CellWithLanes}"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Expression}"
Header
=
"Expression"
CellStyle
=
"{StaticResource ResourceKey=CellWithLanes}"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding UserPriority}"
Header
=
"UserPriority"
CellStyle
=
"{StaticResource ResourceKey=CellWithLanes}"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
</
Grid
>
Best regards,
Jakub.
<Style TargetType="telerik:GroupHeaderRow">
<Setter Property="ShowGroupHeaderColumnAggregates" Value="True" />
<Setter Property="ShowHeaderAggregates" Value="False" />
</Style> But the result is double lines: one for group title and another to aggregates. I wanna aggregates in same line that group title but in collumns. Regards, JP.
On RowValidating, when a GridViewCellValidationResult is added with a PropertyName such as "Hours", and a column that precedes the Hours column has a binding path of say "SourceHours", the GridView logic incorrectly does a .Contains() on the PropertyName to get the cell, which leads to the SourceHours column being highlighted as the one with the validation error, instead of the Hours column.
I'm using Telerik.Windows.Controls.GridView, Version=2015.3.1104.45, and the offending method is Telerik.Windows.Controls.GridView.GridViewRow.TryGetCellFromPropertyName.
Here's the relevant XAML:
<telerik:GridViewDataColumn Header="Source Hours" DataMemberBinding="{Binding SourceHours}" DataFormatString="n" TextAlignment="Right" />
<telerik:GridViewDataColumn Header="Hours" DataMemberBinding="{Binding Hours}" DataFormatString="n" TextAlignment="Right" />
And here is how I'm adding the GridViewCellValidationResult in the RowValidating event handler:
if (attendance.Hours == 0m) {
e.ValidationResults.Add(new GridViewCellValidationResult { PropertyName = "Hours", ErrorMessage = "Hours cannot be zero."});
}
And this is why it's failing ( the Contains(this.propertyName) part):
internal bool TryGetCellFromPropertyName(string propertyName, out GridViewCell gridViewCell)
{
Func<GridViewBoundColumnBase, bool> func = (GridViewBoundColumnBase c) => c.GetDataMemberName().Contains(this.propertyName);
GridViewDataControl gridViewDataControl = base.GridViewDataControl;
if (string.IsNullOrEmpty(propertyName) || gridViewDataControl == null)
{
gridViewCell = null;
return false;
}
gridViewCell = (
from c in base.Cells.OfType<GridViewCell>()
where c.DataColumn != null
select c).FirstOrDefault<GridViewCell>((GridViewCell c) => func(c.DataColumn));
return gridViewCell != null;
}
If it instead was coded as c.GetDataMemberName() == this.propertyName (or similarly ignoring case if desired), it seems to me that it would work as expected.
For now I will use a UniqueName to get around the issue, but I wanted to bring it to Telerik's attention.
Hello.
I'am trying to bind ViewModel property to a CommandProperty of a GridViewCheckBox inside of CreateCellElement. Unfortunately the binded command doesn't run while clicking on checkbox. Any ideas why this isn't working?
I'm posting the code where I belive is the mistake. I have made a test Visual Studio 2013 project to try to solve this. It is enable to download here: HERE
Creating cell element:
internal
class
GroupDataGridCheckBoxColumn : GridViewCheckBoxColumn
{
private
readonly
Group _group;
public
GroupDataGridCheckBoxColumn(Group group)
:
base
()
{
this
._group = group;
this
.AutoSelectOnEdit =
true
;
this
.EditTriggers = GridViewEditTriggers.CellClick;
}
public
override
FrameworkElement CreateCellElement(GridViewCell cell,
object
dataItem)
{
GridViewCheckBox checkBox =
base
.CreateCellElement(cell, dataItem)
as
GridViewCheckBox;
/// <THIS DOESNT WORK>
/* Set Command binding */
Binding commandBinding =
new
Binding(
"DataContext.AddOrRemoveGroupCommand"
);
commandBinding.RelativeSource =
new
RelativeSource(RelativeSourceMode.FindAncestor,
typeof
(Window), 1);
checkBox.SetBinding(CheckBox.CommandProperty, commandBinding);
/* Set Command parameter */
MultiBinding commandParameterBinding =
new
MultiBinding();
commandParameterBinding.Converter =
new
CommandParameterMultiConverter();
commandParameterBinding.Bindings.Add(
new
Binding(
"IsChecked"
) { RelativeSource = RelativeSource.Self });
commandParameterBinding.Bindings.Add(
new
Binding(
"."
));
//the employee object
commandParameterBinding.Bindings.Add(
new
Binding(
"."
) { Source =
this
._group });
//the group object
checkBox.SetBinding(CheckBox.CommandParameterProperty, commandParameterBinding);
/// <THIS DOESNT WORK/>
return
checkBox;
}
}
Any ideas? This error consumed 1 day of my work for now..
I was trying to figure out why the titles of my RadPanes were not being translated. I finally figured out that the LoadLayout() also loads the header of the panes and that overrides my XAML's {x:Static properties:Resources.xxx}.
I could say "After the LoadLayout(), change the title of each pane according to the resource strings" but it would be nice if it could be done directly in the XAML. I don't believe there's a way to prevent the "Header" tag from being included in the SaveLayout/LoadLayout functions, right? To tell you the truth, I don't even see why the header is included at all!