Telerik Forums
UI for WPF Forum
1 answer
124 views
Hello,

can i use drag and drop between RadGridview and RadTreeView items?

i have this code:

 

Dim mPoint As Point = e.GetPosition(TreeViewMedicosServicios)

with it i take the mouse x and y position on the TreeView, i need know the TreeviewItem in this position

 



Thanks

Allan
Top achievements
Rank 1
 answered on 16 Jul 2009
1 answer
153 views
Hi,

I downloaded the Q2 version of WPF Controls and installed the same. When trying to view the samples for window the application crashes. I am attaching the  stacktrace. Do let me know how can this be viewed without throwing any error. 

---------------------------
Fatal error!
---------------------------
Error message: Value does not fall within the expected range.

StackTrace:    at System.StubHelpers.ObjectMarshaler.ConvertToNative(Object objSrc, IntPtr pDstVariant)

   at MS.Internal.Automation.UiaCoreProviderApi.RawUiaRaiseAutomationPropertyChangedEvent(IRawElementProviderSimple provider, Int32 id, Object oldValue, Object newValue)

   at System.Windows.Automation.Provider.AutomationInteropProvider.RaiseAutomationPropertyChangedEvent(IRawElementProviderSimple element, AutomationPropertyChangedEventArgs e)

   at System.Windows.Automation.Peers.AutomationPeer.RaisePropertyChangedEvent(AutomationProperty property, Object oldValue, Object newValue)

   at Telerik.Windows.Controls.RadWindow.OnLeftChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Navigation_WPF\Sources\Development\Controls\Navigation\Window\RadWindow.cs:line 1576

   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, OperationType operationType)

   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)

   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)

   at Telerik.Windows.Controls.RadWindowPopup.WindowPopupWindowFactory.WindowPopupWindowImpl.PositionWindow() in c:\Builds\WPF_Scrum\Navigation_WPF\Sources\Development\Controls\Navigation\Window\WindowPopup\WindowPopupWindowImpl.cs:line 201

   at Telerik.Windows.Controls.RadWindowPopup.WindowPopupWindowFactory.WindowPopupWindowImpl.OnWindowLoaded(Object sender, EventArgs args) in c:\Builds\WPF_Scrum\Navigation_WPF\Sources\Development\Controls\Navigation\Window\WindowPopup\WindowPopupWindowImpl.cs:line 116

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args)

   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)

   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)

   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)

   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)

   at System.Windows.Interop.HwndTarget.OnResize()

   at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam)

   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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, Boolean isSingleParameter)

   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

 

---------------------------
OK  
---------------------------

Regards,

M. Rajesh.

Boyan
Telerik team
 answered on 16 Jul 2009
8 answers
492 views
I create empty project, add line
<telerik:DateTimePicker />

and when user try to change antyhing exception is thrown: Nullable object must have a value.



Nikolay
Telerik team
 answered on 16 Jul 2009
2 answers
188 views

Hi

I would very much appreciate some help on the following problem:

I have a project in which I have a RadChart. Upon starting my application the RadChart is populated with 3 data series (Car, Property and Travel) in a stacked bar format. User can then click on any of the 12 resulting ChartItems, in which case the chart is repopulated by a new DataSeries, this time in a line format. (Basically it is based on Telerik's Drill Down demo - the first chart displays sales per month, the second chart breaks it further into days.)

To return from the second view back to the first view, user clicks the Reload button, which runs the same method (ConfigureMonthlyRevenue()) that was run upon starting the application.

There were no problems with this code until I upgraded to Q2 yesterday. Now all runs smoothly until I hit the Reload button and the application hangs. When I pause it, I get the "Cannot evaluate expression because the code of the current method is optimized" error when hovering over the bit of code where I'm adding the series to the chart. Please see the code snippet below:

//This is the bit that's run upon starting the app (without problems) and then when the Reload button is hit (which is when it hangs on the bold line)

private void ConfigureMonthlyRevenue()

{

 

this.past12Months.DefaultView.ChartArea.DataSeries.Clear();

this.past12Months.DefaultView.ChartTitle.Content = "Past 12 Months Revenue";


DataSeries
seriesCar = new DataSeries();

seriesCar.Definition = new StackedBarSeriesDefinition();
seriesCar.LegendLabel =
"Car";

seriesCar.Definition.ShowItemToolTips = true;

DataSeries seriesProperty = new DataSeries();

seriesProperty.Definition = new StackedBarSeriesDefinition();
seriesProperty.LegendLabel = "Property";

seriesProperty.Definition.ShowItemToolTips = true;


DataSeries
seriesTravel = new DataSeries();

seriesTravel.Definition = new StackedBarSeriesDefinition();
seriesTravel.LegendLabel = "Travel";

seriesTravel.Definition.ShowItemToolTips = true;


this
.FillWithRevenueData(seriesCar, seriesProperty, seriesTravel);

chartArea.DataSeries.Add(seriesCar);

chartArea.DataSeries.Add(seriesProperty);

chartArea.DataSeries.Add(seriesTravel);

chartArea.AxisX.StripLinesVisibility = Visibility.Collapsed;

chartArea.AxisY.Title = "(thousand dollars)";

chartArea.AxisX.TickPoints.Clear();
chartArea.AxisY.Step = 100d;

chartArea.AxisY.DefaultFormat = "C0";

string[] months = new string[] { "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "Jan", "Feb", "Mar", "Apr", "May", "Jun" };

for (int i = 0; i < months.Length; i++)

{

 chartArea.AxisX.TickPoints.Add(new TickPoint());

chartArea.AxisX.TickPoints[i].Label = months[i];

}

}




//When chartItem clicked

private void chartArea_ChartItemClick(object sender, ChartItemClickEventArgs e)

{

this.past12Months.DefaultView.ChartArea.ChartItemClick -= this.chartArea_ChartItemClick;


string
axisItemLabel = past12Months.DefaultView.ChartArea.AxisX.TickPoints[e.ItemIndex].Label;

string product = e.DataSeries.LegendLabel.ToString();

past12Months.DefaultView.ChartTitle.Content = string.Format("Daily Revenue {0} ({1})", product, axisItemLabel);

 

DataSeries series = new DataSeries();

series.Definition = new LineSeriesDefinition();

series.LegendLabel = "Daily Revenue";

FillWithDailyDummyData(series);

past12Months.DefaultView.ChartArea.DataSeries.Clear();

past12Months.DefaultView.ChartArea.DataSeries.Add(series);

string[] days = new string[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30" };


for
(int i = 0; i < days.Length; i++)

{

past12Months.DefaultView.ChartArea.AxisX.TickPoints[i].Label = days[i];

}

this.past12Months.DefaultView.ChartArea.ChartItemClick += this.chartArea_ChartItemClick;

}

Any help with this would be much appreciated.

Thank you
Judi

Giuseppe
Telerik team
 answered on 16 Jul 2009
10 answers
188 views
I'm trying to get the RadGridView for WPF to work in our software, and I was wondering if it is possible to show the Item count of a group in the group header without using predefined GroupDescriptions and preferably a XAML-only solution.

So far, all the examples on AggregateFunctions I have found, either have predefined GroupDescriptions in XAML or set the AggregateFunction programmatically using a hardcoded GroupDescription.

Edit:

I managed to fake the desired functionality by using the GroupDescriptions.CollectionChanged event:

 
private void GroupDescriptions_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)  
    {  
      if (recordings.GroupDescriptions.Count > 0)  
      {  
        foreach (RadGroupDescription rgd in recordings.GroupDescriptions)  
        {  
          CountFunction cf = new CountFunction(rgd.PropertyName, rgd.PropertyName, "");  
          rgd.AggregateFunctions.Add(cf);  
        }  
      }  
    } 

Strangely, the e.Action is never Add when dragging a column to the GroupPanel, so I had to do it this way.

 

 

Vlad
Telerik team
 answered on 16 Jul 2009
3 answers
85 views
Upgraded to 2009.2.701.35 and now it does not use the value in the HeaderText field.

This displays "Data.FirstName" as the column header instead of "First Name"
                        <telerik:GridViewDataColumn  
                            HeaderText="First Name"  
                            IsCustomSortingEnabled="False"  
                            IsFilterable="False"  
                            DataMemberPath="Data.FirstName" /> 


This displays "Default" as the column header instead of "Default Value"
                    <telerik:GridViewDataColumn  
                        HeaderText="Default Value"  
                        UniqueName="Default" 
                        IsSortable="True"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 

Vlad
Telerik team
 answered on 16 Jul 2009
1 answer
61 views
Hi, i have a problem with a GridView, Is possible add events to gridView's childs? or how do I access to Childs?, I need the event Mouse_DoubleClick for the child


Regards!!!!
Vlad
Telerik team
 answered on 16 Jul 2009
1 answer
127 views
Hi,

I have a Button named photo and label named Signature on the form. and one submit button. When user clicks photo button or click on the label, some operation take place. When user clicks submit, operations related to Photo button and signatures label submits to the database. But if the user doesn't click photo Button or label, no DB is updated.

I want to know is there any way , I can force user to click the button or label . These are WPF controls.

Thanks,

Veena
Hristo Borisov
Telerik team
 answered on 15 Jul 2009
1 answer
94 views
I'm trying to change the date format of the RadDatePicker to display only "dd/MM".  I followed the example here but it doesn't seem to work - I've put the code in the Loaded event if that's any help.

Also, if there's any way to declare this in XAML it'd be a much neater solution.
Kaloyan
Telerik team
 answered on 15 Jul 2009
5 answers
189 views
Hi.

I do not know WPF (yet) and I haven't tried the controls, but from the demos it seems that the customization options for the controls is largely about color, linestyle and gradients.

I am looking for a WPF set which gives options to customize all visuals. Some customers may want click-handling on the chart legends, some want visuals like engineering units on top of the graph, some like it under, some would like it as tooltip. Some would like the various curves to be possible to enable/disable. Some would like to highlight a set of curves. Some would like other metadata to be drawn onto the graph backdrop. Some present a jpg from mspaint and state that they want it "exactly like that".

How customizeable are the WPF radcontrols from Telerik? Are their visuals fully expressed in XAML that I can edit so that I for example easily can remove/add a stackpanel with dimmed curve legends within the graph? 

That kind of stuff.

The screen real estate is very important, so it is important that, if I choose to not use the axis, title, legends, border etc, that they collapses and do not take up space. ie, That it can be stripped down to operate pretty much "fullscreen" within another wpf control container.
Giuseppe
Telerik team
 answered on 15 Jul 2009
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?