Telerik Forums
UI for WPF Forum
1 answer
129 views
I have display whether 10 or more records in RadGridView. then i can scroll down. in my functionality click checkBox after that RadGridView itemsource are assigned or refreshed Radgridview fully refreshed. in this situation i need to display previously scroll position.

Ex:
----
this.MedicalNoteHistoryGrid.ScrollIntoViewAsync(this.MedicalNoteHistoryGrid.Items[this.MedicalNoteHistoryGrid.Items.Count - 1],
                                                                      this.MedicalNoteHistoryGrid.Columns[this.MedicalNoteHistoryGrid.Columns.Count - 1],
                      new Action<FrameworkElement>((f) =>
                         {
                           (f as GridViewRow).IsSelected = true;
                        }

                     ));

i can try above the code display last index of gridview row. in my functionality how to get the scroll position.

Regards,
Dhanush.


Dimitrina
Telerik team
 answered on 16 Mar 2015
1 answer
358 views
I have a RadGridView that is using filters. And i have a RadDataPager with its source set to the "Items" of the RadGridView. I want to display the total number of filtered items in the grid. What is the best approach to get the number of filtered items? Since i use paging, i cant just count the visible rows in the grid. And i cant use the RadDataPager.PagedSource.ItemCount, since that value is not affected by the filtering. Is there no "FilteredItemsCount" i can use? ;)
Dimitrina
Telerik team
 answered on 16 Mar 2015
7 answers
321 views

Hello

I need to give the numeric up down IsReadOnly property, and the user can't input data.

IsEditableProperty =False  the user can insert data in the keys up/down arrows,page up/down keys.

How to implement this scenario?

Best regards

Ehud.

Kalin
Telerik team
 answered on 16 Mar 2015
1 answer
144 views
Migrating from Telerik UI for WPF 4.0 2014.3.1021 to 2015.1.225.40 I've found the following issue.

A requirement of the project I'm working on is that some shapes must have only the 'Auto' connector (others are programmatically removed as below):

var connectorsToBeRemoved = shape.Connectors.Where(x => x.Name != "Auto").ToList();
 
foreach (var connector in connectorsToBeRemoved)
{
    shape.Connectors.Remove(connector);
}

Connecting an arc from any shape to this kind of shape the connection EndPoint is equals to StartPoint, so the connection is not visible.
Adding a fake connector solves the issue, but of course is a workaround:

private static void WorkaroundTelerik2015Q1(RadDiagramShape shape)
{
    var fakeConnector = new RadDiagramConnector {Offset = shape.Connectors[0].Offset, Name = "Fake", IsEnabled = false,};
    shape.Connectors.Add(fakeConnector);
 
    Canvas.SetZIndex(fakeConnector, -999);
}

Another workaround - not viable for me because of existing saved diagrams - is to rename the 'Auto' connector to something else.

Is there a better solution?
Is this the desired behavior or is it a bug?

Thank you for your time.

Regards, 


Manuel
Milena
Telerik team
 answered on 16 Mar 2015
5 answers
553 views

I am trying to display data vertically using wpf telerik RadGrid, which needs to be exported to excel in the same layout format. I have set LayoutTransform property of the telerik wpf radgrid to an angle so as to achieve this, but have run into below issues:

export the data with vertical layout intact,
grid lines disappeared after applying rotation style to the grid cells,
unable to hide the row selection highlight,
horizontal and vertical scrolls are not aligned correctly

Can someone please help me with these? I am also wondering, if is it preferable to use PivotGrid for such layout?

Any suggestions would be of great help!

Thanks in advance, Lax

 

Dimitrina
Telerik team
 answered on 13 Mar 2015
2 answers
256 views
I am using the solution from another thread to hide the group headers, that works fine but i can still see a small line/rectangle, is there a way to hide that. (attached image).

Thanks
vikas

<local:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
                <DataTemplate>
                    <ContentPresenter Content="{Binding FormattedName}" Height="0" Margin="0" Visibility="Collapsed" />
                </DataTemplate>
            </local:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
Vikas
Top achievements
Rank 1
 answered on 13 Mar 2015
3 answers
305 views
If I use an Observable collection for a property I get a collection editor in my RadPropertyGrid but all the buttons are disabled. So I tried Implementing IEditableCollectionView. It does not recognize the type and does nothing.

Please review the class definitions below or send me an example project where RadPropertyGrid will open and edit a collection of objects.

Here is the custom type where Answer is a type I cannot change but has a default constructor.

public class AnswersCollectionView<T> : IEditableCollectionView where T : Answer
{
private ObservableCollection<Answer> _answers;
public ObservableCollection<Answer> _Answers
{
get
{
if (_answers == null)
{
_answers = new ObservableCollection<Answer>();
return _answers;
}
else
{
return _answers;
}
}

set
{
_answers.Clear();
foreach (var item in value)
{
_answers.Add(item);
}
}
}

private Answer _newanswer;
public Answer NewAnswer
{
get { return _newanswer; }
private set { _newanswer = value; }
}

private Answer _editanswer;
public Answer EditAnswer
{
get { return _editanswer; }
private set { _editanswer = value; }
}

private int CurrentIndex { get; set; }

public AnswersCollectionView() { }

public object AddNew()
{
NewAnswer = new Answer();
return NewAnswer;
}

public bool CanAddNew
{
get { return true; }
}

public bool CanCancelEdit
{
get { return false; }
}

public bool CanRemove
{
get { return true; }
}

public void CancelEdit()
{
EditAnswer = null;
}

public void CancelNew()
{
NewAnswer = null;
}

public void CommitEdit()
{
_Answers[CurrentIndex] = EditAnswer;
}

public void CommitNew()
{
_Answers.Add(NewAnswer);
}

private object _currentAddItem;
public object CurrentAddItem
{
get { return _currentAddItem; }
private set { _currentAddItem = value; }
}

private object _currentEditItem;
public object CurrentEditItem
{
get { return _currentEditItem; }
private set { _currentEditItem = value; }
}

public void EditItem(object item)
{
IsEditingItem = true;
EditAnswer = (Answer)item;
CurrentIndex = _Answers.IndexOf(EditAnswer);
}

private bool _isAddingNew;
public bool IsAddingNew
{
get { return _isAddingNew; }
private set { _isAddingNew = value; }
}

private bool _isEditingItem;
public bool IsEditingItem
{
get { return _isEditingItem; }
private set { _isEditingItem = value; }
}

private NewItemPlaceholderPosition _newItemPlaceholderPosition;
public NewItemPlaceholderPosition NewItemPlaceholderPosition
{
get
{
return _newItemPlaceholderPosition;
}
set
{
_newItemPlaceholderPosition = System.ComponentModel.NewItemPlaceholderPosition.AtEnd;
}
}

public void Remove(object item)
{
if (item is Answer)
_Answers.Remove((Answer)item);
}

public void RemoveAt(int index)
{
_Answers.RemoveAt(index);
}
}

Here is the property on the class using the RADPropertyGrid:

public static readonly DependencyProperty AnswersProperty =
DependencyProperty.Register(
"Answers",
typeof(AnswersCollectionView<Answer>),
typeof(DesignerQuestionRadioButton));

[UserEditable]
[Category(DesignerCategoryConstants.Design)]
[Description("The collection of radio button answers.")]
public AnswersCollectionView<Answer> Answers
{
get { return (AnswersCollectionView<Answer>)GetValue(AnswersProperty); }
set { SetValue(AnswersProperty, value); }
}

Stefan
Telerik team
 answered on 13 Mar 2015
8 answers
179 views
Hi,

I'm trying to add a RadDocking control to my project. However I've noticed when I try to drag a pane from a tabbed position to another position the pane isn't under the mouse. So when I want to snap to the side or whatever I have to guess the point of reference as dragging my mouse over the compass has no effect.

I've attached a screenshot that shows the mouse position whilst dragging. The docking example I'm testing is from the SDK samples. If I stop dragging an reselect the window everything works as expected.

Thanks for any help.
Kalin
Telerik team
 answered on 13 Mar 2015
8 answers
311 views
I've had a look, but can't see anything about other people having this particular issue.

We have a WPF library that contains a RadWindow with a textbox, requiring user input. 
We then have a WinForms application that creates and show this RadWindow.
When we try to type in the textbox, nothing happens.

If we use a regular WPF window for the dialog, then we can use the ElementHost.EnableModelessKeyboardInterop() function, which makes everything work as expected. However, the RadWindow isn't actually a window, so we can't use this method.

So how do we resolve this issue?

Thanks
Jason
Kalin
Telerik team
 answered on 13 Mar 2015
3 answers
473 views
I am using the RadComboBox for an autocomplete selector in my WPF project. My available list of items is well over 200, and has the potential to be well over 1000 at any given time. When I an in edit mode for the combo box, it filters correctly based on the list items but I have run into a problem that I don't know how to fix with it. If the list goes from really large (all the items) to say like 30-40 items, the scroll bar thumb acts a bit weird. If I use the mouse wheel to scroll, it acts as if the entire list is still there, until it gets to a certain point. Once it reaches this point, the thumb of the scroll bar becomes the correct, larger size. But if I scroll up, it once again becomes the small size like it thinks the whole list is there. How can I fix this? I have posted my XMAL for what I have done below.



    <!-- Styles for the telerik RadComboBox -->
    <Style x:Key="RadComboBoxStyle" TargetType="{x:Type telerik:RadComboBox}">
        <Setter Property="FontFamily" Value="Segoe UI" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Padding" Value="5,0,5,0"/>
        <Setter Property="Foreground" Value="#1A1A1A"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="MinWidth" Value="140" />
        <!--<Setter Property="DropDownWidth" Value="*" />-->
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadComboBox}">
                            <Border x:Name="OuterBd" CornerRadius="4" Padding="1" BorderBrush="Black" BorderThickness="0">
                                <Border.Effect>
                                    <DropShadowEffect Direction="270" ShadowDepth="0.5" BlurRadius="0.5" Opacity="0.25"/>
                                </Border.Effect>
                                <Border x:Name="InnerBd" Background="{StaticResource BaseInnerBorderBrush}" BorderThickness="0" CornerRadius="3" Padding="1">
                                    <Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="2">
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
                                            </Grid.ColumnDefinitions>
                                             
                                        </Grid>
                                    </Border>
                                </Border>
                            </Border>
                            <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="true">
                            <Setter Property="BorderBrush"  Value="{StaticResource FocusedBrush}"  />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource BaseButtonMouseOverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="False">
                            <Setter Property="Background" Value="Transparent"/>
                            <Setter Property="BorderBrush" Value="Black" />
                            <Setter Property="BorderThickness" Value="1" />
                             
                        </Trigger>
                        <Trigger Property="IsDropDownOpen" Value="true">
                            <Setter Property="Background" Value="{StaticResource PressedBrush}"/>
                            <Setter Property="BorderBrush" Value="#BCBCBC"/>
                            <Setter TargetName="OuterBd" Property="Effect" Value="{x:Null}"/>
                            <Setter Property="Foreground" Value="#FFFFFF"/>
                        </Trigger>
                        <Trigger Property="ToggleButton.IsChecked" Value="true"/>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" Value="#E6E7E8"/>
                            <Setter Property="BorderBrush" Value="#A7A9AC"/>
                            <Setter TargetName="OuterBd" Property="Effect" Value="{x:Null}"/>
                            <Setter TargetName="InnerBd" Property="Background" Value="#E6E7E8"/>
                            <Setter Property="Foreground" Value="#6D6E71"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
     
    <!-- Styles for the telerik RadComboBoxItem -->
    <Style TargetType="{x:Type telerik:RadComboBoxItem}">
        <Setter Property="Padding" Value="5,0,5,0"/>
        <Setter Property="Foreground" Value="#1A1A1A"/>
        <Setter Property="Background" Value="#FFF2F2F2"/>
        <Setter Property="MinWidth" Value="140" />
        <Setter Property="MinHeight" Value="24"/>
        <Setter Property="BorderThickness" Value="0,0,0,0" />
        <!--<Setter Property="BorderBrush" Value="#6D6E71"/>-->
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadComboBoxItem}">
                    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                             
                        </ContentPresenter>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsHighlighted" Value="true">
                            <Setter Property="Foreground" Value="White" />
                            <Setter Property="Background" Value="#499ACF" />
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="False">
                            <Setter Property="Background" Value="#F2F2F2" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#939598"/>
                            <Setter Property="Background" Value="#FFF4F4F4"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocusWithin" Value="true">
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
 
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <Border Style="{StaticResource DialogContentBorderStyle}" Grid.Row="1">
        <DockPanel Margin="16,10,0,0">
            <Grid Margin="0,10,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" MinWidth="60" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="70" />
                </Grid.ColumnDefinitions>
 
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Select Item"
                            Style="{StaticResource LabelTextBlock}" CoreExt:TextBoxExtension.IsRequired="True" Visibility="{Binding Request, Converter={StaticResource BoolVisibilityConverter}}"/>
 
                <telerik:RadComboBox Name="RadComboBox" Grid.Row="0" Grid.Column="1" Margin="{StaticResource ModalRowMargin}" ItemsSource="{Binding Available}"SelectedItem="{Binding Selected, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, Mode=TwoWay}" Visibility="{Binding RequestCase, Converter={StaticResource BoolVisibilityConverter}}"TextSearchMode="Contains" Text="{Binding Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsFilteringEnabled="True" OpenDropDownOnFocus="True" Style="{StaticResource RadComboBoxStyle}" IsEditable="True" behaviors:RadComboBoxBehaviors.OverrideRadDefaults="True" StaysOpenOnEdit="True" >
                    <telerik:RadComboBox.ItemContainerStyle>
                        <Style TargetType="{x:Type telerik:RadComboBoxItem}" BasedOn="{StaticResource {x:Type telerik:RadComboBoxItem}}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding CaseId}" Value="-1">
                                    <Setter Property="IsEnabled" Value="False" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type telerik:RadComboBoxItem}">
                                                <Border Background="#F4F4F4">
                                                    <Separator HorizontalAlignment="Stretch" Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Height="1"/>
                                                </Border>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </telerik:RadComboBox.ItemContainerStyle>
                    <telerik:RadComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock TextTrimming="WordEllipsis" ToolTip="{Binding}" Text="{Binding}" MaxWidth="250"></TextBlock>
                        </DataTemplate>
                    </telerik:RadComboBox.ItemTemplate>
                     
                </telerik:RadComboBox
            </Grid>
        </DockPanel>
    </Border>
</Grid>
Masha
Telerik team
 answered on 13 Mar 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?