Telerik Forums
UI for WPF Forum
1 answer
115 views
The most bizarre situation.  I am trying to do a drag/drop within the treeview.  But for some reason, my DragEnded event will never fire.  I have put it on both the Treeview and it code.  But when I run the code, I just get the error "There is not source code available for the current location".  Other events will work fine like PreviewDragEnded.  I have tried two different datasources.  Both an ObservableCollection and then also a link query cast ToList().  I have also tried to re-create these events and it makes no difference.  By the error, it acts as if I don't have a handler, but I do!  You will notice I have tried the handler in both code and markup.

Version: 2009.3.1314.35

This is based off a sample you put up describing how to change the index of the sort

Here is what I have in XAML and in code:

<

 

<Telerik:RadTreeView x:Name="treeColumns" MinHeight="500" DragEnded="treeColumns_DragEnded"
                        VerticalAlignment="Top" SelectionMode="Multiple" IsEditable="True" IsDragDropEnabled="True"
                        ItemTemplate="{StaticResource ItemTemplate}"
                        ItemsSource="{Binding Converter={StaticResource convWorkflow}}"></Telerik:RadTreeView> 

 

 

 

 

 

 

treeColumns.DragEnded +=

new RadTreeViewDragEndedEventHandler(treeColumns_DragEnded);

 

 

 

 

 

 

private void treeColumns_DragEnded(object sender, RadTreeViewDragEndedEventArgs e)
        {
            int index;
            WorkFlow draggedItem = e.DraggedItems[0] as WorkFlow;
            WorkFlow targetItem=e.TargetDropItem.DataContext as WorkFlow;
            if (draggedItem != targetItem)
            {
                switch (e.DropPosition)
                {
                    case DropPosition.After:
                        index = e.TargetDropItem.Index + 1;
                        break;
                    case DropPosition.Before:
                        index = e.TargetDropItem.Index - 1;
                        break;
                    case DropPosition.Inside:
                        index = e.TargetDropItem.Items.IndexOf(draggedItem);
                        break;
                    default:
                        index = -1;
                        break;
                }
            }
            else
            {
                index = e.TargetDropItem.Index;
            }
            draggedItem.SortOrder = index;
            DataAccess.ctx.SubmitChanges();
        }

heavywoody
Top achievements
Rank 1
 answered on 25 Feb 2010
2 answers
112 views
Hi,Telerik.

I have got a problem when using RadCarouselPanel.
How to select the last Image when using RadCarouselPanel? It seems that the last image cannot be selected.
Is there any way to do this?

Wish your help!
Thank you!
xu jundong
Top achievements
Rank 1
 answered on 25 Feb 2010
2 answers
274 views

Hi everyone,

whit others component suite it is possible, example:

 
    <Style TargetType="ComboBox" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ComboBoxKey}}" />  
    <Style TargetType="TextBox" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.TextBoxKey}}" />  
    <Style TargetType="PasswordBox" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.PasswordBoxKey}}" />  
    <Style TargetType="Button" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ButtonKey}}" />  
    <Style TargetType="ToolTip" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ToolTipKey}}" />  
    <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.CheckBoxKey}}" />  
    <Style TargetType="RadioButton" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.RadioButtonKey}}" />  
    <Style TargetType="ContextMenu" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ContextMenuKey}}" />  
    <Style TargetType="ScrollViewer" BasedOn="{StaticResource {x:Static ribbon:RibbonStyles.ScrollViewerKey}}" /> 


This is possible with the WPF Telerik's suite ?

Thanks,

Massimiliano.
Massimiliano Sorce
Top achievements
Rank 1
 answered on 24 Feb 2010
1 answer
64 views
Hi, 
we updated to Telerik 2010 Q1 Beta, and now we can drag the floating window outside of the main window, but we no longer can drag and drop from one floating window into another or into the main window.
What should we do to make the drag and drop work between the windows?
Thanks
Nick
Boyan
Telerik team
 answered on 24 Feb 2010
1 answer
45 views
Greetings All!

Looking for a way to restrict a RadPanel to only be "dockable" in it's original parent RadPanelGroup? Basically, preventing my tool panels from being able to dock with my DocumentPanel.

Any ideas?

Thanks!


Dave Brock
Top achievements
Rank 1
 answered on 24 Feb 2010
4 answers
292 views
Hi,

We've replaced our earlier use of child grids with a simplified RowDetails, something that looks like this:

       <telerik:RadGridView.RowDetailsTemplate> 
            <DataTemplate> 
                <Grid> 
                    <Grid.ColumnDefinitions> 
                        <ColumnDefinition Width="80" /> <!-- A kind of margin we're using --> 
                        <ColumnDefinition Width="*" /> 
                    </Grid.ColumnDefinitions> 
                    <!-- Here there is a component that appears in column 0 --> 
                     
                    <!-- The actual description  --> 
                    <TextBlock  
                        Grid.Column="1" 
                        Text="{Binding Description, Mode=OneWay}"  
                        TextWrapping="Wrap"/> 
                </Grid> 
            </DataTemplate> 
        </telerik:RadGridView.RowDetailsTemplate> 

When viewing this, the TextBlock fails to wrap the text.

Based on our understanding, this is because the owning Grid is taking more than the visible width. However, it's possible there's a mistake here.

Can you help us understand why the TextBlock is not wrapping?

Thanks,
yonadav
yonadav
Top achievements
Rank 1
 answered on 24 Feb 2010
3 answers
241 views
With the gridview I need to override the delete functionality...When a user hits the delete key on a row in the grid I want to set my entity to Inactive, rather than remove it from the collection.

I tried hooking up KeyDown but it never fires for the delete key, the default functionality of removing the row happens.
I tired hooking up KeyDown with CanUserDeleteRows set to false and the key down never fires for the delete key.
I can use other keys such as backspace etc. but our users want to use delete.

The only thing that seemed to work was to handle the Deleting event and do what I want and set e.Cancel to true. The problem with this event is I can't selectivly remove from the collection ie. if my record is new/unsaved and they hit delete i want it removed but if it's a saved record that they delete i want it marked on screen as inactive. The cancel seems to be an all or nothing. 

What's the best way to do the functionality that i need?
Milan
Telerik team
 answered on 24 Feb 2010
6 answers
276 views
I downloaded RAD Controls for WPF set and didn't manage to find in Demos an example of master-detail representation of a GridView. For example, for OrderHeader - OrderLines view implementation. How is it possible to set detail part of a view as CardView with the possibility of editing database records?
Milan
Telerik team
 answered on 24 Feb 2010
4 answers
390 views
Hi,

I use the RadGridView and I want to have 2 GridViewComboBoxColumn in there. But there are a lot of problem:
1. The Comboboxes should always be visible, but they are only visible if the user double-clicks in the cell. Therefore, I tried to put a normal Combobox in the DataTemplate of the Cell-Template but then
2. Databinding is not working any more. And
3. Databinding with Enums is not working at all. If I bind my enum to the normal GridViewComboBoxColumn the data is showing up wenn the user double clicks, but then it is not possible to select any other cell in the grid and everything stood still.
4. How can I preselect the current dataitem value in the combobox? The initial value of all comboboxes is always empty ....
Please help!

That's my code:
XAML:
<telerik:RadGridView x:Name="grid" Grid.Column="2" Grid.RowSpan="15" AutoGenerateColumns="False" ItemsSource="{Binding}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Plate Id" DataMemberBinding="{Binding Name}">            
                <telerik:GridViewComboBoxColumn Header="Dilution Factor" DataMemberBinding="{Binding DilutionFactorId, Mode = TwoWay}" ItemsSource="{Binding}" DisplayMemberPath="Name" SelectedValueMemberPath="Id" UniqueName="colDilFactor">
                    <!--<telerik:GridViewComboBoxColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <ComboBox x:Name="internalCboFactor" ItemsSource="{Binding}" SelectedValue="{Binding DilutionFactorId}"></ComboBox>                               
                            </StackPanel>
                        </DataTemplate>
                    </telerik:GridViewComboBoxColumn.CellTemplate>-->
                </telerik:GridViewComboBoxColumn>
                <telerik:GridViewComboBoxColumn Header="State" DataMemberBinding="{Binding State}" ItemsSource="{Binding}" UniqueName="colState">
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

C#
((GridViewComboBoxColumn)grid.Columns["colState"]).ItemsSource = Enum.GetNames(typeof(PlateStateEnum));
 ((GridViewComboBoxColumn)grid.Columns["colDilFactor"]).ItemsSource =                     _handler.GetProvider().LoadDilutionFactors(typeId);

                //ComboBox cboFactor = grid.Columns["colDilFactor"].FindName("internalCboFactor") as ComboBox;
                //if(cboFactor != null)
                //    cboFactor.ItemsSource = _handler.GetProvider().LoadDilutionFactors(typeId);

            }

Thx in advance!
Tony Mocella
Top achievements
Rank 1
 answered on 24 Feb 2010
4 answers
210 views
We are proud to announce the availability of Q1 2010 Beta release that will give you a preview of what you can expect with the official Q1 release expected in March.

The Q1 2010 Beta release adds 3 interactive controls to the suite – RadMap, RadBook and RadTransition.  Just like in the Silverlight suite, the 6 out-of-the box themes get a major facelift, and the performance of the suite is optimized through streamlining the templates and reducing assembly size. The Grid, Map, Chart and Scheduler controls implement serious new features. 


Check ONLINE DEMOS 

The downloads are now available in your account (or free trials): both full installation (MSI) or manual installation (ZIP)







Full details (release notes) can be found at: http://www.telerik.com/community/labs/radcontrols-for-wpf-q1-2010.aspx

For any questions, suggestions, etc, please use this forum thread. We will try to handle all your inquiries in a timely manner. You can also use the dedicated forums for the new controls - Book, Map and TransitionControl.
Boyan
Telerik team
 answered on 24 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?