have a chart of (date- value) using Kendo js, the positions were wrong on the xAxis line there's an offset, I used the property baseUnit: "days", it fixed the first one but still seeing an offset for the others (date-value) and can't fix it , here's an image of my chart :
What is necessary to get a RadGridView to focus the first cell of the row that is selected, when the SelectedItem is bound, when the grid is first shown? You can see in the screenshot that the first cell of the first row is focused even though the third row is selected via binding. You can also see the properties that are set for the grid below.
As soon as a user clicks on another row in the grid, the outlining / focus on the first cell goes away and moves to the first cell of the row the user selected.
<telerik:RadGridView
x:Name="fieldsGrid"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
IsReadOnly="True"
AutoGenerateColumns="False"
SelectionMode="Single"
SelectionUnit="FullRow"
EnableLostFocusSelectedState="False"
ShowGroupPanel="False"
ShowSearchPanel="False"
SearchPanelCloseButtonVisibility="Collapsed"
RowIndicatorVisibility="Collapsed"
IsSynchronizedWithCurrentItem="True"
IsFilteringAllowed="True"
CanUserDeleteRows="False"
CanUserFreezeColumns="False"
ShowColumnSortIndexes="False"
MouseDoubleClick="InsertableRow_OnMouseDoubleClick"
ItemsSource="{Binding FieldsForBindingOnly, Mode=OneWay}"
SelectedItem="{Binding SelectedField, Mode=TwoWay}">
I really don't know how to describe this, so I had trouble with a good subject, or searching it out, but...
I have a grid with a lot of numbers. In some of the columns, the value is repeated (identical) for each row. I'd like to show those only once as some kind of header or summary row, but without their own grouping, per se, and without any kind of aggregate function working on them. They all belong to the group that contains them. Does that make sense?
Perhaps this picture can help:
Notice how all the values in "Volume," "Volume Last Week", "Volume Last Year" are the same? I'd like them to show up only for the "Region" (which is the grouping containing this set). I'm hoping this is easier to do than to explain. 😅
Thanks in advance!
Brad.
I need to be notified every time my value in a column changes. But it invokes PropertyChanged only after I unfocus/unselected the cell I was editing. I've tried your grid view example
https://docs.telerik.com/devtools/wpf/controls/radgridview/getting-started/getting-started2 and it has the same functionality even if I'm setting Mode=TwoWay, UpdateSourceTrigger=PropertyChanged it still triggers ProperyChanged only after I make changes and unselect the current cell. I want to trigger the notify event every time I change.
My grid view:
<telerik:RadGridView x:Name="IdentityProvidersGridView"
ItemsSource="{Binding IdentityProviders}"
SelectedItem="{Binding SelectedIdentityProvider}"
Visibility="{Binding IsChecked, ElementName=EnableTokenValidation, Converter={StaticResource BoolToVis}}"
SelectionMode="Single"
ShowGroupPanel="False"
NewRowPosition="Bottom"
GroupRenderMode="Flat"
CanUserInsertRows="True"
AutoGenerateColumns="False"
CanUserReorderColumns="False"
RowIndicatorVisibility="Collapsed"
AddingNewDataItem="AddIdentityProviderItem"
PreviewKeyDown="DataGrid_PreviewKeyDown"
Margin="0,10,0,10" Grid.Row="10">
<telerik:RadGridView.Columns>
<telerik:GridViewCheckBoxColumn Header="Enable"
EditTriggers="CellClick"
AutoSelectOnEdit="True"
Width="Auto"
DataMemberBinding="{Binding EnableProvider, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<telerik:GridViewCheckBoxColumn.CellStyle>
<Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</telerik:GridViewCheckBoxColumn.CellStyle>
</telerik:GridViewCheckBoxColumn>
<telerik:GridViewDataColumn Header="Internal provider ID"
DataMemberBinding="{Binding ProviderId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
EditTriggers="CellClick" Width="Auto"/>
<telerik:GridViewDataColumn x:Name="InternalProviderLabelColumn" Header="Internal provider label"
DataMemberBinding="{Binding SchemeName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnTargetUpdated=True}"
EditTriggers="CellClick" Width="Auto"/>
<telerik:GridViewDataColumn Header="Token provider URL"
DataMemberBinding="{Binding Issuer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
EditTriggers="CellClick" Width="*"/>
<telerik:GridViewDataColumn Header="Actions" Width="Auto">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<telerik:RadButton Content="X" Click="DeleteIdentityProvider_Click"
CommandParameter="{Binding}" Width="50" HorizontalAlignment="Center"/>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
private void OnProviderPropertyChanged(object sender, PropertyChangedEventArgs e)
{
MarkDirtyIfStateChanged();
}
public class IdentityProvider : INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
I want to set backgound of selected row in RadTreeListView. I tried below, but it does not work.
I'm applying a theme to my application using no-xaml. When using a theme, is it not possible to change the background?
<Style TargetType="telerik:TreeListViewRow" BasedOn="{StaticResource TreeListViewRowStyle}">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="SelectedBackground" Value="#FFFFBB00" />
<Setter Property="Background" Value="#FFFFBB00"/>
</Trigger>
</Style.Triggers>
</Style>Is there a control in WPF that I can use for numeric input that looks just like a textbox, but doesn't allow anything non-numeric? I've looked at "Masked Input", and don't like the look nor the behavior (e.g. I don't like to see the template, and putting the curser at the beginning of field and hitting a number puts the number in the first digit and fills the rest with zeroes - nothing like a TextBox). I've also looked at the "Numeric UpDown", but haven't found a simple example that looks like a TextBox - all the examples show with the up and down arrows, which I don't want. I'm sure it's just a matter of formatting/templating/whatever, but I'm not a UI guy - I just want to drop the control on my form and maybe tweak a few parameters.
I would just use a TextBox bound to an integer, but the problem with that is if the user enters something non-numeric, a conversion exception is thrown, rather than a validation error. At that point the form validates just fine because the backing field hasn't actually changed yet, so the user can, for example, hit [Save] while there are errors shown on the screen, and the [Save] logic thinks all is well.
Any ideas?
Thanks!
Brad.
I want to expand a newly added item in RadTreeView so that the selection is visible. However, as the item is (obviously) not yet visible, the SelectedContainer is (and stays) null. As I am using HierarchicalDataTemplates to create the tree, I don't have the path of the newly created item - so I cannot use 'ExpandItemByPath' (or how can I get the Path for the selected item?).
So how can I find the parents of the recently created Item so that I could expand them?
