Telerik Forums
UI for WPF Forum
3 answers
261 views
I am using the trial for WPF and i have a datagrid set up with a 10 visible columns and 20+ that are hidden.

I have the search panel show above the datagrid. i would like to search for values in the hidden columns.

 

For example, the datagrid shows locations and address of buildings. lets say i want to find a record where 'Comments' column contains "secret message"

 

Visual aid: https://www.dropbox.com/s/6mfcxlvz2qhzqjd/Untitled.png?dl=0

Martin
Telerik team
 answered on 05 Dec 2016
6 answers
705 views

I am using the checkboxes in a RadTreeView. The treeview items are bound to my own heirarchical type called TreeNode. When an item is checked how do I determine which TreeNode object was checked?

Currently I am using a command to handle the IsChecked event of the control. I am passing the event arguments to the command. I can get access to all the checked items in the tree as TreeNodes, but am at a loss as to which one was actually last checked.

 <telerik:RadTreeView x:Name="TreePermissions"
                                                 DockPanel.Dock="Top"
                                                 MinHeight="50"
                                                 BorderBrush="Black"
                                                 BorderThickness="1"
                                                 Margin="5,0,5,0"
                                                 IsOptionElementsEnabled="True"
                                                 ItemsSource="{Binding UserPermissions}"
                                                 ItemPrepared="TreePermissions_ItemPrepared">
                                
                                <telerik:EventToCommandBehavior.EventBindings>
                                    <telerik:EventBinding Command="{Binding PermissionCheckedCommand}" EventName="Checked"
                                                          PassEventArgsToCommand="True" />
                                </telerik:EventToCommandBehavior.EventBindings>
                                
                                <telerik:RadTreeView.ItemContainerStyle>
                                    <Style TargetType="{x:Type telerik:RadTreeViewItem}">
                                        <Setter Property="IsExpanded" Value="True"/>
                                        <Setter Property="IsChecked" Value="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}"/>
                                        <Setter Property="IsEnabled" Value="{Binding IsEnabled, UpdateSourceTrigger=PropertyChanged}"/>
                                    </Style>
                                </telerik:RadTreeView.ItemContainerStyle>
                            </telerik:RadTreeView>

 

private void OnPermissionChecked(object obj)
        {
            var args = obj as Telerik.Windows.Controls.RadTreeViewCheckEventArgs;
            Telerik.Windows.Controls.RadTreeViewItem item = args.OriginalSource as Telerik.Windows.Controls.RadTreeViewItem;
            // TreeNode node = item as TreeNode; // This does not work, cannot cast/convert for some reason
            Telerik.Windows.Controls.RadTreeView source = args.Source as Telerik.Windows.Controls.RadTreeView;
            if (source != null)
            {
                List<TreeNode> temp = source.CheckedItems.Cast<TreeNode>().ToList();
            }
        }

Heiko
Top achievements
Rank 1
 answered on 05 Dec 2016
1 answer
101 views
I am using a RadDateTimePicker to allow a user to select, strangely enough, a date and time.  I set the date for the control to some value (e.g. 8/16/2016 4:03 AM) which it happily displays (see attached DatePickerOK.jpg).  However, when the user clicks the button to pop up the picker, the calendar header says "January - 1000" (see attached DatePickerError.jpg) instead of the expected "August - 2016".  If the user selects a different time and closes the picker window, the text box displays the newly selected time along with the CORRECT month/day.  What am I missing?
Nasko
Telerik team
 answered on 05 Dec 2016
1 answer
496 views

I have an eventtocommandbehavior  binding as shown below to deal with the EditEnded event of the raddataform which I am using as a row details editor in my gridview. I get the call in my viewmodel from the command with the args, but they are kinda useless.
How to tell what row was being edited?
Also, if the user hits the cancel button how do I prevent the gridview from being updated? I am beginning to wonder what the raddataform buys me. 
My current dataform uses ONLY custom fields. Couldn't I just get rid of the raddataform and use a regular grid with the controls I want as a rowdetailstemplate? If I did that, how could I wire up the OnRowEditEnded event of the gridview to a command associated with a button in my rowdetails editor? For that matter, how to wire it up to the raddataform if I have to use it.
I hope I'm making sense here.

Any help would be great.

Thanks ... Ed

 

 

 

 

<telerik:RadDataForm CurrentItem="{Binding}" CommandButtonsVisibility="All">
 
    <telerik:EventToCommandBehavior.EventBindings>
 
        <telerik:EventBinding Command="{Binding DataContext.EditEndedCommand, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}" EventName="EditEnded" PassEventArgsToCommand="True"/>
 
    </telerik:EventToCommandBehavior.EventBindings>
 
</telerik:RadDataForm>
Stefan Nenchev
Telerik team
 answered on 05 Dec 2016
2 answers
299 views

Hello,

i'm using the Telerik Dock Controls.

In order to mvvm i'm using the binding to the Property PanesSource.

I Add a login Screeen at startup and want to show it in the center of the application and not docked to any of my SplitContainers.

The XAML head of the RadPane looks as followed:

<telerik:RadPane x:Class="ProductLifecycle.Frontend.UI.UserControls.LoginPage"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:ProductLifecycle.Frontend.UI.UserControls"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:viewModels="clr-namespace:ProductLifecycle.Frontend.ViewModels"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" Header="{Binding Title}"
                 d:DataContext="{d:DesignInstance viewModels:LoginPage, IsDesignTimeCreatable=False}"
                 telerik:RadDocking.DockState="FloatingOnly" telerik:RadDocking.FloatingSize="300,200" CanUserClose="False" CanUserPin="False" CanDockInDocumentHost="False" >

 

Everytime when i add this Control to my Binded Collection this window appears in the left of the docking control.

How can i start this window as floating window in front of my application?

Thanks,

Michael

Michael
Top achievements
Rank 1
 answered on 05 Dec 2016
6 answers
118 views
Dose the DataForm looking on the MetadataTypeAttributes for validations ?

I hava a wcf data service, that create a auto generated class, i added a partial class with MetadataType, but the dataform validation ignore the settings 

[MetadataType(typeof(Person.Metadata))]
    public partial class Person 
    {
        internal sealed class Metadata
        {
            [Required]
            public string FirstName { get; set; }
        }
    }
Randy Hompesch
Top achievements
Rank 1
 answered on 03 Dec 2016
1 answer
97 views

Hi to all,

I'm trying to use an EditTemplateSelector, but I have problem to retrieve DataContext of RadWindow, my RadWindow has x:Name="radWindow", its relative ViewModel exposes a List<T> collection called StatiCertificato, it seems that it not found it.

When selector use campoEditTesto it works correctly and it works correclty with campoEditData also, when it uses campoEditStato or campoEditDecisione show me correctly RadComboBox but without items. It checked that my collection are full.

Am I using a wrong approach for binding into ItemSource property? If yes, what's wrong?

<templateSelector:ValoreEditTemplateSelector x:Key="campiEditTemplateSelector">
    <templateSelector:ValoreEditTemplateSelector.campoEditTesto>
        <DataTemplate>
            <TextBox Text="{Binding Valore,Mode=TwoWay}"  />
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditTesto>
    <templateSelector:ValoreEditTemplateSelector.campoEditStato>
        <DataTemplate>
            <telerik:RadComboBox ItemsSource="{Binding StatiCertificato, ElementName=radWindow}"
                                 SelectedItem="{Binding StatoCertificatoSelezionato,Mode=TwoWay}"
                                 DisplayMemberPath="Descrizione" SelectedValuePath="Valore"/>
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditStato>
    <templateSelector:ValoreEditTemplateSelector.campoEditDecisione>
        <DataTemplate>
            <telerik:RadComboBox ItemsSource="{Binding DecisioniCertificato, ElementName=radWindow}"
                                 SelectedItem="{Binding DecisioneCertificatoSelezionato,Mode=TwoWay}"
                                 DisplayMemberPath="Descrizione" SelectedValuePath="Valore"/>
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditDecisione>
    <templateSelector:ValoreEditTemplateSelector.campoEditData>
        <DataTemplate>
            <telerik:RadDatePicker SelectedValue="{Binding Valore, Mode=TwoWay, Converter={StaticResource editDateConverter}}"/>
        </DataTemplate>
    </templateSelector:ValoreEditTemplateSelector.campoEditData>
</templateSelector:ValoreEditTemplateSelector>
Lance | Senior Manager Technical Support
Telerik team
 answered on 02 Dec 2016
1 answer
86 views

Hello,

I want to Change Deadline forecolor to Blue of Telerik Gantt view. Now it is in Red color.

Please help me.

Thanks in advance

Martin
Telerik team
 answered on 02 Dec 2016
1 answer
573 views

Hi,

I am using RadAutocompletebox in scrollable size window. Window has vertical scroll and autocompletebox is at center of window. I have typed a text in completebox and suggestion popup appears and my mouse is on textbox area.Now, I have used mouse wheel event. When i use mouse wheel, popup scroll accordingly to up and down.

My concern is that popup should remain at one place but window can scroll accordingly.

Nasko
Telerik team
 answered on 02 Dec 2016
1 answer
150 views

Hi,

So when using an application like SQL Server Management Studio I can run a query (let's say select * from customer although my queries are very user driven with a few joins mostly the SQL is generated dynamically) and the results grid will start populating rows extremely quickly until the full set is returned.

I want to emulate this behavior using a RadGridView (WPF)

I have tried using a data set it takes to long and you don't get that initial feedback of seeing the first rows start flooding in.

Next I tried loading the customers from a data reader and putting each row into an ObservableCollection<Customer> it is way faster and allows the objects in .Net to start being populated even before the query has finished but ultimately the UI was unable to keep up with the reader and froze until the full set was populated.

What would be the best approach to get that fast response of data loading and the user seeing the rows start to appear without locking down the UI Thread of the application?

A typical result set is around 100k records and I can put it in the grid in about 5 seconds using a dataset im hoping to get similar time while showing the user immediate feedback their query is getting results

Ivan Ivanov
Telerik team
 answered on 02 Dec 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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?