Telerik Forums
UI for WPF Forum
6 answers
187 views
Hi,
I have few questions on inline editing:

1. There is a protected variable isInEditMode, which indicates that a RadTreeViewItem is in edit mode. Is there a public property or any other way to identify whether a RadTreeViewItem  is in edit mode?
2. Pressing F2 triggers inline editing, after editing node text, if i press enter then Edited event gets fired but if i use mouse click to lose focus from editing item, then it (Edited event) does not, why?
3. I am initiate the inline editing by calling BeginEdit() but want to disable it on F2 key press, Is there any way to achieve this?

Thanks
Sonal
Jason D
Top achievements
Rank 1
Veteran
 answered on 12 Dec 2016
3 answers
219 views

Hi,

I have code written by fellow developer who used RadPanelBar to visualize hierarchical datasouce. He wrote (imho too many) templates. Now I am looking how to enable / disable item - I would say functionality like this in TreeViewItem
http://docs.telerik.com/devtools/wpf/controls/radtreeview/features/treeview-item/feautres-treeviewitem-enable-disable-items
I managed to block action in code, nonetheless I am looking how to set it so that it looks nice visually (and I wish to avoid to write xaml code in order just to disable item;))

Best regards,

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Dec 2016
5 answers
473 views
Hi

I have added one column as <telerik:GridViewSelectColumn/> so that the user will have the option to select/unselect all the rows at a time. Now I want to access the rows which user has marked as checked on this column.

<telerik:RadGridView     SelectionMode="Extended"         ItemsSource="{Binding FilterDataGridRows}"     SelectedItem="{Binding SelectedData,Mode=TwoWay}"

Doing something like this...but this is not working...

It is suggested on this side to use some dependency property to get the SelectedItems.....

Is there any easy way to achieve the selected rows ??
Dilyan Traykov
Telerik team
 answered on 12 Dec 2016
7 answers
1.1K+ views

Hello Telerik,

Our solution needs a footer row for the grids, for now containing only the item count.

I have browsed some of solution for this such as this one, but it won't attend to my needs for a couple of reasons:

- the footer cells need to be merged as if there was a column spam there

- the footer needs to be independent of a column. A simple count of all the rows before and after the grid built-in filtering.

Regarding the second point, please do correct me if I am wrong, but I am assuming that the

<telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:CountFunction Caption="Count: "  />
</telerik:GridViewDataColumn.AggregateFunctions>

 

is out of question, since it is column-bound. And the reason why it won't serve is because my grid has a columnchooser. if the user unselect that column, the count will disappear. Which is pointless. So I didn't even bother looking too deep on how to merge cells horizontally, since I believe a row just below the grid containing the count should be the way to go.

Furthermore my grid receives a VirtualQueryableCollectionView as datasource. And the only indicator of the Rows Count that it has is the VirtualItemCount = data.Count(). The problem is that property won't change in case the user filters the grid.

Finally my question is: where can I find the Grid Total Rows Count that will also show the right number after filtering?

 

Thank you

Dilyan Traykov
Telerik team
 answered on 12 Dec 2016
1 answer
82 views

hi

 

I have an EntityFramework table as my ItemsSource:

Ent = new Data.xEntities();
RadViewGrid.ItemsSource = Ent.Table;

If I insert a row from the "new row" row in the grid it disappears an does not show in the grid. Even if I Rebind() the grid.

If I

Ent.SaveChanges();
RgvUsers.Rebind();

it works. But I would like to save all changes at once via a Save Button.

How can I make the inserted row show in the grid without committing it back to the db? Thanks.

Regards,
Michael
           

Stefan
Telerik team
 answered on 12 Dec 2016
1 answer
284 views

Hello!

I am trying to find a way to be able to change the HeaderTemplate based on the tile state.  Example, when switch from normal content to large content in the RadFluidContainer, I want the header to look different (several controls are added and removed).

Right now I have the following:

<Style x:Key="RadTileViewItemStyle" TargetType="{x:Type telerik:RadTileViewItem}">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="telerik:TileViewPanel.IsRowsShrinkEnabled" Value="True" />
        <Setter Property="telerik:TileViewPanel.IsColumnsShrinkEnabled" Value="True" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Background" Value="{StaticResource PingLiteGrayBackground}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="BorderBrush" Value="{x:Null}" />
        <Setter Property="Padding" Value="10" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="TileState" Value="Restored" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadTileViewItem}">
                    <Grid SnapsToDevicePixels="True">
                        <Border Style="{DynamicResource PingDarkBrushBorder2Shaddow2}"
                                Margin="{TemplateBinding Padding}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <ContentPresenter x:Name="ContentElement"
                                                  ContentTemplate="{DynamicResource MyTileViewContentFluid}"
                                                  Content="{TemplateBinding Content}"
                                                  Grid.Row="1" />
                                <Border Grid.Row="0" BorderThickness="0,0,0,1.5"
                                        BorderBrush="{StaticResource PingBlueBrush}"
                                        Background="{TemplateBinding Background}"
                                        Padding="10,0,7,0">
                                    <Grid MinHeight="28">
                                        <Border x:Name="GripBarElement" Background="Transparent">
                                            <ContentPresenter x:Name="HeaderElement"
                                                              ContentTemplate="{DynamicResource MyHeaderTemplate}"
                                                              Content="{TemplateBinding Content}"
                                                              HorizontalAlignment="Stretch"
                                                              Margin="0,0,10,0"
                                                              VerticalAlignment="Center" />
                                        </Border>
                                    </Grid>
                                </Border>
                                <Rectangle x:Name="DisabledVisual" Fill="{StaticResource PingBlueBrush}"
                                           RadiusY="4" RadiusX="4"
                                           Grid.Row="0" Grid.RowSpan="2" Visibility="Collapsed" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="UseLayoutRounding" Value="True" />
    </Style>
 
    <DataTemplate x:Key="MyHeaderTemplate">
        <Border BorderBrush="{x:Null}">
            <Grid HorizontalAlignment="Stretch">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal">
                    <Image Width="50"
                           Height="40"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Center"
                           Margin="2"
                           Source="{Binding PhotoPathUri}" />
                    <TextBlock Text="{Binding EmployeeName}"
                               Style="{StaticResource MyTeamMemberTileHeaderStyle}" />
                </StackPanel>
                <CheckBox x:Name="CompareCheckbox"
                              Grid.Column="1" HorizontalAlignment="Right"
                              VerticalAlignment="Center"
                              Margin="2,0,2,2"
                              ToolTip="Add to Compare List"                            
                              Command="{Binding RelativeSource={
                                                RelativeSource FindAncestor,
                                                AncestorType={x:Type dialog:UserControlBase}},
                                                Path=DataContext.AddSelectedTeamMemberToCompareListCommand}"
                              CommandParameter="{Binding EmployeeName}" IsThreeState="False">
                     
                    <CheckBox.IsChecked>
                        <MultiBinding Converter="{StaticResource CompareBoolConverter}" Mode="OneWay">
                            <Binding Path="EmployeeName" FallbackValue=""/>
                            <Binding Path="DataContext.MyTeamCompareList"
                                     RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dialog:UserControlBase}}"
                                     FallbackValue=""/>
                        </MultiBinding>
                    </CheckBox.IsChecked>
 
                    <CheckBox.LayoutTransform>
                        <ScaleTransform ScaleX="1.5" ScaleY="1.5" />
                    </CheckBox.LayoutTransform>
                </CheckBox>
            </Grid>
        </Border>
    </DataTemplate>
 
    <DataTemplate x:Key="MyTileViewContentFluid">
        <telerik:RadFluidContentControl ContentChangeMode="Manual"
                                        TransitionDuration="0:0:0.01"
                                        State="{Binding TileState, Converter={StaticResource FluidContentStateConverter}, RelativeSource={RelativeSource AncestorType={x:Type telerik:RadTileViewItem}}}">
 
            <!-- Region Small Content -->
            <telerik:RadFluidContentControl.SmallContent>
                <Grid Background="{StaticResource PingBackgroundLiteBrush}">
                    <TextBlock Style="{StaticResource SmallCardBriefInfoContentStyle}"
                                   Text="{Binding Position}" />
                </Grid>
            </telerik:RadFluidContentControl.SmallContent>
            <!-- EndRegion Small Content -->
             
            <!-- Region Normal Content -->
            <telerik:RadFluidContentControl.Content>
                <Grid Background="{StaticResource PingBackgroundLiteBrush}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
 
                    <TextBlock Text="{Binding Position}"
                               Grid.Row="0"
                               Style="{StaticResource NormalCardBriefInfoContentStyle}"/>
 
                    <ItemsControl Grid.Row="1" ItemsSource="{Binding BusinessRoleList}">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel Orientation="Vertical" ScrollViewer.VerticalScrollBarVisibility="Visible" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Margin="30,4,4,2" Text="{Binding RoleName}" FontSize="16" />
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Grid>
            </telerik:RadFluidContentControl.Content>
            <!-- EndRegion Normal Content -->
             
            <!-- Region Large Content -->
            <telerik:RadFluidContentControl.LargeContent>
                <Grid Background="{StaticResource PingBackgroundLiteBrush}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
 
                    <TextBlock Text="{Binding Position}"
                               Grid.Row="0"
                               Style="{StaticResource NormalCardBriefInfoContentStyle}"/>
 
 
                    <ItemsControl Grid.Row="1" ItemsSource="{Binding BusinessRoleList}">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel Orientation="Vertical" ScrollViewer.VerticalScrollBarVisibility="Auto" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <TextBlock Margin="30,4,4,2" Text="{Binding RoleName}" FontSize="16" />
                                    <TextBlock Margin="30,4,4,2" Text="{Binding     BusinessRoleDescription}" FontSize="14" />
                                </StackPanel>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
            <!-- EndRegion Large Content -->
             
        </telerik:RadFluidContentControl>
    </DataTemplate> 
Milena
Telerik team
 answered on 12 Dec 2016
3 answers
154 views
Hi,

I am using a RadGridView and data virtualization. My itemssource is a VirtualQueryableCollectionView and the LoadSize is set to 40. I have implemeted the export to Excel. Now in Excel I only recieved 40 data rows. What can I do to export the whole grid?

VirtualQueryableCollectionView view = new VirtualQueryableCollectionView(viewModel0.GetQuery());
view.LoadSize = 40;
EntityDataGrid.ItemsSource = view;

 

using (Stream stream = dialog.OpenFile())
{
      GridViewExportOptions exportOptions = new GridViewExportOptions();
      exportOptions.Format = format;
      exportOptions.ShowColumnFooters = false;
      exportOptions.ShowColumnHeaders = true;
      exportOptions.ShowGroupFooters = true;
      EntityDataGrid.Export(stream, exportOptions);
}
Thanks for help in advance
Mechthild
Martin
Telerik team
 answered on 12 Dec 2016
0 answers
31 views

Hello,

 

Here is the original post http://www.telerik.com/forums/how-to-hide-the-leftautohide-panel#lu74NKZBOkq6pQQzmGGTCA

I could not get much help there so asking here if someone could please help.

 

Thanks

 

Sherry

Sherry
Top achievements
Rank 1
 asked on 11 Dec 2016
7 answers
869 views
Hi,

When i try to select something at the combo box, the below error occurs
"Recursive call to Automation Peer API is not valid"
Can you help to solve this?

Regards

I am using Windows 7, Visual Studio 2010 Beta 2, RadControls for WPF Q3 2009 SP1
Georgi
Telerik team
 answered on 09 Dec 2016
1 answer
97 views

I have problem with something I would call double (mean second) click on DataColumn I have to edit. The problem is that when I click on it first time I got following edit possibility:

https://i.stack.imgur.com/DRNoh.png

 

And it is way i want to edit value. But there is another way to edit it and I don't know how to disable that possiblity, when you click second time on that element, or you click twice on place without number you get fallowing edit space:

 

 

https://i.stack.imgur.com/zW6zz.png

 

When I have 0 value it behaves like on this picture above, when I have there anything else it display: "80.1600" or "2.00" 

How can I disable it?

Here is code:

<telerik:GridViewDataColumn Header="{Binding Source={x:Static properties:Resources.Discount},Converter={StaticResource StringAddPercentAtEndCoverter}}"
    MinWidth="60" IsCellMergingEnabled="False"
    IsFilterable="False" IsSortable="False" ShowDistinctFilters="False"
    DataMemberBinding="{Binding Discount, StringFormat='n0'}">
<telerik:GridViewDataColumn.CellTemplate>
    <DataTemplate>
        <telerik:RadMaskedNumericInput Value="{Binding Discount, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
           Mask="" Placeholder="" FormatString="n0" SelectionOnFocus="Default"
           maskedInput:MaskedInputExtensions.Minimum="0"
           maskedInput:MaskedInputExtensions.Maximum="100"
           BorderThickness="0" Background="Transparent"
           IsClearButtonVisible="False" HorizontalAlignment="Right"/>
    </DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
Dinko | Tech Support Engineer
Telerik team
 answered on 09 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?