I want to hide the properties which has nested properties inside them. What is best approach to do them? Ihave tries following things
1. setting NestedPropertiesVisibility="Hidden" for radpropertygrid. But it not working.
2. setting visiblility of propertydefinition based on displayname.The code looks like
private void PropertyGrid1_AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e)
{
if (e.PropertyDefinition.DisplayName == "Mypropertyname")
{
e.PropertyDefinition.Visibility = Visibility.Hidden;
}
}
second approach works but I dont want to do on the basis of Displayname.I need to be hidden if any propertydefinition under property has nested property
Would you please help me with the same.
Hi,
I've been trying to find documentation of just importing a workbook into a radspread sheet. I looked at the sample demos from GitHub and I tried to understand them, but alas, I cannot figure it out. So, if there is a file called "Test.xlsx" on my desktop, how could I import that into my spreadsheet?
Thank you for your help.
<
tgrid:RadGridView
x:Name
=
"radGridView"
Grid.Row
=
"1"
Grid.ColumnSpan
=
"2"
HorizontalAlignment
=
"Stretch"
Margin
=
"6,0,6,6"
VerticalAlignment
=
"Stretch"
IsReadOnly
=
"True"
RowIndicatorVisibility
=
"Collapsed"
CanUserFreezeColumns
=
"False"
ScrollMode
=
"Deferred"
ItemsSource
=
"{Binding CollectionView.ItemsSource}"
DataLoadMode
=
"Asynchronous"
IsFilteringAllowed
=
"False"
ShowGroupPanel
=
"False"
ShowColumnHeaders
=
"True"
EnableColumnVirtualization
=
"False"
CanUserResizeColumns
=
"False"
CanUserDeleteRows
=
"False"
AutoGenerateColumns
=
"False"
CanUserReorderColumns
=
"False"
IsScrolling
=
"False"
ShowInsertRow
=
"False"
ValidatesOnDataErrors
=
"None"
int:RadGridViewAdapter.SortDirection
=
"{Binding CollectionView.SortDirection, Mode=TwoWay}"
int:RadGridViewAdapter.SortMember
=
"{Binding CollectionView.SortMember, Mode=TwoWay}"
Grid.RowSpan
=
"1"
SelectionMode
=
"Single"
int:RadGridViewHierarchicalAdapter.HierarchicalAdapterEnabled
=
"True"
int:RadGridViewHierarchicalAdapter.HierarchicalSelectedItemsBinding
=
"{Binding SelectedArticles}"
int:RadGridViewHierarchicalAdapter.AutoSelectLowerLevel
=
"True"
SelectionUnit
=
"FullRow"
>
<
tgrid:RadGridView.Columns
>
<
tgrid:GridViewDataColumn
Header
=
"Title"
Width
=
"*"
DataMemberBinding
=
"{Binding Title}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"Title"
TextTrimming
=
"WordEllipsis"
/>
<
tgrid:GridViewDataColumn
Header
=
"Brand"
Width
=
"*"
DataMemberBinding
=
"{Binding Brand}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"Brand"
TextTrimming
=
"WordEllipsis"
/>
<
tgrid:GridViewDataColumn
Header
=
"Specification}"
Width
=
"*"
DataMemberBinding
=
"{Binding Specification}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"Specification"
TextTrimming
=
"WordEllipsis"
ToolTip
=
"{Binding Specification}"
/>
<
tgrid:GridViewDataColumn
Header
=
"GroupKind}"
Width
=
"*"
DataMemberBinding
=
"{Binding Kind}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"Kind"
TextTrimming
=
"WordEllipsis"
ToolTip
=
"{Binding Kind}"
/>
</
tgrid:RadGridView.Columns
>
<
tgrid:RadGridView.ChildTableDefinitions
>
<
tgrid:GridViewTableDefinition
>
<
tgrid:GridViewTableDefinition.Relation
>
<
Data:PropertyRelation
ParentPropertyName
=
"Articles"
/>
</
tgrid:GridViewTableDefinition.Relation
>
</
tgrid:GridViewTableDefinition
>
</
tgrid:RadGridView.ChildTableDefinitions
>
<
tgrid:RadGridView.HierarchyChildTemplate
>
<
DataTemplate
>
<
tgrid:RadGridView
x:Name
=
"radGridViewChild"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
IsReadOnly
=
"True"
RowIndicatorVisibility
=
"Collapsed"
CanUserFreezeColumns
=
"False"
ScrollMode
=
"Deferred"
ItemsSource
=
"{Binding Articles}"
IsFilteringAllowed
=
"False"
ShowGroupPanel
=
"False"
ShowColumnHeaders
=
"True"
EnableColumnVirtualization
=
"False"
CanUserResizeColumns
=
"False"
CanUserDeleteRows
=
"False"
AutoGenerateColumns
=
"False"
CanUserReorderColumns
=
"False"
IsScrolling
=
"False"
ShowInsertRow
=
"False"
ValidatesOnDataErrors
=
"None"
Grid.RowSpan
=
"1"
SelectionMode
=
"Extended"
SelectionUnit
=
"FullRow"
>
<
tgrid:RadGridView.Columns
>
<
tgrid:GridViewDataColumn
Header
=
"Number"
Width
=
"Auto"
DataMemberBinding
=
"{Binding ArticleNumber}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"Number"
/>
<
tgrid:GridViewDataColumn
Header
=
"TypeNumber"
Width
=
"Auto"
DataMemberBinding
=
"{Binding TypeNumber}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"TypeNumber"
/>
<
tgrid:GridViewDataColumn
Header
=
"Description"
Width
=
"Auto"
DataMemberBinding
=
"{Binding ErpDescription}"
IsFilterable
=
"False"
IsCustomSortingEnabled
=
"False"
IsGroupable
=
"False"
IsSortable
=
"True"
UniqueName
=
"Description"
/>
</
tgrid:RadGridView.Columns
>
</
tgrid:RadGridView
>
</
DataTemplate
>
</
tgrid:RadGridView.HierarchyChildTemplate
>
<
tgrid:RadGridView.ScrollPositionIndicatorTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Title}"
FontWeight
=
"Bold"
/>
</
DataTemplate
>
</
tgrid:RadGridView.ScrollPositionIndicatorTemplate
>
</
tgrid:RadGridView
>
Hi,
I noticed that if you paste a hyperlink containing an anchor such as this into a RichTextBox, everything except the anchor's name will be removed from the href attribute, resulting in links that do not work.
Do you have any advice or tips on a way to work around this?
Thanks
I am using the sample from Telerik Demo to create pie chart, and register to .LayoutUpdate event, at which doing following:
private void pieChart_LayoutUpdated(object sender, System.EventArgs e)
{
var paths = ChildrenOfTypeExtensions.ChildrenOfType<Path>(PieChart.Series[0]).ToList();
if (paths.Count == 0)
return;
PieChart.LayoutUpdated -= pieChart_LayoutUpdated;
foreach (var path in paths)
{
var dataPoint = path.Tag as PieDataPoint;
if (dataPoint == null)
return;
path.MouseEnter += uiElement_MouseEnter;
path.MouseLeave += uiElement_MouseLeave;
}
}
private void uiElement_MouseEnter(object sender, MouseEventArgs e)
{
var bar = (UIElement) sender;
bar.Opacity = 0.5;
}
private void uiElement_MouseLeave(object sender, MouseEventArgs e)
{
var bar = (UIElement)sender;
bar.Opacity = 1;
}
But I wanted more than just highlighting on pie "path", I want the associated label to be highlighted too.
Which at the moment, I am doing something like this:
<Style x:Key="SlicerNameTextBoxStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{Binding DataItem, Converter={StaticResource SlicerToBrushConverter}}"></Setter>
<Setter Property="FontWeight" Value="{Binding DataItem, Converter={StaticResource SlicerToNameConverter}}"></Setter>
<Setter Property="FontFamily" Value="Segoe UI" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource MouseOverBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<telerik:PieSeries.LabelDefinitions>
<telerik:ChartSeriesLabelDefinition Margin="-4,0,0,0"
DefaultVisualStyle="{StaticResource SlicerNameTextBoxStyle}">
<telerik:ChartSeriesLabelDefinition.Template>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding DataItem.DisplayName}"
HorizontalAlignment="Center"
Style="{StaticResource SlicerNameTextBoxStyle}"
MouseDown="SlicerPieLabel_OnMouseDown"/>
</StackPanel>
</DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template>
</telerik:ChartSeriesLabelDefinition>
</telerik:PieSeries.LabelDefinitions>
As you can see, the problem is that I can't connect the pie slice and label highlight together, and I duplicated the pie selection changed event.
Can you help me to provide a better solution here?
Thanks,
Mingxue
I have a child RadGridview contained in the row details of a master RadGridView defined through a data template .
Each row of the child RadGridview has an active checkbox bound to a viewmodel.
If a child checkbox is checked , as the master RadGridView is scrolled to hide the details of a row and then back again , that checkbox returns unchecked.
The viewmodel still shows the value as checked.
Any help would be appreciated.
RadScheduleView: clipping appointment name in Edit mode.
Hi, I need the appointment name in the schedule control to auto-expand to fit whatever the name of the appointment is. This is most troublesome in Edit mode, I get something like "This is the na..." - the rest of the name is clipped in the scheduler grid.
Please advise with a work-around.
Telerik.Windows.Controls.dll v. 2016.1.217.40
Barry