Telerik Forums
UI for WPF Forum
0 answers
114 views
I've changed DataMemberPath of custom column but visible cells is not refreshed. After scrolling all data is refreshed.
How to refresh visible cells? I don't want refresh all gridview, just cells in current column.
Anton
Top achievements
Rank 2
 asked on 09 Aug 2012
1 answer
259 views
Hello,

I am using a radcartesianview.  Is it possible to make the axis a fixed width height, so the chart doesn't jump when I scroll.  Preferably, this would be the height of the longest named category on the axis.

Thanks,
Eric
Rosko
Telerik team
 answered on 09 Aug 2012
2 answers
158 views
Hi all,

I chose to use EnableNativeDrag to get around another bug I was having with the drag/drop (was giving me errors regarding my layout not wrapped in adorners layer, and someone suggested to use native drag). However, my OnDropInfo code, which was working previously, is now not executing the block when drop status is DropComplete. 

More info:

I did RadDragAndDropManager.EnableNativeDrag = true in my drag source. The drag source is a RadTreeView and drop target is a RadChart.

Drag code:

private void OnDragQueryHandler(object sender, DragDropQueryEventArgs e)
{
    if (e.Options.Status == DragStatus.DragQuery)
    {
        RadTreeViewItem item = e.OriginalSource as RadTreeViewItem;
        ContentControl cue = new ContentControl();
        cue.ContentTemplate = this.Resources["ApplicationDragTemplate"] as DataTemplate;
 
        cue.Content = new TextBlock()
        {
            Padding = new Thickness(5),
            Background = new SolidColorBrush(Colors.LightBlue),
            FontSize = 12
        };
 
        if (item.Item is CustomItem)
        {
            // do stuff
        }
        else
        {
            e.QueryResult = false;
            return;
        }
 
        e.Options.DragCue = cue;
    }
    e.QueryResult = true;
}
 
private void OnDragInfoHandler(object sender, DragDropEventArgs e)
{
    if (e.Options.Status == DragStatus.DragComplete)
    {
        // do stuff
    }
}

And drop code:

private void OnDropQueryHandler(object sender, DragDropQueryEventArgs e)
{
    var payload = e.Options.Payload;
 
    e.QueryResult = payload is CustomItem;
}
 
private void OnDropInfoHandler(object sender, DragDropEventArgs e)
{
    if (e.Options.Status == DragStatus.DropPossible)
    {
        UI_RadChart.BorderBrush = WPConstants.DRAG_BRUSH;
    }
    else
    {
        UI_RadChart.BorderBrush = null;
    }
 
    if (e.Options.Status == DragStatus.DropComplete)
    {
        // DO STUFF, NOT REACHING HERE
    }
}

Jinyan
Top achievements
Rank 1
 answered on 08 Aug 2012
4 answers
148 views
Hi,

I would like to customize the timelineview to:

1. Display day (monday, tuesday... etc) instead of date.
2. Display 24hours below each day.

Please see the attached screenshot. Is it possible?

Thank you in advance for your help.

Mark
Ventzi
Telerik team
 answered on 08 Aug 2012
1 answer
123 views
hi,

why in my project TreeListView i can not use RadcontextMenu? I would like to add some menus when i right mouse click on the rows in the TreeListView. But if i defind the following in the xaml file,  It always said Type RadContextMenu is not defined?  what is the problem?

          <telerik:RadContextMenu.ContextMenu>
                <telerik:RadTreeListView.ContextMenu x:Name="GridContextMenu">
                    <telerik:RadContextMenu.Items>
                        <telerik:RadMenuItem Header="Add" />
                        <telerik:RadMenuItem Header="Edit" />
                        <telerik:RadMenuItem Header="Delete" />
                    </telerik:RadContextMenu.Items>
                </telerik:RadTreeListView.ContextMenu>
            </telerik:RadContextMenu.ContextMenu>

thanks,
Cui
Rosen Vladimirov
Telerik team
 answered on 08 Aug 2012
0 answers
142 views
Hello!
I'm designing RadGridView and I've got case.
First of all - here is my code:
var cmd = default(RoutedUICommand);
switch (newVal)
{
    case Go.Previous:
        {
            cmd = RadGridViewCommands.MoveUp as RoutedUICommand;
        }
        break;
    case Go.Next:
        {
            cmd = RadGridViewCommands.MoveDown as RoutedUICommand;
        }
        break;
}
if (cmd != null && cmd.CanExecute(null, gridView))
{
    cmd.Execute(null, gridView);
    var selectCmd = RadGridViewCommands.SelectCurrentUnit as RoutedUICommand;
    if (selectCmd != null && selectCmd.CanExecute(null, gridView))
    {
        selectCmd.Execute(null, gridView);
    }
}


When I'm going next element to end of group and try to pass to the next group next group is opening, but first element of second group is not selected (!). When I hit "next" button second time - second item of second group selects just passing first.
How can I manage it? I tough about event handler to select first element of just opened group, but GroupRowIsExpandedChanging is not working.
Kind regards!
Paweł
Top achievements
Rank 1
 asked on 08 Aug 2012
3 answers
178 views
There are several threads where the "MinAppointmentHeight" of the Schedule View is suggested in order to be able to assigned an arbitrary height to appointments. Normally the default template in the Month View display the "Subjet" of the appointment as one line of text.

On the application I am working on, one of the requirements we have is to be able to allow the user to pick and choose several fields to display on the appointments on the Month View. For example, a user might choose 9 different fields to view on the appointment UI, in 9 different rows.

Setting the "MinAppointmentHeight" indeed works to increase the height of the Appointment Item Control, so the user can see all of the fields displayed. However, once that is done, the measuring logic to display stacked up appointments as well as the expander (up and down arrow) at the bottom falls apart.

If my appointment height is larger than the height of the week, the appointment item overflows the container and spills into the next week. One easy way to see this problem is to change the Schedule View "MinAppointmentHeight" to 150 for any of the samples that shows a Month View.

Ideally, if the appointment does not fit, then it should be hidden, and that's actually the measuring logic currently being applied except it does not work once I start setting my own "MinAppointmentHeight". It works wonderfully with one liner appointment as all of your examples but the measuring is buggy with extra taller appointments.

I am attaching a screen shot, for the problem.
Your help will be appreciated.






Yana
Telerik team
 answered on 08 Aug 2012
6 answers
385 views
Hi everybody,

I'm struggling for hours using the aggregate functions in my datagrid.
I'm using Telerik RadControls WPF Q2 2012 SP1.

Here is the code:

Xaml:
<Telerik:RadGridView x:Name="uxGratuitiesDataGrid"
                                     Margin="-11,-11,-11,0"
                                     Grid.Row="0"
                                     IsReadOnly="True"
                                     CanUserSortColumns="True"
                                     CanUserFreezeColumns="False"
                                     CanUserReorderColumns="False"
                                     AutoExpandGroups="False"
                                     ColumnWidth="*"
                                     AutoGenerateColumns="False"
                                     RowIndicatorVisibility="Collapsed"
                                     ShowGroupPanel="False"
                                     ShowColumnFooters="True"
                                     IsFilteringAllowed="False"
                                     ItemsSource="{Binding SelectedGroupBooking.DailyBreakDown, Source={StaticResource Presenter}}">
                    <Telerik:RadGridView.Columns>
 
                        <!-- Gratuity amount -->
                        <Telerik:GridViewDataColumn
                            DataMemberBinding="{Binding Gratuity.BaseAmount, Converter={StaticResource AmountConverter}, UpdateSourceTrigger=PropertyChanged}"
                                                    Header="Base Amount">
                        </Telerik:GridViewDataColumn>
                        <!-- Total Gratuity amount -->
                        <Telerik:GridViewDataColumn DataMemberBinding="{Binding Gratuity.TotalAmount, Converter={StaticResource AmountConverter}}"
                                                    Header="Total Amount">
                            <Telerik:GridViewDataColumn.AggregateFunctions>
                                <Telerik:SumFunction SourceField="Gratuity.TotalAmount"/>
                            </Telerik:GridViewDataColumn.AggregateFunctions>
                        </Telerik:GridViewDataColumn>
 
                    </Telerik:RadGridView.Columns>


My collection is a set of objects defined as this:

public ObservableCollection<VomRoomStayBreakDown> DailyBreakDown
        {
            get { return _dailyBreakDown; }
            set { _dailyBreakDown = value; OnPropertyChanged("DailyBreakDown"); }
        }

and the VomRoomStayBreakDown contains this:


        public VomGratuity Gratuity
        {
            get { return _gratuity; }
            set { _gratuity = value; OnPropertyChanged("Gratuity"); }
        }

Which itself contains this:


        
public FldInteger Quantity
        {
            get { return _quantity; }
            set { _quantity = value; OnPropertyChanged("Quantity"); }
        }
 
 
        public VomAmount BaseAmount
        {
            get { return _baseAmount; }
            set { _baseAmount = value; OnPropertyChanged("BaseAmount"); }
        }
 
        public VomAmount TotalAmount
        {
            get { return _totalAmount; }
            set { _totalAmount = value; OnPropertyChanged("TotalAmount"); }
        }


Amount is composed of a decimal (Value) and a currency (Currency).

I am trying to Sum the decimal values from my VomAmounts (correctly displayed in the columns), but it always lead to the exception. 
"No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic."

Can somebody tells me what I am doing wrong over there ?

Thanks a lot !
Julien
Top achievements
Rank 1
 answered on 08 Aug 2012
3 answers
112 views
Can the transition control be used in an MDI type scenario?

We have an application with multiple views, but each of them should only be showed inside the main view.

Is this advisable or is it a bad idea?

Thanks,
Jacques
Yana
Telerik team
 answered on 08 Aug 2012
2 answers
202 views
Hello,

First I would like to say that I'm very impressed with level of customization you allow and the easy to understand and quite comprehensive online documentation.

I don't know whether to post this question under 'Chart' or 'ChartView' yet I attend to use the one that will resolve my current issue.

Platform
I'm developing for a touch environment (wpf pixelsense sdk 2).  

My goal
When a user touches anywhere on a graph (stacked area series) - show him information about the data point he touched.

In a technical aspect:
1. Use touch down/click/manipulation events to recieve a data point 
2. Alternative solution - to be able to get the item (data point) in a given position. This way I will be able to trap touch events manually.

Limitations
I cannot use any mouse events, only touch events.

What I've tried:

experiment  1

1. Add 'ChartTrackBallBehavior' to my chart
2. Register to 'TrackInfoUpdated' event
3. Use 'e.Context.ClosestDataPoint' to get data point of current position

Result
Since I'm using touch device I need this event to be triggered when touching (touchdown event) but it doesn't. 
I saw a possible workaround but it seems to be relevant only to wp8 controls and not to wpf (link)

experiment 2
1. Register to 'radChart.DefaultView.ChartArea.ItemClick' event.
2 Use the event arguments which include information on the clicked item.

void ChartArea_ItemClick(object sender, ChartItemClickEventArgs e)
{
      // Here I can use e.DataPoint or e.ItemIndex
}

Result
It works only if I uses the mouse, when using touch the event is never beng promoted (might be because the chart is hosted inside scatterviewitem) . I have tried to bypass this issue without success.

Any workaround exists on current version will be much helpful.

Sincerely,
Guy
Giuseppe
Telerik team
 answered on 08 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?