Telerik Forums
UI for WPF Forum
4 answers
149 views
I want to use FilteringControl(which appears on radgridview/radtreelistview coloumn filters) independently in my user control. Is it possible to use it independently, if yes can some one guide me with some examples...
Vamshi
Top achievements
Rank 1
 answered on 21 Jun 2013
3 answers
259 views
I just upgraded from the Q1 2013 WPF controls to Q2. I had already converted my app to the new DragDropManager and it was working. After upgrading however my drop handler was never called. My drop target is a RadTreeView, my source is a RadGridView (but I don't think that matters). In addition only certain nodes in my heterogeneous tree are drop targets. I register DragEnter/Leave and Drop handlers in the Loaded event for the data template of the valid tree nodes. Hence when a drag enters the valid node I update the visual cue, when it leaves I update it, and of course when you drop it handles the drop (or it did before Q2).  

After upgrading the drop handler was never called (although the DragEnter and Leave handlers worked fine). I tried all combinations of AllowDrop, IsDragDropEnabled, TreeViewSettings.DragDropExecutionMode = true, and everything else I could find. After MUCH experimentation I found that if I register a DragOver handler on the RadTreeView with exactly one line of code in it (e.Handled = true;) the Drop handler will get called. 

I am just curious if there is an easier way or if I missed something.

Regards
Dave Goughnour
Tina Stancheva
Telerik team
 answered on 21 Jun 2013
3 answers
124 views
Hello,
In my project I'm using a custom collection which derrives from ObservableCollection, ex. CustomGanttCollection : ObservableCollection<CustomGanttTask>
This gives me the possibility to add some extra methods...

The same way as I declared my CustomGanttCollection
, I declared my custom gantt task as: CustomGanttTask : GanttTask

Now I thought using my CustomCollection as the Collection where the ChildTask are stored in by overriding the Children property of GanttTask in my CustomGantTask like:

private <span style="font-size: 14px;">CustomGanttCollection _children</span><br>public <span style="font-size: 14px;">CustomGanttCollection Children<br></span>{<br><span class="Apple-tab-span" style="white-space:pre"> </span>get<br><span class="Apple-tab-span" style="white-space:pre"> </span>{<br><span class="Apple-tab-span" style="white-space:pre">       </span>return _children;<br><span class="Apple-tab-span" style="white-space:pre">   </span>}<br>}


Offcourse I do add some tasks in my ViewModel to the children...

Although this works (no compile errors, when I take a look at the Children property everything looks fine,...)  the GanttView Component won't show me the childtasks.

Is there a way that I can use my custom collection as the children's collection? The GanttView must be able to use the collection as it already uses one for the top-level tasks...
Kenny
Top achievements
Rank 1
 answered on 21 Jun 2013
10 answers
968 views
How do I set the ToolTip of a data cell to the content of the cell or at least to a string based content, if the cell has a string-based content?
This would be useful, if the cell width is to small to display the whole content.

I already have this style:

<Style x:Key="CellStyle1" TargetType="{x:Type tk:GridViewCell}">
                <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Content.Text}" />
            </Style>

(I have labels as content in all my cells).

This works in principle, but I always get lots of data errors in the debug window output, because there seem to be some automatically generated cells who don't have my Label in it.

"
System.Windows.Data Error: 40 : BindingExpression path error: 'Text' property not found on 'object' ''String' (HashCode=757206908)'. BindingExpression:Path=Content.Text; DataItem='GridViewCell' (Name=''); target element is 'GridViewCell' (Name=''); target property is 'ToolTip' (type 'Object')
"

Any way to get rid of these errors?

Is there a better way to set the ToolTip of data cells to the content of cells?

Thanks
ClausDC
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 21 Jun 2013
1 answer
93 views
Hi!

I can set different color for each label with CreateItemStyleDelegate, could I do the same for the color of point marks of a line series?

I would specify the color of each point mark with databinding as I bind the point to it's value.
Evgenia
Telerik team
 answered on 21 Jun 2013
1 answer
196 views
HI, 
I use in my application a gridview with four buttons to delete and add a row and to save or cancel the edit. The delete and add buttons work perfectly but not the save insert/edit button. I don't understand where is the problem in my code, if someone could help.
This is my xaml : 
<Grid Name="indicatorPage" Visibility="Hidden" Margin="0,194,0,-194">
               <Grid.RowDefinitions>
                   <RowDefinition Height="Auto" />
                   <RowDefinition />
               </Grid.RowDefinitions>
           <StackPanel Orientation="Horizontal"
                   HorizontalAlignment="Center"
                   Margin="0,5,0,0">
               <telerik:RadButton Width="150"
                              Content="Delete selected rows"
                              Margin="0,0,5,0"
                              Command="telerikGrid:RadGridViewCommands.Delete"
                              CommandTarget="{Binding ElementName=gvIndicatorConf}" />
               <telerik:RadButton Width="150"
                              Content="Add new row"
                              Margin="0,0,5,0"
                              Command="telerikGrid:RadGridViewCommands.BeginInsert"
                              CommandTarget="{Binding ElementName=gvIndicatorConf}" />
               <telerik:RadButton Width="150"
                              Content="Save insert/edit"
                              Margin="0,0,5,0"
                              Command="telerikGrid:RadGridViewCommands.CommitEdit"
                              CommandTarget="{Binding ElementName=gvIndicatorConf}" />
               <telerik:RadButton Width="150"
                              Content="Cancel insert/edit"
                              Command="telerikGrid:RadGridViewCommands.CancelRowEdit"
                              CommandTarget="{Binding ElementName=gvIndicatorConf}" />
           </StackPanel>
           <telerik:RadGridView x:Name="gvIndicatorConf" 
                                ItemsSource="{Binding IndicatorConf}"
                                AddingNewDataItem="radGridView_AddingNewDataItem"
                                Margin="0,5,0,0" Grid.Row="1" 
                                AutoGenerateColumns="False" telerik:StyleManager.Theme="Windows8"
                                MaxHeight="7000" MaxWidth="1000">
               <telerik:RadGridView.Columns>
                   <telerik:GridViewColumn Width="90">
                       <telerik:GridViewColumn.CellTemplate>
                           <DataTemplate>
                               <telerik:RadButton Content="Delete"
                                              Command="telerikGrid:RadGridViewCommands.Delete"
                                              CommandParameter="{Binding}" />
                           </DataTemplate>
                       </telerik:GridViewColumn.CellTemplate>
                   </telerik:GridViewColumn>
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Header="Code" UniqueName="Code" />
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding Descritpion}" Header="Descritpion" UniqueName="Descritpion" />
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding Connecter}" Header="Connecter" UniqueName="Connecter" IsReadOnly="True"/>
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding Period}" Header="Period" UniqueName="Period" />
               </telerik:RadGridView.Columns>
           </telerik:RadGridView>
       </Grid>

Thanks !
Yoan
Telerik team
 answered on 21 Jun 2013
1 answer
133 views
I have a problem where after applying the Filter, it opens up all the nodes. 

I am using FilterDescriptor.

We have a Huge Tree and we don't want the Tree and its children  to open after applying the Filter. Any idea how to stop it from opening after applying the Filter?

I am not able to attach the project, but will attach the screen shot. 

Here is code snippet. 

private void RadContextMenu_ItemClick(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            if ((e.OriginalSource as RadMenuItem).Header.Equals("Show Spain"))
            {
                FilterDescriptor descriptor = new FilterDescriptor();
                descriptor.Member = "Country";
                descriptor.Operator = FilterOperator.IsEqualTo;
                descriptor.Value = "Spain";
                this.RadTreeListView1.FilterDescriptors.Add(descriptor);
            }
 
            CompositeFilterDescriptor mainFilter = new CompositeFilterDescriptor();
 
            if ((e.OriginalSource as RadMenuItem).Header.Equals("Show England"))
            {
                FilterDescriptor descriptor = new FilterDescriptor();
                descriptor.Member = "Country";
                descriptor.Operator = FilterOperator.IsEqualTo;
                descriptor.Value = "England";
                mainFilter.FilterDescriptors.Add(descriptor);
                this.RadTreeListView1.FilterDescriptors.Add(mainFilter);
            }
            if ((e.OriginalSource as RadMenuItem).Header.Equals("Show England - France"))
            {
                mainFilter = new CompositeFilterDescriptor();
                mainFilter.LogicalOperator = FilterCompositionLogicalOperator.Or;
                FilterDescriptor descriptor = new FilterDescriptor();
                descriptor.Member = "Country";
                descriptor.Operator = FilterOperator.IsEqualTo;
                descriptor.Value = "England";
 
                mainFilter.FilterDescriptors.Add(descriptor);
                descriptor = new FilterDescriptor();
                descriptor.Member = "Country";
                descriptor.Operator = FilterOperator.IsEqualTo;
                descriptor.Value = "France";
 
                mainFilter.FilterDescriptors.Add(descriptor);
 
                this.RadTreeListView1.FilterDescriptors.Add(mainFilter);
            }
 
            if ((e.OriginalSource as RadMenuItem).Header.Equals("Clear Filter"))
            {
                this.RadTreeListView1.FilterDescriptors.RemoveAt(0);
            }
             
        }

Yoan
Telerik team
 answered on 21 Jun 2013
1 answer
123 views
Is ist possible to set DocumentSource with an non local source?
 Like e.g:

Me.pdfViewer.DocumentSource = New PdfDocumentSource(New Uri("http://195.243.234.82/download/6879-45_1_20130620_085341.pdf", UriKind.Absolute))

thx ...
Alexander
Telerik team
 answered on 21 Jun 2013
10 answers
196 views
Hello!

Since I updated to 2010 Q1 my CellEditTemplate stopped working. I get an System.InvalidCastException when leaving the textbox.

 <telerikGrid:RadGridView  x:Name="ARVolymGridView" AutoGenerateColumns="False" ShowGroupPanel="False" ItemsSource="{Binding ARVolymer, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" > 
            <telerikGrid:RadGridView.Columns> 
                <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Sortiment, UpdateSourceTrigger=PropertyChanged}" Header="Sortiment"/> 
                <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Volym, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Header="M3f" > 
                    <telerikGrid:GridViewDataColumn.CellEditTemplate> 
                        <DataTemplate> 
                            <TextBox Text="{Binding Volym, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/> 
                        </DataTemplate> 
                    </telerikGrid:GridViewDataColumn.CellEditTemplate> 
                </telerikGrid:GridViewDataColumn> 
            </telerikGrid:RadGridView.Columns> 
        </telerikGrid:RadGridView> 

My binding properties:

 
        public string Sortiment 
        { 
            get { return _arVolym.Sortiment; } 
            set 
            { 
                if (_arVolym.Sortiment != value) 
                { 
                    _arVolym.Sortiment = value
                    OnPropertyChanged("Sortiment"); 
                } 
            } 
        } 
 
 
        public int Volym 
        { 
            get { return _arVolym.Volym; } 
            set 
            { 
                if (_arVolym.Volym != value) 
                { 
                    _arVolym.Volym = value
                    OnPropertyChanged("Volym"); 
                } 
            } 
        } 

In my application I have an custom designed TextBox to prevent the user to enter invalid values, but the same exception appears for a regular Textbox.

This is extremly annoying that something stopped working when updating to a new and improved (?!) version.

//Anna


Maya
Telerik team
 answered on 21 Jun 2013
1 answer
107 views
I wonder if there is a way (other than feeding Log(x)) to render TreeMap charts to use logarithmic values?

I can feed the log(x) as the value but tooltips would not be equal even I'd convert the value using exp(x).
Nikolay
Telerik team
 answered on 21 Jun 2013
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?