Telerik Forums
UI for WPF Forum
4 answers
110 views
On a form with multiple grids, it's not possible to tell which grid has focus.  The grid selected row color is always the same, whether or not the control has focus.

This presents a problem in the case where you have a ribbon bar with a single "Delete" option that operates on the grid in focus.  The user has no way of knowing which grid will handle the delete operation.

The behavior should be similar to the tree control, where the selected item color changes when the tree loses focus.

Is there a setting or a workaround to change this behavior?

Thanks,
-Jeff


Jeff
Top achievements
Rank 1
 answered on 14 Dec 2011
3 answers
185 views
In my project, I need to insert a InlineUIContainer which includes a TextBlock into the RadRichTextBox, after the insertion, how to keep the InlineUIContainer and other plain text the same height? Thanks.
Mike
Telerik team
 answered on 14 Dec 2011
3 answers
68 views
Hi,

In my business datamodel, I've Some activities, which have several "schedules".

I need to display on one ScheduleView.

So I've a RadCombobox bound on my list of Activities, the SelectedItem is bound to property on my code behind, and this "Activity" object is bound to the AppointmentsSource, with a converter, which basically create one Appointment for each schedule:

public class ActivityToAppointmentConverter:IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        if (value == null || !(value is Activity)) return value;
        Activity activity = (Activity) value;
        List<Appointment> appointments = new List<Appointment>();
        foreach (Schedule schedule in activity.Schedules)
        {
            appointments.Add(new Appointment()
                                 {
                                     Subject = schedule.Activity.Name,
                                     Body = schedule.Activity.Informations,
                                     Start = schedule.StartDate,
                                     End = schedule.EndDate,
                                      
                                 });
        }
 
        return appointments;
    }
 
    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
(I tried to set all field of the "Appointment" object, but it doesn't work either.

I but a breakpoint on the "return appointments" line, and I've appointments.

(I also bound the SelectedTimeSlot on the activity, with a converter which takes the start date of the first schedule and the end date of the last schedule, like this, the radScheduler display directly the good period, this part work like a charm).

But I don't know why, event if I put a breakpoint(checking the date of the appointment), and checking the same period, I don't see any appointment appearing.

So:
-The converter gives good data
-The binding seems to be right
-I'm absolutely sure to be on the good period

So why my appointments aren't appearing?
Valeri Hristov
Telerik team
 answered on 14 Dec 2011
3 answers
162 views
Hi,

I have a weird issue with chart... the legend colors didn't match the line color on chart, Please check the attached picture
<telerik:RadChart DataContext="{Binding}" telerik:Theming.Theme="Office_Blue" HorizontalAlignment="Left"  Loaded="RadChart1_Loaded" Name="radChart1" VerticalAlignment="Top"  >
 
                <telerik:RadChart.DefaultView>
                    <telerik:ChartDefaultView  ChartLegendPosition="Top">
                        <!--<telerik:ChartDefaultView.ChartTitle>
                        <telerik:ChartTitle>CDC growth chart</telerik:ChartTitle>
                    </telerik:ChartDefaultView.ChartTitle>-->
                        <telerik:ChartDefaultView.ChartLegend>
                            <telerik:ChartLegend x:Name="PrimaryLegend" Header="Click on percentile to hide/show:" LegendItemMarkerShape="Square" LegendItemStyle="{StaticResource CustomLegendItemStyle}"  />
                        </telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartDefaultView.ChartArea >
                            <telerik:ChartArea EnableAnimations="False" Padding="5,10,20,5" LabelFormatBehavior="None" LegendName="PrimaryLegend" FontSize="10" >
                                <telerik:ChartArea.PaletteBrushes>
                                    <SolidColorBrush Color="Red" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
                                    <SolidColorBrush Color="LightGray" />
 
                                </telerik:ChartArea.PaletteBrushes>
                                <telerik:ChartArea.AxisY>
                                    <telerik:AxisY ExtendDirection="None"  />
                                </telerik:ChartArea.AxisY>
                            </telerik:ChartArea>
                        </telerik:ChartDefaultView.ChartArea>
                    </telerik:ChartDefaultView>
                </telerik:RadChart.DefaultView>
                <telerik:RadChart.SeriesMappings>
.............................................................
<telerik:RadChart>
Evgenia
Telerik team
 answered on 14 Dec 2011
0 answers
163 views
Setting a style on a list box like so:

<Setter Property="telerik:RadDragAndDropManager.AllowDrag" Value="True" />

Works perfectly for a mouse click, hold and drag. But not for a touch. Has anybody got any ideas? I really really need help with this.

EDIT: By touch, I mean I am using a touchscreen overlay. I've just read elsewhere on the forum that the drag drop manager's 'drag' is defined my left mouse button down, this touchscreen does not simulate a mouse but instead fires it's own touch events so is there anyway I can get this drag to be triggered by a touch?? As I have laready implemented a rather complex custom drag drop behaviour between the listbox and radscheduleview.
Daniel
Top achievements
Rank 1
 asked on 14 Dec 2011
1 answer
157 views
Hi,

How can i refresh a RadgridView that is bound to an IQueryable object ? I mean, as the IQueryable will be used (i.e. generate SQL request) when it'll be evaluated, if i add/edit/delete update in my database, how can i force the refresh/reexecution of the IQueryable  without lost filtering, grouping, etc. ?

Thanks !

Thomas LEBRUN
Top achievements
Rank 1
 answered on 14 Dec 2011
3 answers
229 views
Hi,

I am using WPF Telerik RadGridView control (2011.2.920.35) .

I have simple View (with navigation tree on the left and grid on the right which displays data with number of columns) (using MVVM).

When I change the tree node on the left, it should update with data in the grid.  It updates the data fine, but how can I force all columns to resize to fit content as data changes or user might have resized the columns for the previous data ?

I need an example of the code which I can programmatically to resize all columns to "fit to content".

Let me know if you want any other specific details.


Vlad
Telerik team
 answered on 14 Dec 2011
3 answers
108 views
Hi Guys!

I am fairly new into Telerik business, so please apologize if this isnt the way to report a possible bug.

My recent project is a simulation software for thermal power plants. In a canvas the user can drag&drop
various powergrid objects and connect them to each other.

The user can enter math formulas using public properties of any object on the canvas. And here comes
radExpressionEditor into the game. In this project I am using ILGenerator to dynamicaly add Properties
at runtime. Unfortunately radExpressionEditor doesnt support multiple Item objects.

So much for a little background info. Now for the bug.....

I have a object with the following signature:

    public class DynamicFields : INotifyPropertyChanged
    {

        public event PropertyChangedEventHandler PropertyChanged;

        private int _Test;
        public int Test
        {
            get { return _Test; }
            set { _Test = value; PropertyChangedHandler("Test"); }
        }

        public DynamicFields() { }

        public void PropertyChangedHandler(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        // BUG: RadExpressionEditor sets a Handle on this.PropertyChanged, but doesnt have any Targetdelegate.
        // Lets remove it here as a workaround!
        public void RemoveLastPropertyChangedHandler()
        {
            Delegate RemoveDelegate = this.PropertyChanged.GetInvocationList().Last();
            if (RemoveDelegate != null)
            {
                this.PropertyChanged -= (RemoveDelegate as PropertyChangedEventHandler);
            }
        }


Some other place in my code I do something like this:

            //Window with ExpressionEditor that will be shown as a dialog
            Window_ExpressionEditor ee = new Window_ExpressionEditor();

            //FormelEditor is an instance of ExpressionEditor
            ee.FormelEditor.Item = Device.dynamicFields;

            //As soon the Item Property is set to my Dynamicobject, radExpressionEditor will subscribe to
            //the PropertyChanged event but without any target method to call.
            //So then ever I change the Value of a property the PropertyChangedHandler raises an exception.

            //Workaround is to delete last entry of the GetInvocationList()
            DynamicFields df = this.Device.dynamicFields;
            df.RemoveLastPropertyChangedHandler();


This behaviour also occurs if I use a "normal" class without expanding the properties at runtime.
Right now my workaround runs fine, but would be nice to get this bug verified.

Oh and please implement radExpressionEditor.Items for multiple objects use ;-)

Thank you and my best regards, Martin
Stefan Dobrev
Telerik team
 answered on 14 Dec 2011
4 answers
415 views
How would you implement a hotkey for the Approve RadButton in the following code snippet?

          <telerik:RadButton Name="btApproveReport"  Click="btApproveReport_Click"  Margin="10,0,10,0" Width="Auto" HorizontalContentAlignment="Center" MaxHeight="30" VerticalContentAlignment="Center" > 
            <telerik:RadButton.Content> 
              <StackPanel Orientation="Horizontal" Margin="4 0"
                <TextBlock Text="Approve"   Foreground="DarkGreen" FontSize="12" /> 
                <Image Source="pack://application:,,,/Resources/CheckMark.png" Margin="5 0 0 0" Height="16" Width="16" /> 
              </StackPanel> 
            </telerik:RadButton.Content> 
          </telerik:RadButton> 

Petar Mladenov
Telerik team
 answered on 13 Dec 2011
0 answers
207 views
I have a combo box with multiple combobox items.  (The example is implemented using MVVM)

Each combo box item contains
1. DatePicker for StartDate
2. DatePicker for EndDate
3. OK button.
4. TextBlock

When the combo box is expanded and
1. When I click on the DatePicker control, the combo box collapses.  I was hoping that the DatePicker control would show me the calendar and I could select the date, instead of collapsing the combobox.
(Note: The above behavior is only for RadComboBox and not the default ComboBox)

2. When I click on the "OK" button, I calculate the Text that has to be displayed and I am expecting the combobox to collapse. (I have Command set up for button to handle the click event). But the combobox does not collapse

What I would like is
1.  Not let the combobox collapse when I click on the DatePicker control to select a date
2. When I click on the "OK" button, the combobox should collapse (just like when an item is selected inside combobox)

Note:  I am using MVVM, so I don't have scope to use event handlers.

Thanks.
Gautam
Top achievements
Rank 1
 asked on 13 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?