Telerik Forums
UI for WPF Forum
1 answer
172 views
I have a GridVIew that I want to populate with the results of a StoredQuery that returns a list of string.
I have the following
public DataTable GetLoadedTransactionFiles()
       {
           using (FamilyOfficeDataContext db = new FamilyOfficeDataContext())
           {
               var query = db.GetTransactionFileLoad();
                
               DataTable dt = new DataTable();
               dt.Columns.Add("FileLoaded", typeof(string));
 
               foreach (var file in query)
               {
                   DataRow newRow = dt.NewRow();
                   newRow["FileLoaded"] = file.LoadedFile;
                   dt.Rows.Add(newRow);
               }
               return dt;
           }
       }

When I set the grivview itemsource like so

FilesLoadedGrid.ItemsSource = gl.GetLoadedTransactionFiles().DefaultView;


I see the grid has two rows but the filename is not displayed.
the  xaml is as follows
<telerik:RadGridView HorizontalAlignment="Left" Margin="153,26,0,0" Name="FilesLoadedGrid" VerticalAlignment="Top" Height="233" Width="439" AutoGenerateColumns="False"
                             CanUserFreezeColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False"  RowIndicatorVisibility="Collapsed" ShowGroupPanel="False"
                              AlternationCount="2"  AlternateRowBackground="Cornsilk"  Deleting="FileDeleted" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadButton Content="Delete" Command="telerikGrid:RadGridViewCommands.Delete" CommandParameter="{Binding }" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
                <telerik:GridViewDataColumn Header="Loaded File" Name="FileLoaded" DataMemberBinding="{Binding Path= LoadedFile}"  Width="*"  IsReadOnly="true">
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

What am I missing?

Eric Klein
Top achievements
Rank 1
 answered on 12 Apr 2012
1 answer
276 views

Hello,

I'm using RadGridView.I need to format the cells of grid like "###,###".Moreover as long as my ItemSource is totally arbitrary, I can not define the columns in xaml or code. However, I know the first column is of string type and the rest are double
I need something like :

public void radGridView1_Loading(e) // or formatting
{
        if(e.ColumnIndex>1)
            e.Cell.Format = "###,###";
}

Thanks in advance
StevenDale
Top achievements
Rank 2
 answered on 12 Apr 2012
1 answer
91 views

As we have seen Telerik Image Editor,It is working same as we required,but we want two additional functionalites in it.

 

1:- We want to record the changes that we have performed on a particular image so that we can save these steps to regenerate image .

 

2:- We want Image layering functionlity,So that we can add a layer(Background Image and Frame on our original Image) and also want to change position of my original Image.

 

Please have a look of attached  image

Ivailo Karamanolev
Telerik team
 answered on 12 Apr 2012
3 answers
138 views
Hi,

I am using Visual Studio 2008 SP1 for development and i want to check sample applications of WPF on my machine.
I downloaded "RadControlsForWpfSetup_2012_1_0215.exe" and installed it. But i am not able to build the application samples available with this exe.
Could you please let me know from where i can get the setup which will build on Visual Studio 2008 SP1?
Yordanka
Telerik team
 answered on 12 Apr 2012
1 answer
93 views
KeyTips and Keyboard Access via KeyTips appear to work fine in the RibbonView demos, but none of them work in the RadRichTextBox demos that use RadRichTextBoxRibbonUI.

I can't get it to work in any of my attempts either.

Is there any way to get this to work? 
Kammen
Telerik team
 answered on 12 Apr 2012
1 answer
851 views
Hi,

in my form, I created a FocusVisualStyle for my control. For my TextBox it work but for Telerik RadDatePicker it doesn't work :(
I want to know how I can change teh FocusVisualStyle of Telerik controls to have the same than the standard controls.

PS: You have to keep in mind that all my forms reside in a DLL which is called by a WinFrom application ;)

Here is part of my xaml:

    <telerik:RadWindow.Resources>
        <ResourceDictionary>
            <ControlTemplate x:Key="FocusTemplate" >
                <Rectangle Margin="-3" Stroke="Orange" StrokeThickness="2" RadiusX="2" RadiusY="2" StrokeDashArray="2,1">
                    <Rectangle.Triggers>
                        <EventTrigger RoutedEvent="Rectangle.Loaded">
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation To="3" Duration="0:0:1" RepeatBehavior="Forever" Storyboard.TargetProperty="StrokeDashOffset" />
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Rectangle.Triggers>
                </Rectangle>
            </ControlTemplate>


            <Style x:Key="FocusStyle" TargetType="{x:Type Control}">
                <Setter Property="Template" Value="{StaticResource FocusTemplate}"/>
            </Style>

            <Style TargetType="TextBox">
                <Setter Property="FocusVisualStyle" Value="{StaticResource FocusStyle}"/>
            </Style>

            <Style TargetType="telerik:RadDatePicker">
                <Setter Property="FocusVisualStyle" Value="{StaticResource FocusStyle}"/>
            </Style>

            <helper:BoolToVisibility x:Key="boolToVisibility" />
            <helper:BoolToVisibilityInverter x:Key="boolToVisibilityInverter" />
            <helper:BoolInverter x:Key="boolInverter" />
           
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="BillingDetails-Fr-Res.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Neuron-CustomStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
           
        </ResourceDictionary>
    </telerik:RadWindow.Resources>

<telerik:RadDatePicker Grid.Column="3" Grid.Row="0" Margin="5 5 0 0" HorizontalAlignment="Left" IsEnabled="{Binding ElementName=Me, Path=IsReadOnly, Converter={StaticResource boolInverter}}" SelectedValue="{Binding ElementName=Me, Path=Visit.VisitDate, Mode=TwoWay}" />                       
Dani
Telerik team
 answered on 12 Apr 2012
2 answers
203 views
Hello,

I'm having trouble understanding the DeleteBehavior, BackspaceBehavior, and DeleteSelectedBehavior properties in annotations.  They do not seem to be working how I would expect them to.

I would like to have a custom annotation that works almost exactly like a read-only annotation range, but I would like to be able to select and delete the entire annotation range, including the text, from the UI.

I assumed that I would be able to customize this behavior by setting the DeleteBehavior, BackspaceBehavior, and DeleteSelectedBehavior, but it doesn't seem to work regardless of what settings I specify in those overridden properties.

Is it even possible to do what I am asking?

Thanks,

Frank
Frank
Top achievements
Rank 1
 answered on 12 Apr 2012
4 answers
150 views
I have implemented the use of the 2D chart (bar, line, splinearea, splineseries) in software and have no problems setting the graphing color fill for each series in the charts data set.  I was hoping that the 3D chart used the same methodology but this does not appear to be the case.  I need to be able to set each series to a user chosen color.  It should not be this hard but I can't find any information on how to set up each series.  It appears that the chart just picks each color automatically without giving the ability to have it manually set.  Please help! 

The way that I set the color with the 2D charts is as follows:
 lineSeries.Definition.Appearance.Stroke = new SolidColorBrush(Colors.Blue);
 lineSeries.Definition.Appearance.Fill = new SolidColorBrush(Colors.Blue);

If I change the lineSeries type to Line3DSeriesDefinition then the default aqua color that comes up with the examples is used even when the color Blue is set as defined above.

Thanks for any help that can be provided!

James
James
Top achievements
Rank 1
 answered on 12 Apr 2012
8 answers
230 views
I need to know how to set the background color of the charting area of a 3D chart.  For the 2D chart I create a MarkedZone object and apply a solidcolorbrush as follows:
 MarkedZone bgZone = new MarkedZone();
 bgZone.Background = new SolidColorBrush(Colors.Aqua);
 this.radChart1.DefaultView.ChartArea.Annotations.Clear();
 this.radChart1.DefaultView.ChartArea.Annotations.Add(bgZone);

This does not work for the 3D chart!  How would I make this work for the 3D chart or is it even possible.

Thanks,

James


James
Top achievements
Rank 1
 answered on 12 Apr 2012
5 answers
350 views
Hi,

I have made a DayTemplateSelector - allowing me to style the calendar (highlighting different dates with colors..).
This works fine with all the different themes except the "Expression_Dark" theme (the dates are not highlighted with my color)
See attached images...(with and without "Expression_Dark" theme)
1. Any ideas why this theme is different from the others?

2. How can I decrease the height/width on the areas that show day/weeknumber?
They take up way too much space...(I have marked the areas with green color on image: RadCalendar - DayTemplateSelector 2.png)

<Controls:RadCalendar x:Name="TommedatoKalender" 
                                          Rows="3" Columns="4"
                                          SelectionMode="Extended"                                                  
                                          ViewsHeaderVisibility="Visible"
                                          DisplayDate="{Binding DisplayDate}">                                        
  
                                        <Controls:RadCalendar.DayTemplateSelector>
                                            <selector:KalenderDagSelector>
                                                <selector:KalenderDagSelector.DefaultTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding Text}" Height="18" Width="18" TextAlignment="Center"/>
                                                    </DataTemplate>
                                                    </selector:KalenderDagSelector.DefaultTemplate>
  
                                                   <selector:KalenderDagSelector.TommeDagTemplate>
                                                    <DataTemplate>
                                                        <Border BorderThickness="1" 
                                                        BorderBrush="{DynamicResource HighlightDayColor}" 
                                                        CornerRadius="12" 
                                                         HorizontalAlignment="Center" VerticalAlignment="Center"      Background="{DynamicResource HighlightDayColor}">
                                                            <Grid>
                                                                <!-- Rounded mask (stretches to fill Grid) -->
                                                                <Border Name="mask" Background="{DynamicResource HighlightDayColor}" CornerRadius="7"/>
                                                                <!-- Main content container -->
                                                                <StackPanel>
                                                                    <!-- Use a VisualBrush of 'mask' as the opacity mask -->
                                                                    <StackPanel.OpacityMask>
                                                                        <VisualBrush Visual="{Binding ElementName=mask}"/>
                                                                    </StackPanel.OpacityMask>
                                                                    <!-- Content -->
                                                                    <TextBlock Text="{Binding Text}" Background="{DynamicResource HighlightDayColor}" Height="18" Width="18" TextAlignment="Center" />
                                                                </StackPanel>
                                                            </Grid>
                                                        </Border>
                                                    </DataTemplate>
                                                </selector:KalenderDagSelector.TommeDagTemplate>
  
                                            </selector:KalenderDagSelector>
                                        </Controls:RadCalendar.DayTemplateSelector>
  
                                    </Controls:RadCalendar>
Terje Johansen
Top achievements
Rank 1
 answered on 12 Apr 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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?