Telerik Forums
UI for WPF Forum
0 answers
152 views
Hi.

I need to create a control that behaves like the "To" field in Outlook. In short words it´s a TextBox with AutoComplete and the items that have been added by the AutoComplete are styled differently from text entered manually.

Another important thing is how backspace works, Backspace on a manually entered text will remove a char. Backspace on an item added by AutoComplete will remove the whole item.

Do you have any tips on how this can be achieved in WPF with the use of the Telerik library?

Best regards
Øystein
Øystein
Top achievements
Rank 1
 asked on 05 Aug 2011
1 answer
75 views

It seems, there was somesort of latency in content initialization of the RadExpander Control while loading the content using xaml reader, 
but the same process works as expected with the first quarter release.



Vladislav
Telerik team
 answered on 05 Aug 2011
3 answers
629 views
Hello,

When I hover over a RadComboBox and scroll the mouse wheel the selecteditem changes.  I get this behavior with a ComboBox only when the control has focus.  I want the RadComboBox to work the same.  Is there anyway for me to disable that on the RadComboBox?

Thanks,

Jason
Jason
Top achievements
Rank 1
 answered on 05 Aug 2011
0 answers
124 views
Hi there ,

I need to define maximum input length (like property MaxLength in TextBox) on editing mode in gridview.

<telerik:RadGridView x:Name="ctlStockGridView" AutoGenerateColumns="False" Background="AliceBlue" 
                telerik:StyleManager.Theme="Office_Blue" ShowInsertRow="False" SelectionMode="Extended" 
        RowEditEnded
="ctlStockGridView_RowEditEnded" ValidatesOnDataErrors="None" ShowGroupPanel="False" 
                IsFilteringAllowed="False" RowValidating="ctlStockGridView_RowValidating" 
                PreparingCellForEdit="ctlStockGridView_PreparingCellForEdit">
      <telerik:RadGridView.Columns>
       <telerik:GridViewDataColumn DataMemberBinding="{Binding Amount}" TextAlignment="Right"
     UniqueName="Amount" Header="Posting Amount" Width="auto" HeaderTextAlignment="Center" />
     </telerik:RadGridView.Columns>
</telerik:RadGridView>

please give me some advice.

ps. I'm using version 2010.2.0924.35

Thank you,
SweNz
SweNz
Top achievements
Rank 1
 asked on 05 Aug 2011
1 answer
455 views
I have a drop down button that contains a context menu as the drop down content. I'm binding my ItemsSource of the ContextMenu to a collection of Items on my view model. Because it's inside a DropDownButton, I'm handling the ItemClick event to close the drop down. But I'd like to also use a command on my view model and pass the bound object as the parameter.
Right now, I'm using a DataTemplate, but then I get a menuItem inside a menuItem.
Here is my button and context menu code.
<telerik:RadDropDownButton Content="Assign" DockPanel.Dock="Right" Margin="3" Name="RolesMenu">
   <telerik:RadDropDownButton.DropDownContent>
      <telerik:RadContextMenu ItemsSource="{Binding RolesList}" ItemClick="RolesMenu_ItemClick">
         <telerik:RadContextMenu.ItemTemplate>
            <DataTemplate>
                <telerik:RadMenuItem Header="{Binding RoleName}" Command="{Binding AssignRole}" CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Mode=Self}}" />
            </DataTemplate>
         </telerik:RadContextMenu.ItemTemplate>
      </telerik:RadContextMenu>
   </telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>

How can I do the same thing as above without getting a menuItem inside a MenuItem?
Konstantina
Telerik team
 answered on 05 Aug 2011
1 answer
108 views
Please try the next code and fill the difference when the Chart used as DataTemplate and as control.

WPF 4.0 (4.0.30319)
Telerik.Windows.Controls.Charting.dll 2011.2.725.40


Codebehind:
public partial class XAxisTest : Window
    {
        public XAxisTest()
        {
            InitializeComponent();
            InitializeComponent();
            Context = new Context();
            DataContext = this;
        }
        public Context Context { get; set; }
    }
    public class Context
    {
        public Context()
        {
            Charts = new ObservableCollection<ChartDataHolder> { new ChartDataHolder(1), new ChartDataHolder(100) };
        }
        public ChartDataHolder FirstData
        {
            get
            {
                return Charts[0];
            }
        }
        public ObservableCollection<ChartDataHolder> Charts { get; private set; }
    }
    public class ChartDataHolder
    {
        public ChartDataHolder(double delta)
        {
            ChartData = new ObservableCollection<ChartDataItem>();
            for (int i = 0; i < 20; i++)
            {
                ChartData.Add(new ChartDataItem() { ValueX = DateTime.Now.Second + i, ValueY = DateTime.Now.Second * delta + i });
            }
        }
        public ObservableCollection<ChartDataItem> ChartData { get; private set; }
    }
    public class ChartDataItem
    {
        public int ValueX { get; set; }
        public double ValueY { get; set; }
    }

View

<Window>
<Window.Resources>
        <DataTemplate x:Key="measTemplate" x:Shared="false">
            <GroupBox DockPanel.Dock="Bottom" Height="200" Header="I have a legend, but why?">
                <telerik:RadChart ItemsSource="{Binding ChartData, Mode=OneWay}"  >
                    <telerik:RadChart.DefaultView>
                        <telerik:ChartDefaultView>
                            <telerik:ChartDefaultView.ChartLegend>
                                <telerik:ChartLegend Visibility="Collapsed" UseAutoGeneratedItems="True" Header=" " x:Name="chartLegend">
                                </telerik:ChartLegend>
                            </telerik:ChartDefaultView.ChartLegend>
                            <telerik:ChartDefaultView.ChartArea>
                                <telerik:ChartArea LegendName="chartLegend" EnableAnimations="True">
                                    <telerik:ChartArea.AxisX>
                                        <telerik:AxisX />
                                    </telerik:ChartArea.AxisX>
                                    <telerik:ChartArea.AxisY>
                                        <telerik:AxisY DefaultLabelFormat="F2"/>
                                    </telerik:ChartArea.AxisY>
                                </telerik:ChartArea>
                            </telerik:ChartDefaultView.ChartArea>
                        </telerik:ChartDefaultView>
                    </telerik:RadChart.DefaultView>
                    <telerik:RadChart.SeriesMappings>
                        <telerik:SeriesMapping LegendLabel="C">
                            <telerik:SeriesMapping.SeriesDefinition>
                                <telerik:LineSeriesDefinition ShowItemLabels="False"/>
                            </telerik:SeriesMapping.SeriesDefinition>
                            <telerik:ItemMapping FieldName="ValueY" DataPointMember="YValue"/>
                            <telerik:ItemMapping FieldName="ValueX" DataPointMember="XValue"/>
                        </telerik:SeriesMapping>
                    </telerik:RadChart.SeriesMappings>
                </telerik:RadChart>
            </GroupBox>
        </DataTemplate>
            </Window.Resources>
        <DockPanel>


        <GroupBox DockPanel.Dock="Top" Height="200" Header="I have no a legend">
            <telerik:RadChart ItemsSource="{Binding Context.FirstData.ChartData, Mode=OneWay}" Margin="6" >
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend Visibility="Collapsed" UseAutoGeneratedItems="True" Header=" " x:Name="chartLegend1">
                        </telerik:ChartLegend>
                    </telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea LegendName="chartLegend1" EnableAnimations="True">
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX />
                            </telerik:ChartArea.AxisX>
                            <telerik:ChartArea.AxisY>
                                <telerik:AxisY DefaultLabelFormat="F2"/>
                            </telerik:ChartArea.AxisY>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping LegendLabel="C">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:LineSeriesDefinition ShowItemLabels="False"/>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:ItemMapping FieldName="ValueY" DataPointMember="YValue"/>
                    <telerik:ItemMapping FieldName="ValueX" DataPointMember="XValue"/>
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
        </telerik:RadChart>
        </GroupBox>
        <ItemsControl  ItemsSource="{Binding Context.Charts}" ItemTemplate="{StaticResource measTemplate}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <UniformGrid Columns="1" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </DockPanel>
</Window>
Yavor
Telerik team
 answered on 05 Aug 2011
1 answer
166 views
Why is the HTML output empty when I include a mergefield in the content of my document?

thanks,

Pablo.
Ivailo Karamanolev
Telerik team
 answered on 05 Aug 2011
2 answers
140 views
Could I enable the mouse wheel scroll in the RadPanelBar control?
Pavel
Top achievements
Rank 1
 answered on 05 Aug 2011
3 answers
191 views
Hi All,

          I am using Telerik WPF Radgridview 2010.2.924.35 version for Printing the contents of gridview. When i select Microsoft XPS Document, a xps file is created and it contains the proper data that is present in the gridview.  When i print the contents after selecting the Printer, i am gettting the correct headers and number of rows and not the cell content. all rows have blank values. What is the problem? i followed the same steps followed in Printing demo in your samples. for the demo sample, i m getting all row values when a printer is selected.

But the only difference is in demo they have used gridviewdatacolumn to bind data. I used celltemplate and celledittemplate to bind row data. Why is the content missing. I also installed 2011 trial version and i ended up with the same issue. Any ideas or help is appreciated. Preferably code samples are welcome.

Thanks in advance,
Saranya.
Maya
Telerik team
 answered on 05 Aug 2011
2 answers
262 views
I am needing to apply celltemplateselectors at runtime to dynamic grid columns from observablecollection<T>.
Do you have any documentation or examples that show applying celltemplateselectors to grid columns in code behind purely?
I have DataTemplates in a Resource Dictionary and I would like to use the business object value in the cell to decide the datatemplate to select.

Example:
private void grid_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
{
    if (e.Column.UniqueName.Equals("SpecificColumn", StringComparison.CurrentCultureIgnoreCase))
    {
        e.Column.CellTemplateSelector = // ... point to C# class that returns datatemplate from resource dictionary file
    }
}

Guru
Top achievements
Rank 2
 answered on 04 Aug 2011
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?