Telerik Forums
UI for WPF Forum
1 answer
133 views
Hello, I organiza my windows like tabItems in tab controls. when i click on menu item:

        private void PaieskaTab_Click(object sender, Telerik.Windows.RadRoutedEventArgs e) 
        { 
            RadTabItem tabItem = new RadTabItem(); 
            ListTemplate lst = new ListTemplate(); 
            lst.tabWindow = tabItem
            tabItem.Content = lst
            tabItem.Header = "Paieskos langas"
            tabItem.Name = "tabPaieskosTestas"
            tabControlR.Items.Add(tabItem); 
        } 
ListTemplate is a user control. In List template is a button "Close". Now when i click this button, i need that this tab,whitch contains this user control, would close. I try code from other forum in telerik:
            var tabItem = tabWindow as RadTabItem; 
 
            var parentItemsControl = Telerik.Windows.Controls.ItemsControl.ItemsControlFromItemContainer(tabItem); 
 
            parentItemsControl.Items.Remove(tabItem);  
But his code shows error:
Error 23 The type or namespace name 'ItemsControl' does not exist in the namespace 'Telerik.Windows.Controls' (are you missing an assembly reference?) D:\!_Projects\Teleric_EmptyProject WPF\XSoftArt.WPFengine\XSoftArt.WPFengine\BaseClasses\ListTemplate.xaml.cs 1102 63 XSoftArt.WPFengine
Its this becouse that code is for Silverlight..?How i must change it to get working..?
Valentin.Stoychev
Telerik team
 answered on 22 Dec 2009
1 answer
102 views
Hello

I use a hierarchy grid
not all the rows have children
in my case
the first rows dont have children
so there is now column for the expand button
when i scroll down and I see the rows taht have children
the expand column appear
but whn I scroll back' to the rows that dont have children
the columns move
I attached 3 print screens
Thanks
Missing User
 answered on 22 Dec 2009
1 answer
60 views
I am working on a project where I need a different control type (date picker, combo box, textbox) for each cell on the same column.

Example:

Attributes Value
Name Textbox
DOB Date Picker
Origin Combo Box (List of Countries)

If it is possible, any sample code would be appreciated.

Thanks.

Vlad
Telerik team
 answered on 22 Dec 2009
3 answers
96 views
When I do this: RadGridView.ItemsSource = null;
A first chance exception of type 'System.ArgumentException' occurred.What can I do?
Message:
    "Invalid property or field - 'tip' for type: Object"
StackTrace:
   at Telerik.Windows.Data.Expressions.MemberAccessTokenExtensions.CreateMemberAccessExpression(IMemberAccessToken token, Expression instance)
   at Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName)
   at Telerik.Windows.Data.Expressions.ExpressionFactory.MakeMemberAccess(Expression instance, String memberName, Boolean liftMemberAccessToNull)
   at Telerik.Windows.Data.Expressions.PropertyAccessExpressionBuilder.CreateMemberAccessExpression()
   at Telerik.Windows.Data.Expressions.MemberAccessExpressionBuilderBase.CreateLambdaExpression()
   at Telerik.Windows.Data.SortDescriptorCollectionExpressionBuilder.Sort()
   at Telerik.Windows.Data.SortDescriptorCollection.Sort(IQueryable queryable)
   at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, SortDescriptorCollection sortDescriptors)
   at Telerik.Windows.Data.QueryableCollectionView.CreateView()
   at Telerik.Windows.Data.QueryableCollectionView.get_QueryableView()
   at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.EnsureInternalList()
Vlad
Telerik team
 answered on 22 Dec 2009
1 answer
420 views
Hello,

I need a context menu on my radgrid view, but i need it to operate on the current data context of the cell (I.e. each operation on the context menu will be on the current context of the cell (or row).

I used this code:
            <telerik:RadGridView.Resources>
                <ContextMenu x:Key="MyContextMenu" Opened="ContextMenu_Opened_1">
                    <MenuItem Header="Update Order" Click="Update_Click"/>
                    <MenuItem Header="Cancel Order" Click="Cancel_Click"/>
                </ContextMenu>
            </telerik:RadGridView.Resources>

But i didn't know how to implement Update_Click to operate on the appropriate DataContext

Thanks,
Ofer
Vlad
Telerik team
 answered on 22 Dec 2009
4 answers
312 views

Hi Guys,

When I drag the nodes in the treeview, it displays "Infinity is not a valid value for the property Width". What caused this error?

Thanks,

Lauren Nickerson
Top achievements
Rank 1
 answered on 21 Dec 2009
3 answers
107 views
I am trying to achieve a very simple 2 pane docking layout. I want both panes to fill the space available with a splitter between them. If I hide one pane I want the other to fill the remaining space. Here is my markup:

    <Grid> 
         
        <telerik:RadDocking Name="radDocking1" > 
             
            <telerik:RadSplitContainer Name="LeftContainer" InitialPosition="DockedLeft" > 
                 
                <telerik:RadPaneGroup> 
                    <telerik:RadPane Header="Task List"
                    </telerik:RadPane> 
                </telerik:RadPaneGroup> 
                 
            </telerik:RadSplitContainer> 
 
            <telerik:RadSplitContainer Name="RightContainer" InitialPosition="DockedRight"
 
                <telerik:RadPaneGroup> 
                    <telerik:RadPane Header="Map"
                    </telerik:RadPane> 
                </telerik:RadPaneGroup> 
            </telerik:RadSplitContainer> 
 
        </telerik:RadDocking> 
    </Grid> 
 


What seems to be blocking this is the DocumentHost. Even when I remove the document host by following the posted instructions - using blend to grab the style sheet and setting visibility to collapsed I still can't get my 2 panes to fill the space.

Any ideas anyone?

Cheers

Steve
Steve Chadbourne
Top achievements
Rank 1
 answered on 21 Dec 2009
2 answers
122 views
Hi, I have a problem, when I select a row of my RadGriView Q3 and this hase a ScrollBar, If I do Double Click in the arrow of the scrollbar, this executes the event "MousDoubleClik" of my RadGrid, I need to block this event in the scroll bar, help me


Regards!!
Felipe
Top achievements
Rank 1
 answered on 21 Dec 2009
18 answers
1.0K+ views
I managed to make RadGridView show multiple related tables (LINQ to SQL) by approach used in FirstLook sample (create GridViewTableDefinition and TableRelation). If I add two table definitions it works OK (besides showing empty table if no related record exists).
I'd like to know if there exists a way, to show each of related tables in separate tab of RadTabControl. If I define HierarchyChildTemplate/DataTemplate with RadTabControl where each tab containins GridViewDataControl, I get two tab-controls instead of one, first one showing first relation on all tabs and second tab-control showing second related table on all tabs. Is there a Way to show child-table per tab-item (or expander or something alike)?

Thanks.
Branko
Nedyalko Nikolov
Telerik team
 answered on 21 Dec 2009
1 answer
77 views
Hi,

I'm new in using your nice controls. Great job guys!

Now to my problem:
My application needs the functionality to drag & drop tree nodes between two treeviews which are placed in separate grid columns.
Drag and Drop does not work. If I try to drag an item, the mouse cursor does not change and I have no idea why.

The definition of the first treeview is:
<telerik:RadTreeView IsOptionElementsEnabled="True"
                                   ItemsOptionListType="CheckList"
                                   IsLineEnabled="True"
                                   IsTriStateMode="True"
                                   LoadOnDemand="oTreeViewSource_LoadOnDemand"
                                   ItemPrepared="oTreeViewSource_ItemPrepared"
                                   IsDragDropEnabled="True"
                                   IsDragTooltipEnabled="False"
                                   AllowDrop="True"
                                   Margin="6"
                                   SelectionMode="Multiple"
                                   Name="oTreeViewSource" />

and the definition of the second is:
<telerik:RadTreeView IsDragDropEnabled="True"
                                   AllowDrop="True"
                                   Name="oTreeViewTarget"
                                   Margin="6"></telerik:RadTreeView>

The items in the first treeview were added like this:
            RadTreeViewItem oTreeViewTargetItem = new RadTreeViewItem();
            oTreeViewTargetItem.Header = "New item";
            nIndex = oTreeViewSource.Items.Add(oTreeViewTargetItem);

Does anyone has an idea what is wrong?

Thanks
Dieter
Miroslav
Telerik team
 answered on 21 Dec 2009
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?