Telerik Forums
UI for WPF Forum
11 answers
331 views
I am using WPF MVVM and having some trouble dragging an image from my application to the desktop. Any time I drag outside of the application the DragStatus becomes DragStatus.Cancel.

What am I doing wrong? I can post the relative code if this is not a simple thing.
Nick
Telerik team
 answered on 06 Aug 2012
0 answers
102 views
Hi,

Can I disable sorting on Group Header?
I want this sorting feature only on Columns not on the Grouped headers. How can i achieve this?
Balaji
Top achievements
Rank 1
 asked on 06 Aug 2012
6 answers
265 views
Have a PersonInCharge of List type Person in my ViewModel which bind to a GridView.

A comboboxcolumn in the grid, with ItemsSource of a PeopleList of List type Person

the grid shows well, but when i select different items in the combobox, it always return to the original value.

also the > in the grid leftmost column is always on row 1 instead of the highlighted row

anything wrong?


<telerik:RadGridView x:Name="PersonInCharge" Margin="5,5,5,0" Height="100" ShowGroupPanel="False" AutoGenerateColumns="False"
                 ItemsSource="{Binding Path=PersonInCharge}" CanUserInsertRows="True">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewComboBoxColumn x:Name="cbPersonInCharge"  Header="Person In Charge" UniqueName="PersonInCharge" EditTriggers="CellClick"
                                                             
                                                            ItemsSource="{Binding Path=PeopleList}"     DataMemberBinding="{Binding Person}"
                                                            SelectedValueMemberPath= "PeopleList/Person.ID}"   >                                                       
                        <telerik:GridViewComboBoxColumn.EditorStyle>
 
                        </telerik:GridViewComboBoxColumn.EditorStyle>
                        <telerik:GridViewComboBoxColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <TextBlock Text="{Binding Path=FirstName}" />
                                    <TextBlock Text="{Binding Path=LastName}"/>                            
                                </StackPanel>
                            </DataTemplate>
                        </telerik:GridViewComboBoxColumn.CellTemplate>
 
                        <telerik:GridViewComboBoxColumn.ItemTemplate  >
                            <DataTemplate>
                                <StackPanel>
                                    <TextBlock Text="{Binding Path=FirstName}" />
                                    <TextBlock Text="{Binding Path=LastName}"/>
                                </StackPanel>
                            </DataTemplate>
                        </telerik:GridViewComboBoxColumn.ItemTemplate>
                    </telerik:GridViewComboBoxColumn>
Neogeo
Top achievements
Rank 1
 answered on 06 Aug 2012
3 answers
226 views
Hello,

I have set up an editable column, with separate templates for view and edit defined.

<telerik:GridViewDataColumn Name="TargetPercentOfAccountMarketValue" Header="% Of Total"  
 Width="75" HeaderCellStyle="{StaticResource columnHeaderStyle}"                                            
CellStyle="{StaticResource whatIfCell}"
                                            
DisplayIndex="8" EditTriggers="CellClick,TextInput"
                                            
IsReadOnlyBinding="{Binding NodeType, Converter={StaticResource nodeTypeToIsReadOnlyConverter}}"
                                            
ColumnGroupName="WhatIfAllocation">
                    
<
telerik:GridViewDataColumn.CellTemplate>                        
<
DataTemplate>                            
<
TextBlock Text="{Binding Node.TargetPercentOfAccountMarketValue, StringFormat={}{0:P1}}"                                       
Foreground="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource negativeColorFormatter}, UpdateSourceTrigger=PropertyChanged}">
                            
</
TextBlock>                       
</
DataTemplate>                    
</
telerik:GridViewDataColumn.CellTemplate>                    
<
telerik:GridViewDataColumn.CellEditTemplate>                        
<
DataTemplate>                            
<
TextBox BorderBrush="Transparent" BorderThickness="1"
Text="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource StringToPercentageConverter}, StringFormat={}{0:N2}}"  Background="Transparent"                                     
Foreground="{Binding Node.TargetPercentOfAccountMarketValue, Converter={StaticResource negativeColorFormatter}}"/><
br>                       
</
DataTemplate>                  
</
telerik:GridViewDataColumn.CellEditTemplate>                
</
telerik:GridViewDataColumn>

The reason for the two separate templates is that I need the values formatted differently for viewing and editing.
I can enter into edit mode, i.e. I see the blinking cursor, but I cannot enter any values; backspace works strangely enough, so I can delete any existing value but when I try and enter it fails.

I'd like to know what is wrong with a column setup in this manner.

Thank You

Hasanain

Vlad
Telerik team
 answered on 06 Aug 2012
2 answers
154 views
Hi,
I am using 2011 Q3 SP1 ver GridView.
In this Grid i have a column called Status. and it is binded with type of Enum values.
And the sorting should be based on this Status column. (The order what we have in Enum Declaration)
So as binded enum type to datacolumn it is working fine even when I group by Status (Sorting wise)
One more thing is I am using CellTemplate to display the image at row level.
My Problem is
When I group By Status column, as I used Enum Value as DataMemberBinding,  Enum Type name is  coming as Group Header name.
So I have to show this Group Header names should be human readable.

If I am trying to update the groupheadertemplate with humanreadable text, then again i am facing the issue with sorting when grouping done.

Please help me in this regard.
Balaji
Top achievements
Rank 1
 answered on 06 Aug 2012
1 answer
118 views
hi,

is it possbile to add a busyindicator for each group in gridview rows? And how?

thanksbest
regards
rene
Vlad
Telerik team
 answered on 06 Aug 2012
1 answer
107 views
Hi,

I'm using Telerik Control now for quite some time and telerik ist doing a great job on enhancing them. I like Telerik Controls a lot! But I live in Germany so I need to have all those nice features with german texts.

To simplify this task I build a very little app. And this App I want to share here, because I see a lot of questions in this direction...

I would like to attach the Code but it is not allowed to attach .zip files here in the forum...
so:

Create a WPF Solution, reference the Your telerik WPF DLLS and add the following Code and you will get all you need in the Textbox to implement in your real CustomLocalizationManager to get the Texts in your language.

MainWindow.xaml

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
 
        <TextBox Grid.Column="1" Text="{Binding Code}" Margin="10" VerticalScrollBarVisibility="Auto"/>
        
        <StackPanel Margin="10">
            <!-- TODO Put here all Telerik Controls to Localize-->
            <telerik:RadTreeView />
            <telerik:RadGridView />
        </StackPanel>
    </Grid>

ManiWindow.xaml.cs
    public partial class MainWindow : Window {
        private readonly MainWindowViewModel _mainWindowViewModel;
 
        public MainWindow() {
            _mainWindowViewModel = new MainWindowViewModel();
            LocalizationManager.Manager = new CustomLocalizationManager(_mainWindowViewModel);
            InitializeComponent();
            DataContext = _mainWindowViewModel;
        }
    }

MainWindowViewModel.cs
    public class MainWindowViewModel {
        public string Code { getset; }
    }

CustomLocalizationManager.cs

    public class CustomLocalizationManager : LocalizationManager {
        private readonly MainWindowViewModel _mainWindowViewModel;
 
        public CustomLocalizationManager(MainWindowViewModel mainWindowViewModel) {
            _mainWindowViewModel = mainWindowViewModel;
        }
 
        public override string GetStringOverride(string key) {
            var defaultText = base.GetStringOverride(key);
            _mainWindowViewModel.Code += GenerateCode(key, defaultText);
            return defaultText;
        }
 
        private static string GenerateCode(string key, string ret) {
            //TODO Change this line to get the Code you need
            return string.Format("   case \"{0}\": return \"{1}\";{2}", key, ret, Environment.NewLine);
        }
    }


Have fun :-)
Markus
Vlad
Telerik team
 answered on 06 Aug 2012
2 answers
154 views
Hi,

This is likely an uncommon question, but is it possible to set the column that the user clicks on to expand the tree and the same one that is indented, to be the second column (or any other column but the first one)?

Thanks
Peter
Top achievements
Rank 1
 answered on 05 Aug 2012
2 answers
303 views
Hi,

I'm trying to get Key Tips working for the buttons in my RadRibbonView. It's based on your mvvm example. I have managed to bind AccessText to the buttons with ease and to the RadRibbonGroup through a setter in ItemContainerStyle of the HierarchicalDataTemplate.

But none of these KeyTips will show unless the parent RadRibbonTab has AccessText set. But setting this property seems like a tough challenge.

<HierarchicalDataTemplate x:Key="GroupHeaderTemplate" ItemsSource="{Binding Buttons}"  DataType="{x:Type Menu:GroupViewModel}"
                   ItemTemplateSelector="{StaticResource groupsSelector}">
           <TextBlock Text="{Binding Text}" />
       </HierarchicalDataTemplate>
 
       <HierarchicalDataTemplate x:Key="TabTemplate" DataType="{x:Type Menu:TabViewModel}" ItemsSource="{Binding Groups}"                                             
                   ItemTemplate="{StaticResource GroupHeaderTemplate}">
           <HierarchicalDataTemplate.ItemContainerStyle>
               <!-- This works and AccessText binds to GroupViewModel.AccessText -->
               <Style TargetType="{x:Type telerik:RadRibbonGroup}">
                   <Setter Property="telerik:KeyTipService.AccessText" Value="{Binding AccessText}" />
               </Style>
           </HierarchicalDataTemplate.ItemContainerStyle>
           <TextBlock Text="{Binding Text}" />
       </HierarchicalDataTemplate>

Update:
I tried setting ItemContainerStyle directly on RibbonView, now KeyTips show for the Tabs, but not for Groups or Buttons (even though the AccessText property is invoked on each viewmodel)
<telerik:RadRibbonView  x:Name="ribbonView" ApplicationButtonVisibility="Collapsed"
                      VerticalAlignment="Top" ItemTemplate="{StaticResource TabTemplate}" ItemsSource="{Binding Tabs}"
                       Title="{Binding Title}" SelectedItem="{Binding SelectedTab, Mode=TwoWay}"                       
                      telerik:KeyTipService.IsKeyTipsEnabled="true"                       
                      telerik:KeyTipService.AccessKey="ALT">
          <telerik:RadRibbonView.QuickAccessToolBar>
              <telerik:QuickAccessToolBar ItemsSource="{Binding QuickAccessItems}"
                      ItemTemplate="{StaticResource ButtonTemplate}" />
          </telerik:RadRibbonView.QuickAccessToolBar>
  <telerik:RadRibbonView.ItemContainerStyle>
      <!-- This style seems to affect all containers, tabs, groups and buttons -->
          <Style>                   
              <Setter Property="telerik:KeyTipService.AccessText" Value="{Binding AccessText}" />
          </Style>
  </telerik:RadRibbonView.ItemContainerStyle>
  </telerik:RadRibbonView>

I am trying to implement a very standard feature...
 Please help me,
Thanks
Oscar Ågren
Top achievements
Rank 1
 answered on 04 Aug 2012
0 answers
105 views
I have hierarchy level RadGridView in wpf application. I want to export all level data in excel format. But it exports only first level data into excel.

waiting for your reply
thank you. 
Nikita
Top achievements
Rank 1
 asked on 04 Aug 2012
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?