Telerik Forums
UI for WPF Forum
1 answer
61 views
Is it possible to wrap items in the PanelBar control? We have the following scenario. We want to display three (or more) items on a single line, instead of just one, as is the default. In other words we want to stack the items horizontally. Is this possible?
Petar Mladenov
Telerik team
 answered on 30 Nov 2010
2 answers
68 views
As of the new Q3 release, one of my grids is virtually unusable because of a style change.  I have a grid that has CanUserSelect set to false and IsReadOnly set to true--that way, a user cannot interact with the grid--and it's been perfect.  However, in Q3, setting CanUserSelect to false now causes the grid to turn grey and go to a gradient 50% opacity (that's my guess).  In any case, my user can barely see the grid now!

Why would you make this change?  And if the change was necessary, what can I set to undo it?
Roger
Top achievements
Rank 1
 answered on 30 Nov 2010
1 answer
99 views
Hi!

I´m trying to bind a collection of custom objects to a RadTreeListView. The object represents a `User`, who have a collection of different  rights and a collection of log entries.

How can i define the section "Rights/Log Entries" within a HierarchicalDataTemplate? I´ve tried it based on your tutorial on binding collections.

My Version of Telrik WPF is the current public release.

The structure i would like to achieve should look like this:

User 1
  Rights
     Right 1
     Right 2
   Log Entries
      Entry 1
      Entry 2
User 2
   Rights
      Right 1
   Log Entries
...

public sealed class User
{
    public string Firstname
    {
        get;
        set;
    }
 
    public string Lastname
    {
        get;
        set;
    }
 
    public ObservableCollection<Right> Rights
    {
        get;
        set;
    }
 
    public ObservableCollection<LogEntry> LogEntries
    {
        get;
        set;
    }
 
    public User(string firstname, string lastname)
    {
        this.Firstname = firstname;
        this.Lastname = lastname;
        this.Rights = new ObservableCollection<Right>();
        this.LogEntries = new ObservableCollection<LogEntry>();
    }
}
 
 
public sealed class RightsCollection
{
    public RightsCollection()
    {
        this.Name = "Rights";
        this.Rights = new ObservableCollection<Right>();
    }
     
    public string Name
    {
        get;
        set;
    }
     
    public ObservableCollection<Right> Rights
    {
        get;
        set;
    }
}
 
public sealed class Right
{
    public string Name
    {
        get;
        set;
    }
 
    public string Description
    {
        get;
        set;
    }
 
    public bool Value
    {
        get;
        set;
    }
 
    public Right(string name)
    {
        this.Name = name;
        this.Description = String.Empty;
        this.Value = true;
    }
 
    public Right(string name, string description)
        : this(name)
    {
        this.Description = description;
    }
 
    public Right(string name, string description, bool value)
        : this(name, description)
    {
        this.Value = value;
    }
}

XAML:

<UserControl.Resources>
    <local:Users x:Key="UserCollection" />      
     
    <HierarchicalDataTemplate x:Key="Right">
        <TextBlock Text="{Binding Name}" />           
    </HierarchicalDataTemplate>     
 
    <HierarchicalDataTemplate
        x:Key="Rights"
        ItemTemplate="{StaticResource Right}"
        ItemsSource="{Binding Rights}">
                     
        <TextBlock Text="{Binding Name}" />       
    </HierarchicalDataTemplate>
 
    <HierarchicalDataTemplate
        x:Key="Users"
        ItemTemplate="{StaticResource Rights}"
        ItemsSource="{Binding Rights}">
         
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding Lastname}" />
            <TextBlock Text=", " />
            <TextBlock Text="{Binding Firstname}" />
        </StackPanel>
    </HierarchicalDataTemplate>
     
</UserControl.Resources>
 
<telerik:RadTreeView
    IsLineEnabled="True"
    ItemsSource="{Binding Source={StaticResource UserCollection}}"
    ItemTemplate="{StaticResource Users}" />
Petar Mladenov
Telerik team
 answered on 30 Nov 2010
3 answers
401 views
Hi,

Is there any way by which a RadPane's size is set to content i.e. it takes the size exactly to fit the content when it is slide out.

If it is possible, please let me know how.
George
Telerik team
 answered on 30 Nov 2010
0 answers
107 views
I am not using telerik combo box , I am using WPF combobox.How can I customize the toggle button of combo box.I want the look as same as it is seen in Windows 7.Plz help me out
Asish
Top achievements
Rank 1
 asked on 30 Nov 2010
1 answer
147 views
Hi,
i just started to play with carousel and found some problems ;) In carousel each item got 1 textbox so user can write some notes, and i cant make two things:
1. How can i change selected item when user clicks on textbox in another item (not currently selected) it work only when user click on border
2. How can i focus on textbox when user change item via scroll or border click or anything, so basicly when selecteditem is changed than focus on selecteditems textbox

This is mine itemTemplate
<DataTemplate x:Key="ItemTemplate">
                <Grid Width="350" Height="450">
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFFFFEA0" Offset="0"/>
                            <GradientStop Color="#FFFFFE6A" Offset="0.567"/>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <TextBox Grid.Row="1" Text="{Binding Path=Content,Mode=TwoWay}" Background="Transparent"/>
                </Grid>
            </DataTemplate>
Maya
Telerik team
 answered on 30 Nov 2010
1 answer
96 views
Hi,

i moved to Q3 of telerik controls, and a piece of code, that worked great in Q2 broke down :
I have a grid, with predefined columns.
The column headers are bound to properties :
<telerik:RadGridView >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="{Binding Dag1}"
                                            UniqueName="test1"
                                            Style="{StaticResource KalenderDagColumnStyle}">
 
...
 public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
            Dag1 = DateTime.Today;
            Dag2 = DateTime.Today.AddDays(9);
         }

        public DateTime Dag1 { getset; }

        public DateTime Dag2 { getset; }

The KalenderDagColumnStyle is a StyleSelector
  <local:DatumKolomStyleSelector x:Key="DatumKolomStyleSelector"
                                       WeekdagStyle="{StaticResource WeekdagCellStyle}"
                                       WeekendStyle="{StaticResource WeekendCellStyle}"
                                       VandaagStyle="{StaticResource VandaagCellStyle}" />
        <Style x:Key="KalenderDagColumnStyle"
               TargetType="telerik:GridViewDataColumn">
            <Setter Property="HeaderCellStyle"
                    Value="{StaticResource KalenderDagHeaderStyle}" />
            <Setter Property="CellStyleSelector"
                    Value="{StaticResource DatumKolomStyleSelector}" />
        </Style>













  public class DatumKolomStyleSelector : StyleSelector

    {
        public Style VandaagStyle { getset; }
        public Style WeekendStyle { getset; }
        public Style WeekdagStyle { getset; }

        public override Style SelectStyle(object item, DependencyObject container)
        {
            GridViewCell c = container as GridViewCell;
            DateTime d = (DateTime)c.Column.Header;

            if (d == DateTime.Today)
                return VandaagStyle;
            else if (d.DayOfWeek == DayOfWeek.Saturday || d.DayOfWeek == DayOfWeek.Sunday)
                return WeekendStyle;
            else
                return WeekdagStyle;

        }
    }


When a column represents Today, it has a style, when its a weekend day, it has a style, and otherwise it has another style
In Q2 c.Column.Header had a value in the SelectStyle method,
in Q3 c.Column.Header is null in the SelectStyle method .


When i hardcode the headers then the value is not null in the SelectStyle method,
but bound values are apparently not available in the style selector


Is this expected behaviour ? is there a way around for me ? ( using Tag instead of Header does not make a difference).
The column headers must be data-bound, because the user can scroll back and forwards in time.

I would have attached a sample solution to this thread; but apparently zips are not allowed

Veselin Vasilev
Telerik team
 answered on 30 Nov 2010
1 answer
76 views
Hello,

can I have different editor types in the same column ? I have a number of items to display in a grid. The value property of these items differs: for some items a combobox should be used to select from a list of possible values, for others a string or number should be entered.

Can I assign different editors to each row in the same column depending on the type of the item bound to that row ?

Thanks in advance,
Lars
Maya
Telerik team
 answered on 30 Nov 2010
3 answers
209 views
We have implemented a search as you type control using the RadGridView. Everytime the text changes we set the ItemsSource to a new source and when data is being loaded the text box is unresponsive. We have specified DataLoadMode="Asynchronous" but it doesn't help. Any ideas?
Vlad
Telerik team
 answered on 30 Nov 2010
2 answers
132 views
Hi,
I have been trying to insert a new row with some values into the database table to which its binded, the insertion i do dont get reflected into the database can u help me out of this with simple sample.
gopal
Top achievements
Rank 1
 answered on 30 Nov 2010
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?