Telerik Forums
UI for WPF Forum
1 answer
175 views
CheckBox in my GridView looks like a disabled checkbox. only in edit mode, he looks good. How can I the "good" style set?
Vlad
Telerik team
 answered on 02 Sep 2009
8 answers
163 views
We are using the Radtreeview to show some virtual folders. We have a require ment to drop files inside the treeview.

ie, the end user can drag and drop the items from the windows explorer to the RadTreeView. But the treeview items does not automatically expands when the user drags the file over the treeview item. 

We just like to do the same of windows explorer treeview drag drop functionality. The windows explorer (win forms) treeview automatically expands while drag over an item .

How to achive that in RadTreeview?





Miroslav
Telerik team
 answered on 02 Sep 2009
2 answers
116 views
Hello
I want to have three levels of hierarchy
this is my xaml

<telerik:RadGridView  Name="gvAccount" Width="auto" ColumnsWidthMode="Fill" 
                              AutoGenerateColumns="False" FlowDirection="RightToLeft" ShowGroupPanel="False" IsFilteringAllowed="False" CanUserResizeColumns="False">  
                            <telerik:RadGridView.Columns> 
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="BudgetTypeName" Header="סוג תקציב"  Width="90"/>  
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="Number" Header="מספר חשבון" Width="90" /> 
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="Name" Header="שם חשבון"  Width="90"/>  
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="ActivityBudget" Header="הקצבה כוללת &#13;אש''ח"  Width="90"/>  
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="TotalBudget" Header="יתרה&#13;לתקצוב" Width="90" /> 
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="PlanBudget" Header="שריון&#13;לפעילות" Width="90"/>  
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="SumActualBudget" Header="התחיבות&#13;לפעילות" Width="90" /> 
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="a" Header="שולם&#13;בפועל"  Width="90"/>  
                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="BudgetAllocation" Header="יתרה&#13;לתשלום" Width="90"/>  
                            <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding Path=ActivityTypeName}"      
                                    DisplayMemberPath="Name" SelectedValueMemberPath="Name" Header="סוג&#13;פעילות" UniqueName="ActivityTypeName" Width="90*"/>  
                        </telerik:RadGridView.Columns> 
                        <telerik:RadGridView.HierarchyChildTemplate> 
                            <DataTemplate> 
                                <StackPanel DataContext="{x:Null}">  
                                    <telerik:RadGridView CanUserReorderColumns="False" Name="gvBudget" ColumnsWidthMode="Fill" 
                                             CanUserFreezeColumns="False" ShowGroupPanel="False" AutoGenerateColumns="False" ItemsSource="{Binding}" 
                                             Loaded="OnChildGridLoaded" FlowDirection="RightToLeft" IsFilteringAllowed="False" ShowColumnHeaders="False" ColumnBackground="AliceBlue" HorizontalContentAlignment="Right" ClipToBounds="True">  
                                        <telerik:RadGridView.Columns> 
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="BudgetTypeName" Header="סוג תקציב"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="Number" Header="מספר חשבון"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="Name" Header="שם חשבון"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="ActivityBudget" Header="הקצבה כוללת &#13;אש''ח"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="TotalBudget" Header="יתרה&#13;לתקצוב"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="PlanBudget" Header="שריון&#13;לפעילות" Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="SumActualBudget" Header="התחיבות&#13;לפעילות"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="a" Header="שולם&#13;בפועל"  Width="90"/>  
                                                <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="BudgetAllocation" Header="יתרה&#13;לתשלום" Width="90"/>  
                                                <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding Path=ActivityTypeName}"      
                                                    DisplayMemberPath="Name" SelectedValueMemberPath="Name" Header="סוג&#13;פעילות" UniqueName="ActivityTypeName"  Width="90*"/>  
                                        </telerik:RadGridView.Columns> 
                                        <telerik:RadGridView.HierarchyChildTemplate> 
                                            <DataTemplate> 
                                                <StackPanel DataContext="{x:Null}">  
                                                    <telerik:RadGridView CanUserReorderColumns="False" Name="gvSubBudget" ColumnsWidthMode="Fill" 
                                             CanUserFreezeColumns="False" ShowGroupPanel="False" AutoGenerateColumns="False" ItemsSource="{Binding}" 
                                             Loaded="OnSubChildGridLoaded" FlowDirection="RightToLeft" IsFilteringAllowed="False" ShowColumnHeaders="False" ColumnBackground="AliceBlue" HorizontalContentAlignment="Right" ClipToBounds="True">  
                                                        <telerik:RadGridView.Columns> 
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="BudgetTypeName" Header="סוג תקציב"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="Number" Header="מספר חשבון"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="Name" Header="שם חשבון"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="ActivityBudget" Header="הקצבה כוללת &#13;אש''ח"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="TotalBudget" Header="יתרה&#13;לתקצוב"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="PlanBudget" Header="שריון&#13;לפעילות" Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="SumActualBudget" Header="התחיבות&#13;לפעילות"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="a" Header="שולם&#13;בפועל"  Width="90"/>  
                                                            <telerik:GridViewDataColumn IsReadOnly="True" UniqueName="BudgetAllocation" Header="יתרה&#13;לתשלום" Width="90"/>  
                                                            <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding Path=ActivityTypeName}"      
                                                    DisplayMemberPath="Name" SelectedValueMemberPath="Name" Header="סוג&#13;פעילות" UniqueName="ActivityTypeName"  Width="90*"/>  
                                                        </telerik:RadGridView.Columns> 
                                                    </telerik:RadGridView> 
                                                </StackPanel> 
                                            </DataTemplate> 
                                        </telerik:RadGridView.HierarchyChildTemplate> 
                                    </telerik:RadGridView> 
                                </StackPanel> 
                            </DataTemplate> 
                        </telerik:RadGridView.HierarchyChildTemplate>                       
                    </telerik:RadGridView> 

and this is my code

 private void BindDataMainGrid()  
        {  
            try  
            {  
                ((GridViewComboBoxColumn)this.gvAccount.Columns["ActivityTypeName"]).ItemsSource = ComboBoxValues.GetComboValues(CommonValues.GetActivityType());  
 
 
                DataSet dataSet = this.GetData();  
 
                // This is needed to make the grid use the HierarchyChildTemplate  
                GridViewTableDefinition detailDefinition = new GridViewTableDefinition();  
 
                // Tell the detailsDefinition to pull its data from the Details DataTable.  
                detailDefinition.DataSource = dataSet.Tables["Budget"].DefaultView;  
 
                // Specify the relation between the two tables, similar to what is done in the DataSet.  
                TableRelation tr = new TableRelation();  
                tr.FieldNames.Add(new FieldDescriptorNamePair("ID", "ParentID"));  
                detailDefinition.Relation = tr;  
 
                // Add a GridViewTableDefinition to the grid to make it use the HierarchyChildTemplate  
                // defined in XAML.  
                if (this.gvAccount.TableDefinition.ChildTableDefinitions.Count < 1)  
                    this.gvAccount.TableDefinition.ChildTableDefinitions.Add(detailDefinition);  
 
                // Bind the grid to the "master" table.  
                this.gvAccount.ItemsSource = dataSet.Tables["Account"].DefaultView;  

 private DataSet GetData()  
        {  
            try  
            {  
                dsBudget dsac = ServiceData.GetBudgetsByAccount(1);  
                if (dsac != null)  
                {  
                    DataSet ds = new DataSet();  
                    //DataTable dt = dsac.Tables["Budget"];  
                    DataView dv = new DataView(dsac.Tables["Budget"], "Type=1", "", DataViewRowState.CurrentRows);  
                    ds.Tables.Add((DataTable)dv.ToTable("Account"));  
                    dv = new DataView(dsac.Tables["Budget"], "Type=2", "", DataViewRowState.CurrentRows);  
                    ds.Tables.Add((DataTable)dv.ToTable("Budget"));  
                    dv = new DataView(dsac.Tables["Budget"], "Type=3", "", DataViewRowState.CurrentRows);  
                    ds.Tables.Add((DataTable)dv.ToTable("SubBudget"));  
 
                    ds.Relations.Add("BudgetRelation",  
                    ds.Tables["Account"].Columns["ID"],  
                    ds.Tables["Budget"].Columns["ParentID"]);  
 
                    ds.Relations.Add("SubBudgetRelation",  
                    ds.Tables["Budget"].Columns["ID"],  
                    ds.Tables["SubBudget"].Columns["ParentID"]);  
 
                    return ds;  
                }  
            }  
            catch   
            {   
                  
            }  
            return null;  
        }  
    } 

My question is
what code do I have to add
in order to see the second child level

Thanks
Orit
Top achievements
Rank 1
 answered on 02 Sep 2009
17 answers
807 views

Hello,

My application looks like your example "firstlook".
I want to be able to hide expand/Collapse image if there are no child records. I saw the example N° 101300_HideExpandButton.
Today , is there an easier way to hide expand/Collapse ? (because this post dates september 18th, 2008)

Thanks.

Steph

Vlad
Telerik team
 answered on 01 Sep 2009
1 answer
75 views
Hi ,

I am wondering that how can I set the horizontal scroll bar  scrolled to the right by defalt ?

Many thanks
Tobi
Stefan Dobrev
Telerik team
 answered on 31 Aug 2009
1 answer
301 views
Hi,

I have WPF 2009 SP2 (2009.2.701.35). I am attempting to control the expander (+ - ) on the grid. I use the following event

PreviewDataRecordCreate for the intialization of the grid to control the expander which works well. However i would like to validate the expander when the user selects the row (selectinchanged event)
I have tried to cast to the ExpandableDataRecord but this is always null. I would like validate that the expander is valid i.e. i do have data for the child grid. I am currently calling a rebind of the grid view but this does not help. I dont want to remove the row and re-add it as that seems to be a hack.

Secondly is there an event when the user clicks on the expander (+-) as this does cause a selectionchanged event?

The last question is that there is allot of classes marked as deprecated such as ExpandableDataRecord is there mechanism to look at which classes we should use instead as the forum posts would refer to the old classes?

Kind Regards,

Clinton

Rossen Hristov
Telerik team
 answered on 31 Aug 2009
1 answer
59 views
I mean, suppose you have a line graph with 20 value but i don't want 4th and 8th values so that my line is broken because 4th and 8th values are invalid.
It is possible?
Giuseppe
Telerik team
 answered on 31 Aug 2009
2 answers
284 views
I am trying to bind a collection of workspaces to the RadTabControl and use a DataTemplateSelector to choose the DataTemplate for the content based on which type of workspace is being rendered but the RadTabItem does not appear to use the DataTemplateSelector that I set. Here is an example of my code:

        <telerik:RadTabControl ItemsSource="{Binding Workspaces}"
            <telerik:RadTabControl.Resources> 
                <Style TargetType="{x:Type telerik:RadTabItem}"
                    <Setter Property="ContentTemplateSelector"
                        <Setter.Value> 
                            <local:TabItemContentTemplateSelector /> 
                        </Setter.Value> 
                    </Setter> 
                </Style> 
            </telerik:RadTabControl.Resources> 
        </telerik:RadTabControl> 

I put a breakpoint in the SelectTemplate method but it never reaches it.

Has anyone got this to work?
Miroslav
Telerik team
 answered on 29 Aug 2009
4 answers
258 views
Hello

I am using the wpf tab control and want the tabs to be on the left hand side with my content on the right hand side.  I was looking into the documentation at (http://www.telerik.com/help/wpf/radtabcontrol-appearance.html) and saw that you can set the property "TabStripPlacement" to left.  When I do this, the tab goes across the screen with my content below the tab.

I also look at the following page for silverlight (http://demos.telerik.com/Silverlight/#TabControl/TabStripOrientation) and your getting the same effect by setting the same property.

Example of what I want:
[tab1]   content display for selected tab
[tab2]
[tab3]
...

Here is what I am getting:
[tab1]
[tab2]
[tab3]
Content below tabs

Where am I going wrong?

Thanks
Miroslav
Telerik team
 answered on 28 Aug 2009
2 answers
211 views
I just started using Telerik Grid instead of MS based Grid.
I just tried to Add and clear columns dynamically into the grid but I couldn't find the appropirate functions in intellisense.
I tried "this.radResult.Columns.Add(dyncol)" but, I Couldn't find "Add" in intellisense, couldn't find "Clear" method in intellisense as either.

<UserControl    x:Class="SolutionQ.Eclipse.Silverlight.Content.Search.xxxx.xxxx.xxxxxxxx" 
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
                xmlns:dg="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
                xmlns:RadNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
                xmlns:controls="clr-namespace:SolutionQ.Eclipse.Silverlight.Content.Controls"            
                xmlns:RadGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
                xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"   
> 
    <Grid x:Name="LayoutRoot" Background="White">  
        <Grid.RowDefinitions> 
            <!--xmlns:Ra=""--> 
            <RowDefinition Height="Auto" /> 
            <RowDefinition Height="1*" /> 
        </Grid.RowDefinitions> 
 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="1*" /> 
        </Grid.ColumnDefinitions> 
 
        <!-- Filtering ToolBar --> 
        <RadNav:RadToolBarTray Grid.Row="0" Grid.Column="0" Style="{StaticResource style_DataGridRadToolBarTray}">  
            <RadNav:RadToolBar x:Name="rtb_Filter" Style="{StaticResource style_RadToolBar}">  
                <!-- New Clause Button --> 
                <Button x:Name="btn_ExportToExcel" Tag="btn_ExportToExcel" Click="btn_Menu_Click" ToolTipService.ToolTip="Export to Excel Format">  
                    <controls:IconAndLabelControl Icon="Icons/PlaceHolderIcon.xaml" Label="Export To Excel" /> 
                </Button> 
                <Button x:Name="btn_ViewResults" Tag="btn_ViewResults" Click="btn_Menu_Click" ToolTipService.ToolTip="View Results">  
                    <controls:IconAndLabelControl Icon="Icons/PlaceHolderIcon.xaml" Label="View Results" /> 
                </Button> 
            </RadNav:RadToolBar> 
        </RadNav:RadToolBarTray> 
          
        <!--<dg:DataGrid x:Name="Result" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" ItemsSource="{Binding Path=Items, Mode=TwoWay}" Style="{StaticResource style_GenericDataGrid}" CellStyle="{StaticResource style_GenericDataGridCell}" ColumnHeaderStyle="{StaticResource style_GenericDataGridColumnHeader_LeftAligned}" RowHeaderStyle="{StaticResource style_GenericDataGridRowHeader}" RowStyle="{StaticResource style_GenericDataGridRow}">  
        </dg:DataGrid>--> 
        <RadGrid:RadGridView x:Name="radResult" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" > 
        <!--ItemsSource="{Binding Path=Items, Mode=TwoWay}"--> 
        </RadGrid:RadGridView> 
    </Grid> 
 
</UserControl> 
 

 

 

 

 

 

At code behind side I am using following namespaces:

 

 

 

 

 

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Net;  
using System.Windows;  
using System.Windows.Controls;  
using System.Windows.Documents;  
using System.Windows.Input;  
using System.Windows.Media;  
using System.Windows.Media.Animation;  
using System.Windows.Shapes;  
 
// Telerik using     
using Telerik.Windows;  
using Telerik.Windows.Data;  
using Telerik.Windows.Controls;  
using Telerik.Windows.Controls.GridView;  
using Telerik.Windows.Controls.GridView.Cells;  
 
// add using     
using System.Collections.ObjectModel;  
using System.Windows.Browser;  
using System.ComponentModel;  
using System.Collections;  
using System.Windows.Controls.Primitives;   

 

 

 

 

void tabPreview_Loaded(object sender, RoutedEventArgs e)   
{  
    BuildColumns();   
}   
 
private void BuildColumns()   
{  
   this.radResult.Columns.Clear(); //<-- This method doesnt show in intellisense, neither Add method will show up here   
}  
 

Am I doing anything wrong here?

 

om
Top achievements
Rank 1
 answered on 28 Aug 2009
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?