Hi,
Is there a way to set edit triggers on the cell level? I need that in the same column, some of the cells will have a different edit trigger value from other cells (depends on a certain bushiness logic condition that can be implemented in a converter, for example).
Hi to all,
I'm seeing a demo, I would to goto at last char, but not last char of mask.
I try to explane more clearly, I have example that I attached, when I get focus of control, Carrer appears at first position, I have a value of some characters and thay are less than max length of mask (a20), if a try to press "End", it goto to last char of mask, I would to goto at last inserted char.
Other question, how can I select all, but only inserted value?
SelectionOnFocus gives me several mode when I get focous, it would be nice to have "SelectAllValue" or "CarretToEndValue"
Can I do it or custom it?
Hello,
We want to use the enter key to traverse between the cells in the row of a RadGridView, this works fine at the moment only the transition to the next row is a problem.
We want the RadGridView to behave as follows,
We have created a CustomKeyboardCommandProvider as suggested in this blog post.
The function ProvideCommandsForKey(..) is only called for the first enter, then the keyboardfocus is moved out of the grid while the last cell has still some sort of focus, a rectangle is shown in the cell, but it doesn't respond on the keyboard enter presses anymore. We tried using commands to select the cell or row after the commit but these are not working, the focus is still leaving the grid after the commit is done.
public
override
IEnumerable<ICommand> ProvideCommandsForKey(Key key)
{
List<ICommand> commandsToExecute =
base
.ProvideCommandsForKey(key).ToList();
/* IF Enter key is pressed and we are in the last cell */
if
(key == Key.Enter && (_parentGrid.CurrentColumn.DisplayIndex == _parentGrid.Columns.Count - 1))
{
if
(_firstEnterHandled ==
false
)
{
_firstEnterHandled =
true
;
commandsToExecute.Clear();
commandsToExecute.Add(RadGridViewCommands.CommitCellEdit);
commandsToExecute.Add(RadGridViewCommands.SelectCurrentUnit);
// DOESNT WORK
}
else
{
commandsToExecute.Clear();
commandsToExecute.Add(RadGridViewCommands.BeginInsert);
/* Reset flag */
_firstEnterHandled =
false
;
}
}
else
{
/* Reset flag */
_firstEnterHandled =
false
;
}
return
commandsToExecute;
}
Any help would be appreciated.
Marcel
When RadGridView loses focus, it jumps to the top of it's items. This is really bad behaviour when inserting a row. If I'm halfway through entering details for a new row and I happen to click on anything else outside the grid, the grid jumps to the top and the row I'm inserting disappears out of view...
I want the grid to stay exactly where it is, unless the user manually scrolls it themselves.
Is there any way to prevent the grid from automatically scrolling or moving during/after inserting and/or editing?
Hello. I need a real-time RadCartesianChart with Spline Series which could contain a large number of points and could be scrolled (or panned) in time. Suppose the program works and generates a chart for an hour. The chart moves from right to left. Every second the program polls the external device (flowmeter) and receives data to form a new point on the chart. In the chart window only last 30 points are seen. The others are hidden behind the left border of the chart window. To see the hidden part of the chart the user has to do one of the two floowing options:
- Scroll the chart. I.e., the user moves the mouse cursor to the scroll bar thumb and sets the mouse cursor over it, presses the right mouse button and while holding it, tows scroll bar thumb from right to left until the chart will be scrolled until the required distance.
Or
-Pan the chart. I.e., the user sets the mouse cursor over the chart, presses the right mouse button and while holding it, drags the chart from right to left until the chart will be moved until the required distance.
Below, I present to you View and ViewModel of how the chart is now done. Please see the View:
<
telerik:RadCartesianChart
Grid.Row
=
"0"
>
<!--Turn off scrollbars on the chart-->
<
telerik:RadCartesianChart.Resources
>
<
Style
TargetType
=
"telerik:PanZoomBar"
>
<
Setter
Property
=
"Visibility"
Value
=
"Collapsed"
/>
</
Style
>
</
telerik:RadCartesianChart.Resources
>
<
telerik:SplineSeries
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
ItemsSource
=
"{Binding Data}"
/>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeContinuousAxis
MajorStepUnit
=
"Second"
LabelInterval
=
"5"
LabelFormat
=
"hh:mm:ss"
FontFamily
=
"Segoe UI"
PlotMode
=
"OnTicks"
TickOrigin
=
"{Binding AlignmentDate}"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
FontFamily
=
"Segoe UI"
Title
=
"Meters per second [m/s]"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<!--Coordinate grid-->
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
MajorXLineDashArray
=
"3,4"
MajorYLineDashArray
=
"3,4"
/>
</
telerik:RadCartesianChart.Grid
>
<!--Changing of scale and panning of the chart---->
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartPanAndZoomBehavior
DragMode
=
"Pan"
ZoomMode
=
"Both"
PanMode
=
"Both"
/>
</
telerik:RadCartesianChart.Behaviors
>
</
telerik:RadCartesianChart
>
Please see the ViewModel
public
class
t_SoundVelocityViewModel : BindableBase
{
#region Fields
#region Constant Fields
/// <summary>
/// Outer device polling timer period.
/// </summary>
private
const
int
TIMER_INTERVAL = 1000;
. . . . . . . . . . . . . . . . . . . . . . . . .
#endregion
#region Common Fields
. . . . . . . . . . . . . . . . . . . . . . . . .
/// <summary>
/// Chart points collection.
/// </summary>
private
RadObservableCollection<ChartPoint> _data;
/// <summary>
/// Outer device polling timer.
/// </summary>
private
DispatcherTimer _timer;
/// <summary>
///
/// </summary>
private
DateTime _lastDate;
/// <summary>
///
/// </summary>
private
DateTime? _alignmentDate;
/// <summary>
///
/// </summary>
private
bool
_useAlignmentDate;
/// <summary>
/// Текущее значение скорости звука.
/// </summary>
private
double
_soundVelocityValue = 0;
#endregion
#endregion
#region Constructors
/// <summary>
/// Конструктор.
/// </summary>
public
t_SoundVelocityViewModel(IEventAggregator eventAggregator)
{
. . . . . . . . . . . . . . . . . . . . . . . .
this
.FillData();
this
._useAlignmentDate =
true
;
// Create timer.
this
._timer =
new
DispatcherTimer();
this
._timer.Interval = TimeSpan.FromMilliseconds(TIMER_INTERVAL);
this
._timer.Tick +=
this
.onTimer;
// Запустить таймер опроса.
this
._timer.Start();
}
#endregion
#region Properties
/// <summary>
/// Gets or sets chart points collection.
/// </summary>
public
RadObservableCollection<ChartPoint> Data
{
get
{
return
this
._data; }
set
{
this
.SetProperty(
ref
this
._data, value); }
}
public
DateTime? AlignmentDate
{
get
{
return
this
._alignmentDate; }
set
{
this
.SetProperty(
ref
this
._alignmentDate, value); }
}
public
bool
UseAlignmentDate
{
get
{
return
this
._useAlignmentDate; }
set
{
if
(
this
.SetProperty(
ref
this
._useAlignmentDate, value))
this
.updateAlignmentDate();
}
}
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#endregion
#region Methods
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
/// <summary>
/// Polling timer tick's handler.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private
void
onTimer(
object
sender, EventArgs e)
{
try
{
this
._lastDate =
this
._lastDate.AddMilliseconds(TIMER_INTERVAL);
// Turn off collection changed notifications when very old chart point is removed
// from chart points collection and a new chart point add there.
this
.Data.SuspendNotifications();
this
.Data.RemoveAt(0);
this
.Data.Add(
this
.CreateBusinessObject());
// Turn on collection changed notifications after new chart point was added there.
this
.Data.ResumeNotifications();
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
}
catch
(Exception ex)
{
if
(ex.InnerException !=
null
)
raiseNotification(ex.InnerException.Message,
"Ошибка"
);
else
raiseNotification(ex.Message,
"Ошибка"
);
}
}
/// <summary>
/// Creates chart point.
/// </summary>
/// <returns></returns>
private
ChartPoint CreateBusinessObject()
{
this
._soundVelocityValue = GlobalStaticMembers.SoundVelocityBuffer;
ChartPoint point =
new
ChartPoint();
point.Value =
this
._soundVelocityValue;
point.Category =
this
._lastDate;
return
point;
}
/// <summary>
///
/// </summary>
private
void
FillData()
{
RadObservableCollection<ChartPoint> collection =
new
RadObservableCollection<ChartPoint>();
this
._lastDate = DateTime.Now;
this
._alignmentDate =
this
._lastDate;
for
(
int
i = 0; i < 31; i++)
{
this
._lastDate = DateTime.Now;
collection.Add(
this
.CreateBusinessObject());
}
this
.Data = collection;
}
/// <summary>
/// Starts polling timer.
/// </summary>
public
void
startTimer(
bool
param)
{
if
(!
this
._timer.IsEnabled)
this
._timer.Start();
}
/// <summary>
/// Stops polling timer.
/// </summary>
public
void
stopTimer(
bool
param)
{
this
._timer.Stop();
}
/// <summary>
/// Updates polling timer interval.
/// </summary>
/// <param name="interval"></param>
public
void
UpdateTimer(
double
interval)
{
this
._timer.Interval = TimeSpan.FromMilliseconds(interval);
}
/// <summary>
///
/// </summary>
private
void
updateAlignmentDate()
{
this
.AlignmentDate =
this
._useAlignmentDate ? (DateTime?)
this
._lastDate :
null
;
}
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#endregion
}
Hello, I am attempting to build licensed copies of 2015_1_0401 WPF to use with a WPF 4.5.1 application.
I built the assemblies from Source Code using the instructions for creating Licensed builds and can see in the JustDecompile that the licensed strings were present and working properly. I used the aforementioned bat file to build on a clean VM of Windows 8.1 x64 with VS 2013.4 which is only used for building purposes. I don't have anything installed on it other than VS.
Unfortunately, when I create a basic WPF Scenario project and add references to my custom built Xamlless DLLs, I find that no windows are visible at all. I have followed the help instruction on applying Implicit themes.
To validate where the problem existed, in my built DLLs or elsewhere, I created a simple project with one main window and one Telerik Window and a button on the main to open the telerik window. Same issue existed. So I removed the references to my custom built DLLs and replaced the references with the "installed" Xamlless DLLs from my Program Files directory and everything worked perfectly.
So a few questions on this as I have now spent hours trying various approaches and building/rebuilding/new test projects etc:
1. the BAT build results in 5336 Warning(s) and 0 Errors. That seems very high to me--I am for 0 personally... is this high number expected?
2. the resulting Binaries folder contains two directories: WPF and WPF.NoXaml. The WPF.NoXaml directory contains a child called "Dev."
Which of these is the right binaries directory to use?
3. Does Telerik WPF installation need to be performed on my VM in order to build these BAT files properly?
4. What could be wrong with the build process--it is very straight forward, extract the Source Code, alter the Licensing files, and run the given Bat script.
Thanks in advance!
Hi,
Is there a way to resize or drag images in a RichTextBox with the touch?
Now it seems the touch allows only the scroll of the document and the selection of text and images.
Thanks
Hi,
I am using RadRichTextBox and filling it with XAML Data Provider. For text construction I am using "Segoe UI" font of size 12. When I am two lines separated by Enviornement.NewLine it looks like the line spacing is more than 1. I tried to decrease the line spacing by LineSpacingType as Exact and LineSpacing to 0.75. Due to this text appearance changed and not readable. Following is the example.
Paragraph title = new Paragraph();
title.LineSpacingType = LineSpacingType.Exact;
title.LineSpacing = 0.75;
I used SetupDocument method of XamlDataProvider to decrease the spacing. But no luck.
e.Document.LineSpacing =1;
Note: I am using latest version of WPF Controls of Telerik.
Please Help.
Hi,
I need some help on an issue with the RadGridView.
In my grid I have a status column and some text columns.
The status column has a binding to an enum with 4 values and a cellstyle to get displayed a status image.
When I have the FilteringMode set to FilterRow and the filter field of the text column contains some text I get a System.FormatException while dragging the status column over this text column saying that the value from the filter field is not a valid value for the status column.
But why will try the grid to set filter values from one column to another?
Any suggestions how to get this fixed?
Many thanks for all tips.
Cheers,
Thomas
but on an unbound DataPager.
The two way binding of the combo box to the PageSize seems to work, as the number of pages is changed to reflect the selected value. However, there is no event that allows me to set the items on the grid view, which is normally done in the PageIndexChanged event handler.
Currently, I am adding a SelectionChanged event handler to the combo box from which I call the same implementation as in the DataPager's PageIndexChanged handler, but this seems like it should be unnecessary.
Am I missing something?