Telerik Forums
UI for WPF Forum
2 answers
144 views
Hello everybody,

I have a probleme with my GanttView when I add event to an event that doesn't have children at beginning, when an InitialExpandBehavior is used to keep event collapsed.
I recreate this bug in a small example you can find here https://drive.google.com/file/d/0Bw_pUE-LqMWVbjZGWHJ5ZlFKX1U/view?usp=sharing
Reproduction in this project :
- at beggining, 2 event are generated : "phase 1" and "phase 2", and an event "evt phase 1" is added to children of "phase 1"
- I have an InitialExpandBehavior which return false in ShouldExpandItemByDefault in order to all items are collapsed
- I Have 2 button : "Add event to phase 1" which add an event in children of "phase 1" and "Add event to phase 2" which add an event in children of "phase 2"
- click on "Add event to phase 1" is OK, the event is added
- click on "Add event to phase 2" is KO, the event is added but the view is not refresh
If I remove the expandBehavior, the two buttons are OK.

Can you investigate ? Have you a workaround if correction is complicated ?

Thanks for your Help

PS : sorry for my english
Julien
Top achievements
Rank 1
 answered on 03 Nov 2014
1 answer
117 views
Hi There,

Can you please guide me how can we localize the text "aA" ?
Please check the attached screenshot for more information.

Thanks in advance,
Regards,
Raj.
Boris
Telerik team
 answered on 03 Nov 2014
1 answer
79 views
Hello everybody,

I have a probleme with my GanttView when I add event to an event that doesn't have children at beginning, when an InitialExpandBehavior is used to keep event collapsed.
I recreate this bug in a small example you can find here https://drive.google.com/file/d/0Bw_pUE-LqMWVbjZGWHJ5ZlFKX1U/view?usp=sharing
Reproduction in this project :
- at beggining, 2 event are generated : "phase 1" and "phase 2", and an event "evt phase 1" is added to children of "phase 1"
- I have an InitialExpandBehavior which return false in ShouldExpandItemByDefault in order to all items are collapsed
- I Have 2 button : "Add event to phase 1" which add an event in children of "phase 1" and "Add event to phase 2" which add an event in children of "phase 2"
- click on "Add event to phase 1" is OK, the event is added
- click on "Add event to phase 2" is KO, the event is added but the view is not refresh
If I remove the expandBehavior, the two buttons are OK.

Can you investigate ? Have you a workaround if correction is complicated ?

Thanks for your Help

PS : sorry for my english
Polya
Telerik team
 answered on 03 Nov 2014
8 answers
250 views
Hi,

I have a RadGridView,it contains various columns.i marked two columns of them IsVisible =  False, on certain condition.
I have another condition, on which one of the invisible columns mark IsVisible = True, But i am not able to get index of recently marked visible column on RowLoaded event.


//This is to hide two columns "Address" and "LastName"
private
void rdbHide_Checked(object sender, RoutedEventArgs e)
       {
           if ((bool)rdbHide.IsChecked)
           {
               dgQueue.Columns["Address"].IsVisible = false;
               dgQueue.Columns["LastName"].IsVisible = false;
           }
          
           dgQueue.Rebind();
       }
      //This is to show "Address" column
       private void rdbShow_Checked(object sender, RoutedEventArgs e)
       {
           if ((bool)rdbShow.IsChecked)
               dgQueue.Columns["Address"].IsVisible = true;
          
          
           dgQueue.Rebind();
       }

On RowLoaded event i am unable to get "Address" column index.
private void dgQueue_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            if (e.DataElement != null)
            {
                GridViewRow GrdRow = e.Row as GridViewRow;
                Emp objEV = e.Row.DataContext as Emp;
 
                if (GrdRow != null)
                {
                    for (int index = 0; index < GrdRow.Cells.Count; index++)
                    {
//Here i am not able to get index of "Address" column, on the bases of Address i want to show and hide Image control inside "PatInfo" column
                        if (GrdRow.Cells[index].Column.UniqueName.Equals("PatInfo"))
                        {
                         
                            Image img = null;
                            img = (Image)GrdRow.Cells[index].Content;
                            if (!string.IsNullOrEmpty(objEV.Address))
                            {
                                if (objEV.Address == "Noida")
                                {
                                    if (img != null) img.Visibility = System.Windows.Visibility.Collapsed;
                                }
                                else
                                {
                                    if (img != null) img.Visibility = System.Windows.Visibility.Visible;
                                }
                            }
                        }
                    }
                }
            }
        }

XAML :
<telerik:RadGridView Name="dgQueue" Grid.Row="0" AutoGenerateColumns="False" RowLoaded="dgQueue_RowLoaded">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Width="*" UniqueName="FirstName"
                                                            DataMemberBinding="{Binding FirstName}"
                                                            Header="FirstName">
 
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="*" UniqueName="LastName"
                                                            DataMemberBinding="{Binding LastName}"
                                                            Header="LastName">
                    </telerik:GridViewDataColumn>
 
                    <telerik:GridViewDataColumn Width="*" UniqueName="Address"
                                                            DataMemberBinding="{Binding Address}"
                                                            Header="Address" />
                    <telerik:GridViewDataColumn Width="*" UniqueName="Mobile"
                                                            DataMemberBinding="{Binding Mobile}"
                                                            Header="Mobile" />
 
                    <telerik:GridViewDataColumn Name="PatInfo" UniqueName="PatInfo" Width="90" Header="Pat Info">
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Image Name="imgDemo"
                                                   Width="16"
                                                   Height="16"
                                                   ToolTip="Patient Information"
                                                   Source="/WpfDemo;component/Images/magnify3.png"
                                                   />
                            </DataTemplate>
 
                        </telerik:GridViewColumn.CellTemplate>
 
                    </telerik:GridViewDataColumn>
 
                </telerik:RadGridView.Columns>
 
            </telerik:RadGridView>
Dimitrina
Telerik team
 answered on 03 Nov 2014
5 answers
754 views
Hi all,

I wish to use radgridview for my parent data and whenever the specific parent data row have details data inside and it will show up a toggle button beside my first column data name instead of the default column for toggle button while for the parent data row which is not containing details data will be not able to see the toggle button. I know there's something related with gridviewboundcolumnbase in a new class. Could anyone give some idea or provide some sample? It will be great for me to be done this. Thanks in advance.

Best Regards,
Ng
Boris
Telerik team
 answered on 03 Nov 2014
1 answer
103 views
Hi, we've just updated to the latest Q3 2014 WPF controls and when clicking on the RibbonView backstage menu item we get a System.NullReferenceException.
It doesn't even touch our code before this happens. Is there something we are doing incorrectly here. Prior to this release it was working perfectly.

Stack trace:

A first chance exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Controls.RibbonView.dll
Wed Oct 29 2014 10:35:54.6091 [ERROR] TID:  1 Unhandled Dispatcher exception 
*** EXCEPTION ***
 System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadRibbonView.CreateBackstageAdorner()
   at Telerik.Windows.Controls.RadRibbonView.ShowBackstage()
   at Telerik.Windows.Controls.RadRibbonView.ToggleIsBackstageOpen()
   at Telerik.Windows.Controls.RadRibbonView.OnIsBackstageOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadRibbonView.set_IsBackstageOpen(Boolean value)
   at Telerik.Windows.Controls.RadRibbonView.AppButtonMouseDown(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)    at Telerik.Windows.Controls.RadRibbonView.CreateBackstageAdorner()
   at Telerik.Windows.Controls.RadRibbonView.ShowBackstage()
   at Telerik.Windows.Controls.RadRibbonView.ToggleIsBackstageOpen()
   at Telerik.Windows.Controls.RadRibbonView.OnIsBackstageOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadRibbonView.set_IsBackstageOpen(Boolean value)
   at Telerik.Windows.Controls.RadRibbonView.AppButtonMouseDown(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Martin Ivanov
Telerik team
 answered on 03 Nov 2014
1 answer
278 views
Is there any way to force a refresh/rebuild of the chart so that the labels are correctly positioned after a runtime change of the font size?  Ideally, in a MVVM way?

Currently, if you bind the font size to a property in the ViewModel and change it, the chart is not repositioned properly to accommodate the change in size.  See attached pics showing undesirable results of changing the font size, both when increasing or decreasing from the initial size.

Here's some code:

<chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis FontFamily="Segoe UI"
                        FontSize="{Binding AxisFontSize}"
                        Title="{Binding AxisTitle}"
                        Minimum="0"
                        Maximum="{Binding AxisMaxValue}"
                        LabelFormat="{Binding AxisLabelFormat}">
                </chartView:LinearAxis>
</chart:RadCartesianChart.VerticalAxis>

public double AxisFontSize
{
    get
    {
        return this._axisFontSize;
    }
    set
    {
        if ( this._axisFontSize != value )
        {
            this._axisFontSize = value;
            this.OnPropertyChanged( "AxisFontSize" );
            this.OnPropertyChanged( "AxisLabelFormat" );
        }
    }
}

What is the best way to accomplish a dynamic font size change?
Peshito
Telerik team
 answered on 03 Nov 2014
4 answers
315 views
Hi,
I'm using this really great control of RadPropertyGrid to generate grids dynamically for several types of objects.
Lately, I tried to add object with property of dictionary (i.e. Dictionary<int, string> and no success on this try...

What should I do?

See my example at property called ItemsData (which is Dictionary<long, string>)
Maya
Telerik team
 answered on 03 Nov 2014
13 answers
874 views
Hi,

I want to edit a row on click of a Button which will be placed inside the RadGridView control and make that particular row highlighted.

Is there any way, in which I can achieve this functionality.

Early, code sample to this solution will be highly appreciated.

Thanks & Regards,
Hirak
Mark
Top achievements
Rank 1
 answered on 31 Oct 2014
4 answers
234 views
  Hello,

I have a ItemTemplate  with a Textblock with TextWrapping="Wrap". Since I update Telerik to the last version, the text is wrapping not normaly, it doesn't fill all the width of the Textblock. I don't understand why, is there something that change in the Tile Style that make this happen?

Thanks in advance for your help.

<DataTemplate x:Key="DashAppTileItemTemplate">      
        <Grid  VerticalAlignment="Top">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="55"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Image VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Source="{Binding Path=Image , Mode=OneWay, TargetNullValue=Category.Image}"  Margin="5,0" />
            <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="1" Text="{Binding Path=Libelle, Mode=OneWay}" FontSize="18" />
            <TextBlock  Grid.Row="1" Grid.Column="1" Text="This is my very long text" TextWrapping="Wrap" />
        </Grid>
    </DataTemplate>




Georges
Top achievements
Rank 1
 answered on 31 Oct 2014
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?