Telerik Forums
UI for WPF Forum
1 answer
198 views
Hi,

I am creating GridViewComboBoxColumn dynamically in code behind and want to bind ToolTip of the cells in this column to some property as below

var colLabor = new GridViewComboBoxColumn();
var tTemp = new DataTemplate() { DataType = typeof(Labor) };
 
FrameworkElementFactory factoryTextBlock = new FrameworkElementFactory(typeof(TextBox)) { Name = "factoryTextBlock" };
//factoryTextBlock.SetBinding(TextBlock.TextProperty, new Binding("ResourceTypeId"));
factoryTextBlock.SetValue(TextBox.TextProperty, "OK BYE");
factoryTextBlock.SetValue(TextBox.FontSizeProperty, 10.0d);
factoryTextBlock.SetValue(TextBox.WidthProperty, 100.0d);
tTemp.VisualTree = factoryTextBlock;
colLabor.ToolTipTemplate = tTemp;

But couldn't get it working.

But if I do its equivalent (I believe so) in XAML as described here, it works. Unfortunately the column is created on runtime so I can't go with XAML option.

Any ideas/suggestions?

Arpit

Ivan Ivanov
Telerik team
 answered on 07 Jun 2013
1 answer
135 views

Hi telerik support

I have a changing observable list of dates on my viewmodel, and I would like to highlight the days within that collection.

I have tried to implement my own DataTemplateSelector for the dayTemplateselector and I have managed to get the dates from my CollectionViewSource, but it seems that it only works on static data and the changes made to my collection does not appear in the Calendar.

How can I archive binding between the daytemplateSelector and my observableCollection?

Ivo
Telerik team
 answered on 07 Jun 2013
1 answer
122 views
Hi,
In a normal data-binding columns/cells, how can I add a suffix text in superscript? Something like:

abcd <sup>R</sup>

where abcd is from data source and R is an addon superscript.

Thanks!
Ivan Ivanov
Telerik team
 answered on 07 Jun 2013
1 answer
341 views
Hi,

i use a DataForm with lots of DataFormCheckBoxFields. Now i want to Enable or Disable some of these fields if
one of theme is checked?

If this is checked:
<telerik:DataFormCheckBoxField Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" Label="FIRMA:" Foreground="Black" HorizontalAlignment="Left" x:Name="FirmaConf"                                                                           VerticalContentAlignment="Center" VerticalAlignment="Center" DataMemberBinding="{Binding Firma,Mode=TwoWay}"  />

this should be enabled
         <telerik:DataFormCheckBoxField Grid.Row="1" Grid.Column="0" Label="zeigen:" Foreground="Black" HorizontalAlignment="Left" x:Name="FirmazeigenConf"                                                                            VerticalContentAlignment="Center" VerticalAlignment="Center" DataMemberBinding="{Binding FIRzeigen,Mode=TwoWay}"
IsEnabled="{Binding ElementName=FirmaConf, Path=DataMemberBinding, Mode=TwoWay}"/>

But how will i do this?
thanks
Regards
rene

 

Ivan Ivanov
Telerik team
 answered on 07 Jun 2013
1 answer
188 views
Hello,

I'm trying to use use the ContentTemplateSelector propriety inside a RadPane this way :

<selector:CTS x:Key="CTS" DataTemplate1="{StaticResource SomeThing}" DateTemplate2="{StaticResource SomeThing2}"></selector:CTS>
<telerik:RadPane x:Name="FiltersPane" ContentTemplateSelector="{StaticResource CTS}" Content="{Binding Data, Mode=TwoWay}" >

But this don't work. On the other hand, those lines work just fine : 

<DataTemplate x:Key="SomeThing">
            <vw:aView DataContext="{Binding}"></vw:aView>
</DataTemplate>
 
<telerik:RadPane x:Name="FiltersPane" ContentTemplate="{StaticResource SomeThing}" Content="{Binding Data, Mode=TwoWay}">

So, if I use ContentTemplateSelector, it doesn't work. But if I directly set one template with ContentTemplate, it works fine. So, basicaly, all I want to know is if this is the right way to do and the problem come from my code or if it just the way I'm using ContentTemplateSelector that is wrong.

Thank you,
David  
David
Top achievements
Rank 1
 answered on 07 Jun 2013
3 answers
201 views
I am using the following code to render a ScatterLineSeries. The chart renders with points that do not represent real data. Up until 250 inches there is no data with a negative value, which the chart shows. Zooming into the chart, it can clearly be seen to render all values positive.

My data is an array of System.Drawing.Point(double, double), with x values at increments of 0.625 and Y values ranging from -3.5 to 3.5.

        <telerik:RadCartesianChart x:Name="uxChart">
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior />
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis x:Name="horizontalAxis"
                                    Minimum="{Binding XAxisMin}"
                                    Maximum="{Binding XAxisMax}"
                                    Title="{Binding XAxisTitle}" />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis x:Name="verticalAxis"
                                    Minimum="{Binding YAxisMin}"
                                    Maximum="{Binding YAxisMax}"
                                    Title="{Binding YAxisTitle}" />
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:ScatterLineSeries ItemsSource="{Binding Data}"
                                           XValueBinding="X"
                                           YValueBinding="Y" />
            </telerik:RadCartesianChart.Series>
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
            </telerik:RadCartesianChart.Grid>
        </telerik:RadCartesianChart>
Petar Kirov
Telerik team
 answered on 07 Jun 2013
1 answer
125 views
Hi,

i use a RadDataform bind to a MVVM. This view contains some strings and an ObservableCollection<UserRollen>.
This Collection is bound to a GridView. In each row I have a button which should show me a Popup with details of
this Item.

How do I get the selected gridviewrow and the item which is selected?

Thanks
Best Regards
Rene
Ivan Ivanov
Telerik team
 answered on 07 Jun 2013
1 answer
129 views
I am in the process of creating a user control based on the customization example of the RadMenu.  I have placed the RadMenu in an expander on the left side of the UserControl and have it stretched vertically within the expander.  This works great for the top of the RadMenu control but I haven't been able to change the submenu/child elements to stretch vertically as well.  They always pop out directly to the right of the parent item (understandably).  Is it possible to change this behavior?  

Thanks so much.

Rosen Vladimirov
Telerik team
 answered on 07 Jun 2013
3 answers
278 views
Hello! Yesterday I put in my wpf application, normally functioning, two radsplitcontainers under raddocking, and from this moment my application, during debug mode in vs2010, takes a lot of time for each operation, a simply onover on a radbutton takes 2-3 seconds to appear and the response to every action is very slow, meaning 5-6 seconds. Closing the window has no effect since all the application, even with this window closed, becomes very slow. The application is normally functioning until I open the window containing these elements.

If I compile my application and i Run the ".exe" no issue, all is working fine.

Anybody find the same problem? Is there any solution?

Here is my code of the splitcontainers with two radgriviews inside:

<telerik:RadDocking x:Name="radDockingst" HasDocumentHost="False" Background="Transparent">

<telerik:RadSplitContainer x:Name="radSplitContainerst" Orientation="Vertical">

<telerik:RadPaneGroup>

<telerik:RadPane Header="Pane Left 1" >

<telerik:RadGridView Height="auto" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible" telerikControls:StyleManager.Theme="Office_Blue" Margin="0,5,0,0" x:FieldModifier="public" x:Name="radGridRighe" FilteringMode="FilterRow" FontSize="11" RowHeight="18" CanUserSortGroups="True" CanUserSortColumns="True" CanUserSelect="True" AlternationCount="1" FontFamily="Tahoma" CanUserDeleteRows="False" CanUserInsertRows="False" ShowGroupPanel="False" IsReadOnly="True" Grid.Row="0" IsManipulationEnabled="True" />

</telerik:RadPane>

</telerik:RadPaneGroup>

<telerik:RadPaneGroup Background="Transparent">

<telerik:RadPane Header="Pane Left 2" Background="Transparent">

<Grid x:FieldModifier="public" Name="GridStandard">

<Grid.RowDefinitions>

<RowDefinition Height="0"/>

<RowDefinition Height="0"/>

</Grid.RowDefinitions>
</Grid>

 

</telerik:RadPane>

</telerik:RadPaneGroup>

</telerik:RadSplitContainer>

</telerik:RadDocking>

Please help me, I can't nomore test my application in debug due to slow performance.
CQT
Top achievements
Rank 1
 answered on 07 Jun 2013
1 answer
107 views
I have a RadGridView bound to a collection containing rows like the following:
public class RowViewModel : INotifyPropertyChanged
{
    public RowViewModel(Deal deal)
    {
        Deal = deal;
    }
 
    public Deal Deal { get; private set; }
 
    public event PropertyChangedEventHandler PropertyChanged;
 
    public void UpdateBookingStatus()
    {
        Deal.IsBooked = true;
        Deal.BookingTime = DateTime.UtcNow;
 
        OnPropertyChanged("Deal");
    }
 
    protected virtual void OnPropertyChanged(string propertyName)
    {
        var handler = PropertyChanged;
        if (handler != null)
            handler(this, new PropertyChangedEventArgs(propertyName));
    }
}
 
public class Deal
{
    public string Id { get; private set; }
    public DateTime ReceivedTime { get; private set; }
    public DateTime? BookingTime { get; set; }
    public bool IsBooked { get; set; }
 
    public Deal(string id, DateTime receivedTime)
    {
        Id = id;
        ReceivedTime = receivedTime;
    }
}

My grid has 4 columns bound to each of the Deal properties, with bindings such as 'Deal.Id', 'Deal.ReceivedTime', etc.

All displays correctly, but when I call the UpdateBookingStatus method, which updates a couple of Deal properties and then fires a PropertyChanged event on the Deal itself, the Deal.BookingTime and Deal.IsBooked column values are not always refreshed in the grid.  If I scroll the relevant rows out of view and then back into view, the values are updated correctly.

Is this expected?  Am I not supposed to be setting nested bindings on Columns?  Should the grid not listen for the OnPropertyChanged("Deal"event and update all columns using that property?

Thanks.
Marcus.
Rossen Hristov
Telerik team
 answered on 07 Jun 2013
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?