Telerik Forums
UI for WPF Forum
3 answers
186 views

I have a fairly complicated application that includes a RadDataForm that contains a TextBox that is supposed to allow a user to type multiple lines. The TextBox has TextWrapping="Wrap" and AcceptsReturn="True", but it doesn't work, of course, because RadDataForm binds the return key, and commits the form, regardless of what type of field has the focus.

So I wrote a simple DataFormCommandProvider:

public class ClearReturnKeyActionCommandProvider : DataFormCommandProvider
{
    public ClearReturnKeyActionCommandProvider()
        : base(null)
    {
    }
 
    public ClearReturnKeyActionCommandProvider(RadDataForm dataForm)
        : base(dataForm)
    {
        this.DataForm = dataForm;
    }
 
    public override List<DelegateCommandWrapper> ProvideCommandsForKey(KeyEventArgs args)
    {
        var actionsToExecute = base.ProvideCommandsForKey(args);
        if (args.Key == Key.Return)
        {
            actionsToExecute.Clear();
        }
 
        return actionsToExecute;
    }
}

Stick this in a resource, and set the form's CommandProvider, and suddenly I can enter multiple lines in the TextBox:

<telerik:RadDataForm Grid.Row="1" Grid.Column="0"
    ItemsSource="{Binding Path=viewModel.contacts, RelativeSource={RelativeSource AncestorType=KtWpf:ContactsControl}}"
    AutoGenerateFields="False"
    EditTemplate="{StaticResource contactsEditTemplate}"
    NewItemTemplate="{StaticResource contactsEditTemplate}"
    ReadOnlyTemplate="{StaticResource contactsEditTemplate}"
    AutoEdit="False"
    CommandButtonsVisibility="None"
    CommandProvider="{StaticResource clearReturnKeyActionCommandProvider}"
    InitializingNewItem="radDataForm_InitializingNewItem"
    EditEnding="radDataForm_EditEnding"
    />

And, of course, something else breaks.

I have a pair of save and cancel buttons, outside the form, that set RadDataFormCommands.CommitEdit and RadDataFormCommands.CancelEdit.

<telerik:RadButton Style="{StaticResource actionButton}"
    Content="Save"
    Command="telerik:RadDataFormCommands.CommitEdit"
    CommandTarget="{Binding ElementName=radDataForm}"
/>
 
<telerik:RadButton Style="{StaticResource actionButton}"
    Content="Cancel"
    Command="telerik:RadDataFormCommands.CancelEdit"
    CommandTarget="{Binding ElementName=radDataForm}"
    />

When I do not have the CommandProvider set, these work fine. But when I do, they're disabled. Both of them are disabled, even the Cancel button, which isn't ever supposed to be disabled.

This should be simple. What am I doing wrong?

Dilyan Traykov
Telerik team
 answered on 24 Aug 2016
1 answer
179 views
Hello, I trying to achieve a vertical line below the minor ticks to show up in the timeline of the RadGanttView. Can you extend a thin line below the minor ticks (or major ticks) to help the user see which time it is in the timeline as a visual cue?
Nasko
Telerik team
 answered on 24 Aug 2016
3 answers
133 views

I have a RadDataForm, and need to be informed when the form's validation status changes.

What I thought I could do was to listen to RadDataForm.ValidationSummary.Errors.CollectionChanged, but unfortunately, even as late as RadDataForm.Loaded, RadDataForm.ValidationSummary is null.

Is there some event that RadDataForm fires when its validation status changes?

Or some event that RadDataForm fires after its ValidationSummary has been created?

Stefan Nenchev
Telerik team
 answered on 24 Aug 2016
1 answer
124 views

Hello,

I'm using a GridView with data bound via VirtualQueryableCollectionView (like in this example: http://docs.telerik.com/devtools/wpf/consuming-data/using-data-virtualization).

 

When a user double clicks a row, I show a detail form and after the user is done editing and closes the form, I reload the data to reflect the changes made by this and other users.

 

After loading the data, I would like to highlight the row the user just edited.

 

When the GridView is bound do a normal list of data, I can easily do that by querying for the object in the loaded data and then setting

gridView.SelectedItem = x

but since switching to the VirtualQueryableCollectionView, this doesn't work any more.

 

Is there any way to select a data item / row in a GridView that uses VirtualQueryableCollectionView as DataContext?

 

Martin
Telerik team
 answered on 23 Aug 2016
1 answer
209 views

Hi all,

I am working on a WPF application using Telerik and coded in C# .NET.
My following question goes over an ASP .NET page using the model “Code behind” to implement the logic of the page.

Presently, I have a <telerik:RadGridView> for which the scrollbar moves at the same time as the RadGanttView chart scrollbar.

But I am facing to an issue : 

I would like to get the MinorTick actual width and apply it to the RadGridView columns.

I edited a copy of the template of the GanttView in order to find (I hoped) the width value of the MinorTick. I did not find it.

I accessed the MinorTick's Interval and I tried to apply it to the RadGridView columns, but I cannot.

How could I do to have RadGridView columns with the same width as the one from the RadGanttView chart columns ?


Any help or tip will be much appreciated :)

Yana
Telerik team
 answered on 23 Aug 2016
1 answer
245 views

I am using the TreeListView to display a class hierarchy.  All classes have a base class called Node.  Many parents have children of different types but they are all of type Node. 

The tree displays just fine until I filter on the "FC" column then I get the following exception:  

Additional information: Unable to cast object of type 'TMW.i61850.Model.DataSet' to type 'TMW.i61850.Model.LogicalDevice'.  

The LogicalDevice happens to be the root item in the tree in this case and the DataSet happens to be a grandchild of the LogicalDevice.  Both DataSet and LogicalDevice are of type Node.  

All Column binding is bound to properties that only exist on the Node class.  

<telerik:RadTreeListView ItemsSource="{Binding}"  x:Name="TreeView" Grid.Row="1" IsFilteringAllowed="True"  AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False"

            CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" BeginningEdit="BeginningEdit"  CellEditEnded="CellEditEnded" DistinctValuesLoading="TreeView_DistinctValuesLoading">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}"/>
            </telerik:RadTreeListView.ChildTableDefinitions>

            <telerik:RadTreeListView.Columns>
                <telerik:GridViewDataColumn  Header="Name" Width="300" DataMemberBinding="{Binding Name}"  />
                <telerik:GridViewDataColumn  Header="Value" Width="200" DataMemberBinding="{Binding Value}" />
                <telerik:GridViewDataColumn  Header="FC"  Width="200" DataMemberBinding="{Binding FC}"  />
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>

Stefan Nenchev
Telerik team
 answered on 23 Aug 2016
1 answer
163 views

In ouer  project we use the Docking manager for the Aplication layout.  Some Overviews are  to the Bottom and the one (with Program mesages to the right sight). Its not nice when  the user accidently short the mouse curser over the Pane button and it apears. Learning abaut the docking i've got the idea that the pre popup and auto hide tiemout can be set but i didnt find any property to set them up.

the next propblem is thesome times the panels doesnt hides when the other Panel got the focus. Some times i must click to the right part of subcontrols(such as textbox or combobox to make the panel hide).

Nasko
Telerik team
 answered on 23 Aug 2016
5 answers
150 views

Hi,

I'm trying to create a view based on WeekView and with a footer recapulating specials appointments (named Tasks).
This would look like attached file (ExpectedSchedulerView.png).

The most handy way would be having 2 RadSchedulerView (classic one on top, lightened MonthView on bottom). But I experiment some issue having two RadSheduleView both visible and with different behaviour.

A second and cleaner way would be having an other AppointsPanel/TimeRulerLinesPanel in the RadScheduleViewControlTemplate. That way I'm being blocked by encapsulation : Arrange/MeasureOverride throw exception (NullRef) because the new template child isn't properly initialized.

Then my questions are :

* Is there a known issue about multiple RadScheduleView ? (I already searched for it but got nothing relevant)
* Is extending RadScheduleViewControlTemplate a proper solution or is there an easier/cleanier/more efficient one ?

Thanks,

Romain
Top achievements
Rank 1
 answered on 22 Aug 2016
3 answers
299 views

hi dear developers,

I need to customize the connections in raddiagram just like the attached shape. i reviewed the forum and only find an example that change the color of the connection but i need a more complex connection as it is attached. how can i do that?

al
Top achievements
Rank 1
 answered on 22 Aug 2016
3 answers
192 views

hi dear supporters,

I need to change the shape of connectors of a shape to a custom shape that is a jpg or other image formats.

how can I do that?

al
Top achievements
Rank 1
 answered on 22 Aug 2016
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?