Telerik Forums
UI for WPF Forum
1 answer
342 views

How do I bind a DataColumn to a field that has a Space (" ") in the name?  In the code snippit, I need to bind a field called "English Identifier" to a DataColumn.  Thanks for your help.

 

<telerik:RadGridView
    x:Name="gridView"
    Grid.Row="1"
    AutoGenerateColumns="False"
    ItemsSource="{Binding CoordinateMap}">
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn
            Header="Name"
            DataMemberBinding="{Binding English Identifier}"
            IsReadOnly="True" />
        <telerik:GridViewDataColumn
            Header="IsCloseout"
            DataMemberBinding="{Binding IsCloseOut}"
            IsReadOnly="True" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Dimitrina
Telerik team
 answered on 12 Jun 2015
1 answer
742 views

Hi,

 We have a radtreeview with check boxes. Now we want to support radcontextmenu on checked items and dragdrop on selected items. But when we implement context menu , we are getting even on selected item.

How can we disable contextmenu on selected item and enable only if it checked. Please provide your inputs.

Thanks,

Subhashini

Martin Ivanov
Telerik team
 answered on 12 Jun 2015
5 answers
364 views

Hi

   I am trying to use Datatable in my radgridview for items source. It works fine with premitive datatypes for columns. But when you try to add a custom object as a column, and provide a celltemplate in autogenerate columns event in code behind then the datatemplate is not picking the object context. In output window its showing a binding error from datatemplate for the properties I have provided from my object in the cell. The error for each cell I am getting in my output window is: Error: 40 : BindingExpression path error: 'PropertyValue' property not found on 'object' ''DataRow' (HashCode=45554962)'. Any idea if I am missing any thing..

 Below is my code in code behind file. Assum my all columns are of same type and they need a cell template and an celledittemplate.

 

 private void ResourcesListGridView_OnAutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
        {
           
            var editModel = Application.Current.TryFindResource(CommonKeys.CostValueModelEditor);
            var cellmodel = Application.Current.FindResource(CommonKeys.CostValueModel);
            if(editModel!=null)
             e.Column.CellEditTemplate = editModel as DataTemplate;
            if(cellmodel!=null)
            e.Column.CellTemplate = cellmodel  as DataTemplate;
        }

 

Dimitrina
Telerik team
 answered on 12 Jun 2015
4 answers
266 views
I would like to know is there any way to popup the calendar when the textbox got focus. I have tried to implement the gotFocus event and leaveFocus event of the datepicker but it has a strange behaviour. I know that there is a property 'ShowPopupOnFocus' in ASP.net radDatePicker but it seems that it is not supported in WPF. Would you give any suggestion in handling this case?
Nasko
Telerik team
 answered on 12 Jun 2015
5 answers
258 views

I export data from my grid to Excel (v2013.1.422.45). Data grouped by some field.

var options = new GridViewExportOptions

{

Format = ExportFormat.ExcelML,
ShowColumnHeaders = true,
ShowColumnFooters = true,
ShowGroupFooters = true,
Encoding = Encoding.UTF8
};

gridControl.Export(stream, options);

Groups are missing. I tried to use ElementExporting handler but there is no event with ExportElement.GroupHeaderRow (GroupHeaderCell, GroupIndentCell) data (just Footer).

 

Maya
Telerik team
 answered on 12 Jun 2015
3 answers
194 views

Hi,

I was wondering if there was a way to get the trackball to snap to the closest point by taking only the horizontal distance into consideration?

 We have a chart with a number of series which all have the same set of x values. We have the trackball behavior enabled and what we would like to be able to do is to show details about each series but for one x value at a time. The default behavior seems to get the closest points for each series by taking the closest point to the mouse. This means, depending on mouse location, that the trackball can be showing values from 2 points which have different x values. Is there a way to stop this and to get the trackball to snap only to x values?

 

Thanks,

 

Steven

Petar Marchev
Telerik team
 answered on 12 Jun 2015
1 answer
149 views

Hi Team,

 

I am using Telerik RAD drag and drop for WPF 2015 Q1 SP1 (2015.1.0401.40), but unfortunately facing an issue regarding the compass, that compass doesn't fade out automatically when an element is dropped, earlier I was using previous version of dlls (2012.3.1129.40) with same project it was working absolutely fine for me, could you please assist for the same.

 

PS: Had attached a screenshot for the same for your kind reference.

 

Regards,

Amit

Kalin
Telerik team
 answered on 12 Jun 2015
4 answers
210 views

What is the best way to initialize RadDocking with a saved layout?

I want my application to save layout whenever a RadDocking control is loaded I want to load the saved layout, but I cant find any good event to hook into to run LoadLayout.

I am using Prism with a RegionAdapter as in your ShellPrism sample project.

 

/Ola

Vladi
Telerik team
 answered on 12 Jun 2015
3 answers
706 views
I have a RadListBox as a messagebox which is bound to a list of messages from the system. When there is a fault in the system a fault message is recorded, I want to highlight this message with red background. Is there any way to change the background of an item based on its value.

I tried this code but it didn't have access to background property.
this.ListBox.Items.CurrentChanged += (sender, args) =>
{
    for (int i = 0; i < this.ListBox.Items.Count; ++i)
    {
        var item = this.ListBox.Items[i];
 
        if (item.ToString().StartsWith("Fault"))
        {
            ListBox.Items[i]............????????? Looking for background property.
        }
    }
};


Thanks.
Kalin
Telerik team
 answered on 11 Jun 2015
1 answer
2.1K+ views

Consider this code, which displays a textbox with rounded corners:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns:System="clr-namespace:System;assembly=mscorlib"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ControlTemplate TargetType="TextBoxBase" x:Key="txt">
            <Border Padding="10" CornerRadius="10" BorderThickness="1" BorderBrush="Black" x:Name="Bd" Background="{TemplateBinding Panel.Background}">
                <ScrollViewer Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
            </Border>
            <ControlTemplate.Triggers>
                <Trigger Property="UIElement.IsEnabled">
                    <Setter Property="Panel.Background" TargetName="Bd">
                        <Setter.Value>
                            <DynamicResource ResourceKey="{x:Static SystemColors.ControlBrushKey}" />
                        </Setter.Value>
                    </Setter>
                    <Setter Property="TextElement.Foreground">
                        <Setter.Value>
                            <DynamicResource ResourceKey="{x:Static SystemColors.GrayTextBrushKey}" />
                        </Setter.Value>
                    </Setter>
                    <Trigger.Value>
                        <System:Boolean>False</System:Boolean>
                    </Trigger.Value>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
    </Window.Resources>
    <Grid>
        <TextBox
            Template="{StaticResource txt}"
            Margin="10"
            Padding="10"
            Background="Transparent"
            BorderThickness="0"
            Width="254"
            Height="55"/>
    </Grid>
</Window>

But if I add reference to telerik controls, then the border of the textbox is displayed again, regardles of the 'BorderThickness' property. This is my code in App.xaml (if I comment this out then everything is ok again):

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

Sia
Telerik team
 answered on 11 Jun 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?