Telerik Forums
UI for WPF Forum
5 answers
227 views

Hello,
I would like to implement a context menu for all my application treeviews that allow users to ExpandAll, CollapseAll and Find text into nodes.
 For example, manage a style in the ressource dictionnary that looks like this :

<Style x:Key="StyleTreeViewWithContextMenu" TargetType="{x:Type telerik:RadTreeView}">
   <Setter Property="ContextMenu">
       <Setter.Value>
           <telerik:RadContextMenu>
               <telerik:RadMenuItem Header="Déployer tout"   />
               <telerik:RadMenuItem Header="Replier tout" />
               <telerik:RadMenuItem Header="Trouver" />
           </telerik:RadContextMenu>
      </Setter.Value>
   </Setter>
</Style>

How can I implement the actions of menuItems in order to apply this style on my treeviews?

Could you put me on track ?

Thanks in advance.
Olivier.

Petar Mladenov
Telerik team
 answered on 06 Dec 2011
8 answers
141 views
Hi,

I've got a simple RadGridView showing an ObservableCollection<> which is bound at run-time as the user can select which type to load. On the same grid I let my users dynamically create expression columns. All works fine and as expected excepting for the Export() function which doesn't seem to include any columns of type GridViewExpressionColumn.

This is how I create the columns at run-time:
var column = new GridViewExpressionColumn();
column.Expression = **some LINQ expression here**
column.UniqueName = field.Name;
var btnExpressionColumn = new RadButton();
column.Header = btnExpressionColumn;
 
btnExpressionColumn.Content = field.Name;
btnExpressionColumn.Click += new RoutedEventHandler(btnExpressionColumn_Click);
 
gridView.Columns.Add(column);

And this is how I export the grid:
using (Stream stream = dialog.OpenFile())
{
    gridView.Export(stream,
     new GridViewCsvExportOptions()
     {
         Format = ExportFormat.Csv,
         ShowColumnHeaders = true,
         ShowColumnFooters = true,
         ShowGroupFooters = false,
     });
}

Please advise on how to solve this problem.

Thanks
Marcelo
Top achievements
Rank 1
 answered on 06 Dec 2011
1 answer
140 views
Hi

I want to have a textbox property in the property grid that supports multiple lines. I have overridden the EditorTemplate as follows:

<telerik:PropertyDefinition Binding="{Binding Description}" DisplayName="Description">
    <telerik:PropertyDefinition.EditorTemplate>
        <DataTemplate>
            <TextBox Text="{Binding Description, Mode=TwoWay}" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="true" />
        </DataTemplate>
    </telerik:PropertyDefinition.EditorTemplate>
</telerik:PropertyDefinition>

When I run the code the long text does not wrap as expected.
Ivan Ivanov
Telerik team
 answered on 06 Dec 2011
3 answers
117 views
Hi,

I have a chart with multiple series on it, representing time (x) vs speed (y) The 1st is supposed to span the entire length of the 'shift' and be drawn at 100 (%). The other series (there maybe many) will have points in between the 1st series' start and end time. However, when I do the data binding I get some strange visual results. The time line goes from e.g. 15:00:00 to 15:09:00 to 15:00:01, 15:00:02, etc.
It looks like the chart does not take into account that it's actually the same timespan for both series. I can supply the sample application if required. Any help would be appreciated.

Thanks!
Geoffrey
Top achievements
Rank 1
 answered on 06 Dec 2011
5 answers
126 views
Hi there.
Just started evaluating the product but am unable to quickly figure out how to make a chart dockable.  Can someone direct me to the correct implementation please.

Maurice
Konstantina
Telerik team
 answered on 06 Dec 2011
3 answers
126 views
I'm a bit confused on what my options would be for accomplishing the following:



Basically, I need 2 piecharts with 1 legend, and the additional data fields associated with the legend items you see in the pic.  The 2 charts and legend must all have the same colors for the data/series items.

I've read previous posts about specifying colors for the chart legend and series mappings by creating palettes and doing codebehind to assign colors to both series items and legend items manually.  However, I'm not sure if either of these fit with what I'm tasked to do.
 I'm not sure if I can add additional data in the legend (i've seen that there is a legend controltemplate but not a datatemplate) via templating or adding a gridview control to it. If i can't inject additional data into the legend, is there a way i can bind to the pie item colors?

Any advice would be appreciated.  Thanks.
Nikolay
Telerik team
 answered on 06 Dec 2011
1 answer
191 views
Hello,

I have another UriImageProvider question. I have a series of images that my user can select from (via a drop down). When they select the image they want, I need my RadMap's UriImageProvider to grab the currently selected image information and display the image. Preferably, I would use the Byte Array that I have in memory to build the image on the fly and pass it to the provider. Worse case, I can write it to disk but I would rather avoid this. I can't seem to see a way to do this with Uri="{Binding...}". Any examples out there on how to dynamically change the Uri of the UriImageProvider?


Cheers,
Seth
Andrey
Telerik team
 answered on 06 Dec 2011
3 answers
201 views
Good afternoon.

I have some XAML that worked fine with release 2011.1.502.35, but I want to upgrade to the latest version (2011.3.11.16.0).

Unfortunately, I have a number of GridViews with GridViewDataColumn fields bound to nullable DateTime fields like this -

 

  <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Precedence}" Header="Precedence" IsReadOnly="True" />
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description" />
            <telerik:GridViewDataColumn DataMemberBinding="{Binding OffenceFromDate}" Header="From Date"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding OffenceToDate}" Header="To Date"/>
            <telerik:GridViewComboBoxColumn ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Page}, Path=DataContext.Queues}"
                                    SelectedValueMemberPath="OID"
                                    DataMemberBinding="{Binding AllocationQueue}"
                                    DisplayMemberPath="Name"
                                    Header="Assign To Queue"
                                    IsComboBoxEditable="True" />
  </telerik:RadGridView.Columns>           
</telerik:RadGridView>

When I load up a grid containing a row that contains a null value in either OffenceFromDate or OffenceToDate, I'm now getting the following exception -

Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(System.Windows.Size)

System.NullReferenceException occurred
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Data
  StackTrace:
       at Telerik.Windows.Data.Expressions.UnboxT`1.NullableField[TElem](Object value) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Expressions\MemberAccess\Unbox.cs:line 39
  InnerException:

Is there any way around this? As I mentioned earlier, the older release was fine with these records.

Thanks for your time.

Paul
Paul
Top achievements
Rank 1
 answered on 06 Dec 2011
1 answer
175 views
When the ItemsSource (ObservableCollection) is empty (Count = 0) calling BeginInsert does cause the AddingNewDataItem event to fire.  This works fine when ItemsSource has at least 1 item.
Maya
Telerik team
 answered on 06 Dec 2011
1 answer
102 views
Is there a way in XAML to bind a property of a filterdescriptor for when it's active or not.  I'd like to define a filterdescriptor in XAML and bind whether or not it's active (i.e. applied to the gridview) to a MVVM property.
Vlad
Telerik team
 answered on 06 Dec 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
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?