
I have a timebar used to selecting time range. However sometimes when the interval is short and located far to the right, the text showing the selected time is cut off, like this: https://i.gyazo.com/179cc9d932da3bcfa08fe38558cbb0ca.png
How can I prevent this? For example make the label right aligned instead of left aligned if it's too far to the right.


I'm needing the datetimepicker to allow the user to select an option for each second over the day, but when i'm down to just 15 minutes the boxes get too small for being able to see the text.
I've scrolled view documentation and the forum and can't find any solution.

Hi,
I have a grid with 4 columns. On selecting/changing value for 3rd column(i.e.: NewFamily) I want to programmatically set some value for the combobox in 4th column (selected value as well as list)
Here is the xaml:
<telerik:RadGridView Grid.Row="0" x:Name="PartFamilyGrid" AutoGenerateColumns="False"
ColumnWidth="*" MinHeight="150"
RowIndicatorVisibility="Collapsed" SelectionChanged="PartFamilyGrid_SelectionChanged"
>
<telerik1:StyleManager.Theme>
<telerik1:VisualStudio2013Theme/>
</telerik1:StyleManager.Theme>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Family}" IsReadOnly="True" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Part}" IsReadOnly="True" />
<telerik:GridViewDataColumn>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<telerik:RadComboBox ItemsSource ="{Binding NewFamily}" SelectionChanged="NewFamilySelected" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
<telerik:GridViewDataColumn.Header>New Family</telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<telerik:RadComboBox ItemsSource ="{Binding NewPart}" SelectionChanged="NewPartSelected" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
<telerik:GridViewDataColumn.Header>New Part</telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Items of this RadGridView are objects of this class
public class PartFamilyGridItem : INotifyPropertyChanged
{
public string Family
{
get; set;
}
public string Part
{
get; set;
}
public List<string> NewFamily
{
get; set;
}
public List<string> NewPart
{
get; set;
}
public event PropertyChangedEventHandler PropertyChanged;
}
In the SelectionChanged event (NewFamilySelected) for the RadComboBox in 3rd column i want to handle this task. But I am not sure how to do it.
Do I need to get the row of the RadComboBox (from 3rd col) for which value is modified, select the RadComboBox from 4th col and finally change the selectedValue?
A similar issue is handled here https://www.telerik.com/forums/change-the-cell-content-at-runtime#MtiwER8x9USdCWTtLyu5_A
but I am not getting how to handle it for combobox
| radGridView.Rows[radGridView.SelectedRow].Cols["Col_Name"].value = |
| MY_NEW_VALUE; |
Hello again!
I'd like to create custom class that is RadDiagramConnection and has its full functionality within RadDiagram , but with some additional data ( implementation of additional interface).
When I am creating it via inheriting from RadDiagramConnection ( as it is recommended in Telerik documentation here: https://docs.telerik.com/devtools/wpf/controls/raddiagram/howto/create-custom-connectioncap ).
But when I add it to my RadDiagram, I see nothing. As I know where my LineObject is I can click on it and see 2 ancor-points, but I can not see RadDiagramConnection itself. Picture is attached.
Would you be so kind to tell me how I can implement this thing?
This is my .cs file
public class LineObject : RadDiagramConnection { }This is my Xaml file:
<telerik:RadDiagram > <telerik:RadDiagramConnection StartPoint="250,250" EndPoint="150,150" SourceCapType="Arrow1Filled" TargetCapType="Arrow1Filled" SourceCapSize="20,20" TargetCapSize="20, 20" StrokeThickness="5" Background="Red" Stroke="Red" /> <imageeditor:LineObject StartPoint="150,250" EndPoint="250,150" SourceCapType="Arrow1Filled" TargetCapType="Arrow1Filled" SourceCapSize="20,20" TargetCapSize="20, 20" StrokeThickness="5" Background="Blue" Stroke="Blue" /></telerik:RadDiagram>
Best regards,
Tatiana
if before the fixed width column,there is the "*" column,for example:
there are five columns,column0=150;column1=*;column2=250;column3=150;column4=250;
It is difficult resize the column width,I search the feedback information,and found there is the feedback in 2016,
but don't disposal ,so i got the old source code,and find some question code :
in the GridViewColumnCollectionInternal.cs file,the function RecalculateNonStarColumnWidthsOnPositiveResize()
and RecalculateNonStarColumnWidthsOnNegativeResize() have bug.
the first: adjust the RecalculateNonStarColumnWidthsOnPositiveResize()
change frome
column.SetWidthInternal(new GridViewLength(width.Value, GridViewLengthUnitType.Pixel, width.DesiredValue, width.DisplayValue - columnExcessWidth));
to
column.SetWidthInternal(new GridViewLength(width.DisplayValue - columnExcessWidth));
then positive resize is OK!
In addition,the other method:
//PositiveResize Non * column
private double RecalculateNonStarColumnWidthsOnPositiveResize(
double change,
int index,
bool retainAuto)
{
if (DoubleUtil.GreaterThan(change, 0.0))
{
#region calculate the resize total width
double canAdjustWidth = 0;double totalWidth = 0;
for (int i = this.Count - 1; i > index; i--)
{
var column = this.ColumnFromDisplayIndex(i);
if (!IsColumnResizable(column))
{
continue;
}
var width = column.Width;
var minWidth = column.MinWidth;
if (!width.IsStar &&
DoubleUtil.GreaterThan(width.DisplayValue, minWidth))
{
canAdjustWidth += width.DisplayValue - minWidth;
totalWidth += width.DisplayValue;
}
}
#endregion
#region resize column by scale
double actualAdjustWidth = 0;
if (change > canAdjustWidth) actualAdjustWidth = canAdjustWidth;
else actualAdjustWidth = change;
for (int i = this.Count - 1; i > index; i--)
{
var column = this.ColumnFromDisplayIndex(i);
if (!IsColumnResizable(column))
{
continue;
}
var width = column.Width;
var minWidth = column.MinWidth;
if (!width.IsStar &&
DoubleUtil.GreaterThan(width.DisplayValue, minWidth))
{
double adj = width.DisplayValue* actualAdjustWidth / totalWidth;
column.SetWidthInternal(new GridViewLength(width.DisplayValue-adj));
}
}
#endregion
#region adjust the current column
if (DoubleUtil.GreaterThan(actualAdjustWidth, 0.0))
{
var column = this.ColumnFromDisplayIndex(index);
SetColumnWidth(column, actualAdjustWidth, retainAuto);
change -= actualAdjustWidth;
}
#endregion
}
return change;
}
and second modify the NegativeResize code:
private double RecalculateNonStarColumnWidthsOnNegativeResize(
double change,
int index,
bool retainAuto)
{
if (DoubleUtil.GreaterThan(change, 0.0))
{
#region calculate the total width of the right resize column
double canAdjustWidth = 0;
int needAdjustCount = 0;
int needAdjustCountStar = 0;
bool isExistMinWidth = false;
for (int i = index + 1; i < this.Count; i++)
{
var column = this.ColumnFromDisplayIndex(i);
if (!IsColumnResizable(column))
{
continue;
}
var width = column.Width;
//include the * column
if (!DoubleUtil.AreClose(width.DisplayValue, column.MaxWidth))
{
canAdjustWidth += width.DisplayValue;
if (!width.IsStar) //fixed column
{
needAdjustCount += 1;
if (DoubleUtil.GreaterThan(column.MinWidth*3, width.DisplayValue))
{
isExistMinWidth = true;
}
}
else
needAdjustCountStar += 1;
}
}
#endregion
#region when the fixed column width is small the three times minvalue,or non * column
if(!isExistMinWidth && needAdjustCountStar>0) return change;
#endregion
#region resize column by scale
double actualAdjustWidth = 0;
double totalAdjustWidth = 0;
if (change > canAdjustWidth)
actualAdjustWidth = canAdjustWidth;
else
actualAdjustWidth = change;
for (int i = this.Count - 1; i > index; i--)
{
var column = this.ColumnFromDisplayIndex(i);
if (!IsColumnResizable(column))
{
continue;
}
var width = column.Width;
if (!width.IsStar &&
!DoubleUtil.AreClose(width.DisplayValue, column.MaxWidth))
{
double adj = width.DisplayValue * actualAdjustWidth / canAdjustWidth;
totalAdjustWidth += adj;
column.SetWidthInternal(new GridViewLength(width.DisplayValue + adj));
}
}
#endregion
#region adjust the current column
if (DoubleUtil.GreaterThan(totalAdjustWidth, 0.0))
{
var column = this.ColumnFromDisplayIndex(index);
SetColumnWidth(column, -totalAdjustWidth, retainAuto);
change -= totalAdjustWidth;
}
#endregion
}
return change;
}

After editing a cell in a grid, the next row below is automatically selected. But if the grid is sorted, and the edit makes the current row to be moved, the row which is selected after the edit is the row below the new position. I would expect that the row to be selected is the one below the original location.
I've attached an image from a test application, and when comitting the active edit the row will be moved upwards (due to the sorting), and the next row to be selected is the one with IntegerValue 16. I want it to be the row with IntegerValue 32. Almost feels like a bug?
I've tried to override this by storing the selected row when the CellEditEnded-event is triggerd, and then trying to select it at SelectionChanging or SelectionChanged, but my attempts fail.