Telerik Forums
UI for WPF Forum
1 answer
113 views
hey guys,

I'm experiencing a problem with Drag And Drop within my RadTreeView...  This worked fine under 2010 Q3, just since installing the SP1 I am getting this bug.. the code from the RadTreeView is below.... 

the error i'm receving is..

"An exception of type 'System.InvalidOperationException' occurred in Telerik.Windows.Controls.dll but was not handled in user code

Additional information: Root AdornerLayer Not Found. Please make sure that your root visual is Window or other element that has an adorner layer. Alternatively, wrap your root panel in an <AdornerDecorator> element."

further info...

"Error. Root AdornerLayer Not Found. Please make sure that your root visual element is window or other element that has an adorner layer alternatively wrap your root panel in an <AdornerDecorator> element.

When attempting to drag an element..

<DockPanel LastChildFill="True">
<telerikNavigation:RadTreeView x:Name="uiActivitiesList" IsDragDropEnabled="True" Margin="-20,0,0,0"
BorderThickness="0" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" TextDropAfter="Drop After" TextDropBefore="Drop Before"
SelectionChanged="uiActivitiesList_SelectionChanged" SelectionMode="Multiple" dragDrop:RadDragAndDropManager.AllowDrop="True" IsDragPreviewEnabled="False"
IsDragTooltipEnabled="True" DragEnded="uiActivitiesList_DragEnded" SourceUpdated="uiActivitiesList_SourceUpdated"
ItemsSource="{Binding ActivityModelViewCollection, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True,Mode=OneWay}"/>
</DockPanel>


I'm unsure if this is a bug or if i just need to wrap my user control in an AdornerDecorator, but some further information would be great.
http://eeuauaughhhuauaahh.ytmnd.com/
Tsvyatko
Telerik team
 answered on 24 Jan 2011
2 answers
118 views
Hi,
     I am using MVVM pattern. I have a telrik gridview and i want to capture its CellLostFocus event,for that i am using CellEditEnded event. But problem is that this event is firing when i am tabbing out of the cell,not on lost focus of the cell. Is there any way to capture CellLostFocus event of gridview. Since I am using MVVM pattern so I also dont want to write any code in code behind.

Thanks
apoorv
Top achievements
Rank 1
 answered on 24 Jan 2011
1 answer
310 views
Hi,
Is it possible to remove a RadPane from a RadDocking, instead of hiding it?
Ideally, I'd like to wire up the Close so that it removes the "closed" pane from the control.  Is this possible?

Thanks.
George
Telerik team
 answered on 24 Jan 2011
0 answers
159 views
How to make a custom shape of progressbar?For example,change the shape of progressbar from rectangle to triangle.
Best regards.
xjgs_xhj@163.com
Top achievements
Rank 1
 asked on 24 Jan 2011
1 answer
99 views
Hi,
just recently started evaluating your products. The demo page is excellent, but i ran into an error of some sort.
On the wpf demos i was trying out the GridView -> Performance -> Client binding to 1 mil. records, i get an error when i start scrolling the data by using the scrollbar slider. It doesn't go to an error if i use either the page down area or the arrows.

I'm using IE 8

-Matti
Vlad
Telerik team
 answered on 24 Jan 2011
1 answer
100 views
Hi,

Is is possible to used a custom sort order to perform a column sort in a GridView column?

For example,  I want to use a custom sort to sort text column row values 1,2,10,3 to have a sort order of 1,2,3,10 rather then 1,10,2,3

Thanks
Daniel
Vlad
Telerik team
 answered on 24 Jan 2011
5 answers
145 views
I want to change the datatemplate of the DragCue (I mean i want to change the image source of the image tag applied in datatemplate in XAML). I used the following event but it didn't help me out. please help ASAP.

      private void OnDragQuery(object sender, DragDropQueryEventArgs e)
        {
            cue = new ContentControl();
            e.QueryResult = true;
            cue.MouseUp += new MouseButtonEventHandler(cue_MouseUp);
           
            e.Options.DragCue = cue;

            ImageSource IMGSOURCE = new BitmapImage(new Uri("/Images/header_idea.png",UriKind.Relative));

            DataTemplate dt = new DataTemplate();
          
            FrameworkElementFactory ef = new FrameworkElementFactory(typeof(Image));
            ef.SetValue(Image.SourceProperty, IMGSOURCE);

            dt.VisualTree = ef;
            cue.ContentTemplate = dt;
                        
            e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();
            e.Handled = true;
        }
Tsvyatko
Telerik team
 answered on 21 Jan 2011
1 answer
88 views

hello admin,
                i have pasted the OnDragQuery event of the drag and drop. the two lines of code in which i have given the datatemplate to the drag cue's content template is is fine enough. But the image source in the datatemplate in xaml is always static  and i' not able to bind the image source. So, instead of that i wanted to give the dragcue a new image in C#. It does work, but its not firing and triggering the mouse up event. please point out any mistake and please suggest anything new if this isn't the right way to do it. And please i don't want to use the binding, as it is not working properply. Suggest something in DEeail. In DETAIL please, or attach and perfect and suitable example..Thanks in advance. please its important

 

 

void OnDragQuery(object sender, DragDropQueryEventArgs e)
{
ContentControl dragCue = new ContentControl();
e.QueryResult =
true;
dragCue.MouseUp += new MouseButtonEventHandler(dragCue_MouseUp);

dragCue.ContentTemplate =
this.Resources["DragTemplate"] as DataTemplate;  //is fine,
e.Options.DragCue = dragCue;   // but has static image souce in xaml

 

 

 

//Image im = new Image();             //this commented code doesn't fire
//im.Width = 40;                     //the MouseUp event, when i        
//im.Height = 40;                     //don't give the     
//im.Source = new BitmapImage(new Uri(@"/Images/drive.png", UriKind.Relative));  //content template to it. want
//e.Options.DragCue = im;             // to use it to give dynamic image
                                     //source instead 
                                    // of above highlighted code.

e.Options.ArrowCue =
RadDragAndDropManager.GenerateArrowCue();
e.Handled =
true;

 

}

 

 

Tsvyatko
Telerik team
 answered on 21 Jan 2011
1 answer
240 views
I'm extending the RadDatePicker. I have implemented a new property that tells whether the text input in the DatePicker is valid (that is if can be parsed to a DateTime):

/// <summary>
/// Tells whether the input in the TextBox of this DatePicker is valid. This property is
/// updated continously as the user types in the TextBox.
/// </summary>
public bool IsInputValid
{
    get
    {
        return (bool)GetValue(RadDatePickerExtended.IsInputValidProperty);
    }
    set
    {
        SetValue(RadDatePickerExtended.IsInputValidProperty, value);
    }
}
 
public static readonly DependencyProperty IsInputValidProperty = DependencyProperty.Register("IsInputValid", typeof(bool), typeof(RadDatePickerExtended), new FrameworkPropertyMetadata(true));


I'm setting the value of this property in an event handler for the ParseDateTimeValue event:

private void RadDatePickerExtended_ParseDateTimeValue(object sender, ParseDateTimeEventArgs args)
{
    //If RadDatePicker could not parse the input...
    if (!args.IsParsingSuccessful)
    {  
        //HERE I DO SOME EXTRA PARSING FOR INPUT THAT I WANT TO SUPPORT
        //BUT THAT IS NOT SUPPORTED BY RadDatePicker. IN ALL CASES
        //WHERE THE PARSING IS SUCCESFUL AND A DATETIME IS SET, I
        //ALSO SET args.IsParsingSuccessful TO TRUE.
 
        IsInputValid = args.IsParsingSuccessful;
    }
    else
    {
        //The input was succesfully parsed by the default parsing in the RadDatePicker.
        IsInputValid = true;
    }
}


This seems to work fine. But the problem is that if the user deletes the text in the input the event is NOT dispatched and thus my method is not executed. If the user provides some invalid input so that my IsInputValid property is set to false and then clears the input, IsInputValid will still be false! I want to set it to true when the input is empty (this will mean that the value of the DatePicker is null which is allowed in my case).

So my question is: Is it possible to get notified in some way when the input is cleared by the user?
Kaloyan
Telerik team
 answered on 21 Jan 2011
1 answer
161 views
I am currently trying to handle the return key press for a RadButton control via the PreviewKeyDown event but am unable to. I can successfully handle other keystrokes, such as function keys, however the event is not raised when the return key is pressed. I can only assume that this is because the return key is seen as an access key and so handled elsewhere. Is there a way to turn this off or bypass it so that I can handle the return key for myself?
Brian Scott
Top achievements
Rank 1
 answered on 21 Jan 2011
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
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?