Telerik Forums
UI for WPF Forum
2 answers
177 views
Good morning
I am using the SHOWSEARCHPANEL properties datagridview component and I would need to tie me to the click event of the search textbox.
Can you help me?
Thank you
Burato
Top achievements
Rank 1
 answered on 20 Jul 2016
1 answer
154 views

Hi,

If you set the Item to an IEnumerable, the control strips away all the Attributes of the source properties. For example, the DisplayNameAttribute, or the DescriptionAttribute (all of them). So, what you get is with one item, you see the display names of properties as declared in the class, but then if you supply a List of 2 items, all the display names are shown as the original property name. Kind of odd.

To further confirm, if I hook onto the AutoGeneratingPropertyDefinition event, and I want to add logic like suppress a property if it has the MergableProperty(false) attribute, well, I can't, because the PropertyDefinition.SourceProperty.Descriptor you supply has no Attributes. The collection is empty. You've supplanted the original PropertyDescriptor with a PropertySetPropertyDescriptor that has stripped away much useful information.

Luckily, I can work around all of these problems by matching up property names with the original PropertyDescriptors for the given type, and then fixing up the property definitions, but I don't know, I think you can do this a lot better.

Also, it seems necessary to have to switch the PropertySetMode between 'None' and 1 of the other choices when going from single item to multiple items. Why? Why can't the logic be smart enough to say, if Item is not an IEnumerable, then do single item properties, else if multiple items, then do multi-item logic. The property should not need to change. Changing PropertySetMode causes an internal Refresh, so we must set Item to null first. There are other quirky behaviors I've noticed when going to and from single-item mode and multi-item mode, like with the CategoryAttribute, it can stick in the UI when in Grouped mode, even though the Category heading should disappear, but I'll wait to see what you say to all of this.

 

 

 

Stefan
Telerik team
 answered on 20 Jul 2016
1 answer
208 views

Create a couple of RadPanes in one RadPaneGroup so that it shows the tab headers. Create another RadPaneGroup with a RadPane.

Put a RadTreeView in the first RadPane, populate with some items.

OK, select 1 of the TreeView items.

1. If you click on the RadPane header in the separate group to activate it, the selected TreeView item will switch to "SelectedUnfocused" state (turns gray).

2. Click back on the TreeView item to focus it again.

3. This time, click on the other RadPane tab in the same group. Click back on the pane tab header with the TreeView. In this case, the TreeView item is still blue (in a SelectedFocused state). But it actually is not "focused". At least not keyboard focused, so it should be gray.

 

Code I found :)

If you look in Docking.PaneHeader.OnMouseLeftButtonDown(), when the user selects a RadPaneGroup, Focus() will be called on that group. That is why the RadTreeViewItem turns gray in the first test.

But no such "Focus()" call can be found when only a RadPane is activated. To fix, I put a Focus() call in RadDocking.ActivePaneChanged event, but you may want to do it differently. :)

 

 

 

Polya
Telerik team
 answered on 20 Jul 2016
4 answers
111 views
Any picture inserted in header section are not shown when it's exported to pdf using PdfFormatProvider. Is there any solution?
Boby
Telerik team
 answered on 20 Jul 2016
1 answer
48 views

Hello All,
     I have been tasked in a WPF/MVVM application to setup a TreeListView that shows some "Property/Value" pairs.  For most of the properties, the value should be a simple textbox, but for some of the particular properties, the values should be displayed as a dropdown selection.  Is there a way to get this done.  I'm starting down the path of in the table that stores these property/value pairs, have a column that designates what type of "Value" cell show be displayed, the by using that setting up a CellEditTemplate to properly configure the cell as either a textbox or dropdown...  Having never created a CellEditTemplate before, I wasn't sure if this is possible or even the correct path to venture down...  So, there's my dilemma/question...  If this is the correct path, is there a good example of how to get this done???

 

Thanks in advance,

Kevin Orcutt
Senior Software Engineer

Wurth Electronics ICS, Inc.
7496 Webster St., Dayton, OH 45414
Tel: 937.415.7700 
Toll Free: 877.690.2207
Fax: 937.415.7710
Email: Kevin.Orcutt@we-ics.com
http://www.we-ics.com

Stefan
Telerik team
 answered on 20 Jul 2016
4 answers
2.2K+ views

Hi people,

I have problem with RadGridView and background color: I can't set it ! I have a MVVM application and the grid is bind with observable collection; all my data are displayed correctly:

<telerik:RadGridView x:Name="dataGrid" ItemsSource="{Binding Model, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" AutoGenerateColumns="False" FrozenColumnCount="1" CanUserDeleteRows="False" CanUserInsertRows="False" GroupRenderMode="Flat" ShowGroupPanel="False" ClipboardPasteMode="Default" SelectionMode="Extended" SelectionUnit="Cell" >
 
<telerik:GridViewDataColumn Header="Data" DataMemberBinding="{Binding Date}" DataFormatString="{} {0:dd/MM/yyyy}" IsReorderable="False" IsSortable="False" IsFilterable="False" IsReadOnly="True" Width="80" />
 
<telerik:GridViewDataColumn Header="Flow" DataMemberBinding="{Binding Flow}" IsSortable="False" IsFilterable="False" IsReadOnly="True" Width="110" />

Now I want to color the row and bind it to property named UserInput (boolean) using converter like this:

internal class UserInputConveter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var userInput = (bool)value;
 
            if (userInput)
                return new SolidColorBrush(Colors.GreenYellow);
 
            return new SolidColorBrush(Colors.Transparent);
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

But it doesn't work. I tried:

1)

<telerik:RadGridView.RowStyle>
    <Style TargetType="telerik:GridViewRow">
        <Setter Property="Background" Value="{Binding UserInput,Converter={StaticResource UserInputConveter}}"></Setter>
    </Style>
</telerik:RadGridView.RowStyle>

Result: all my rows disappear!

2)

<telerik:GridViewDataColumn.CellStyle>
    <Style TargetType="telerik:GridViewCell">
        <Setter Property="Background" Value="{Binding Path=UserInput, Converter={StaticResource UserInputConveter}}"></Setter>
    </Style>
</telerik:GridViewDataColumn.CellStyle>

Result: my single cell disappear.

3)

<telerik:GridViewDataColumn Header="Flow" DataMemberBinding="{Binding Flow}" IsSortable="False" IsFilterable="False" IsReadOnly="True" Width="110" Background="{Binding Path=UserInput, Converter={StaticResource userInputConverter}}" />

OR

<telerik:GridViewColumn.Background>
    <SolidColorBrush Color="{Binding Path=UserInput, Converter={StaticResource userInputConverter}}" />
</telerik:GridViewColumn.Background>

Result: the color of cell is thedefault, no change.

Where is my error? How I can do it?

Thanks a lot.

Stefan
Telerik team
 answered on 19 Jul 2016
1 answer
101 views

Is there a way to initialize a map to a specific position without having to see the map rapidly pan and zoom?

I have a set of items in a VisualizationLayer and I would like to display those items on the map without scrolling and zooming. The layer is bound to a list in the xaml.

Currently, I set the bounds by calling GetBestView() on the VisualizationLayer to get the precise boundaries. This works, but the map starts at coordinates 0,0 and then scrolls and zooms. It does this for several seconds - the appearance is very annoying to the user. 

I would like to be able to set the bounds directly and have the map go straight to the area without scrolling and zooming. It may be that I am not setting the bounds at the appropriate time?

Is this even possible?

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Jul 2016
1 answer
192 views
I have a StatusPicture shape class, which has an observablecollection of ValuePairs inside it. When I copy and paste these statuspicture shapes, the items of observablecollection won't appear in the new shape. How could this be done?
Stefan Nenchev
Telerik team
 answered on 19 Jul 2016
1 answer
83 views

Hello,

I started using this custom polyline tool (http://www.telerik.com/forums/polyline-tool) but somehow it does not receive the keyboard input (pressing the Enter key to 'stop' the drawing of the polyline). 

The exact same happens with the default PathTool (which should respond to the ESC key as can be seen in the Demo application).

What could this be? I did not find any setting which has anything to do with handling keyboard input.

Best regards,

Douwe

Martin Ivanov
Telerik team
 answered on 19 Jul 2016
2 answers
184 views

I have a TreeListView control that I need to expand and collapse rows via the view model. The problem is the TreeListView control will sometimes update after updating the view model but not always. Or sometimes the TreeListView control will update after a few seconds. If I scroll to the bottom of the TreeListView control and back it will always refresh to match the correct view model values. 

I have put debug statements next to the OnPropertyChanged calls and it always seems to be firing correctly. Since the TreeListView control will sometimes update it seems like it is not a binding issue to me. It's configured to use TwoWay binding. INotifyPropertyChanged is implemented in the view model. It feels like the TreeListView is not always getting the OnPropertyChanged event but I don't know why it would get it sometimes and not other times.

I am thinking I could implement a way to force the TreeListView control to refresh any time the property that IsExpandedBinding is bound to changes but this does not seem like a good solution to me.

Any thoughts as to why this may occur?

Stefan
Telerik team
 answered on 19 Jul 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?