Telerik Forums
UI for WPF Forum
5 answers
88 views
I'm setting the culture of datepicker and use the code below.
CultureInfo cultureInfo = new CultureInfo("en-US");  
DateTimeFormatInfo dateInfo = new DateTimeFormatInfo();  
dateInfo.ShortDatePattern = "MM/yyyy";  
cultureInfo.DateTimeFormat = dateInfo;  
radDatePicker1.Culture = cultureInfo; 

i've set the IsReadonly= true so that the user cannot input by manually inputing a date, the code above is working fine, but when you click the DatePicker textbox and then click another control error is occured, "Object not set to a reference of object" any idea?

Nikolay
Telerik team
 answered on 03 Feb 2011
1 answer
68 views
Hi,

I looked couple of example for drag and drop. But could not find one for Drag and Drop within RadGridView with user feedback.

Please provide the code specifically for this. I did implemented without user feedback but I need to implement one with user feedback.

Thanks
Sanket Singhvi
Maya
Telerik team
 answered on 03 Feb 2011
5 answers
242 views

Hi,
I am very biginer in Telerik controls. I am facing a problem related to properties binding ( automatic ) . i have a Gridview and inside grid view i have a checkbox , i need to implement functionality where i have to select checkbox on rowselection in xaml.

my code is following ...

 

<

ex:ExGridView Name="gvItemList" MultipleSelect="True" EnableColumnVirtualization="False" Grid.Column="0" Grid.ColumnSpan="5" Grid.Row="15"

 

 

AutoGenerateColumns="False" MaxHeight="200" IsReadOnly="True" RowLoaded="gvItemList_RowLoaded" >

 

 

<tcp:RadGridView.Columns>

 

 

 

 

 

<ex:ExGridViewDataColumn Width="20" IsResizable="False">

 

 

 

 

 

<tcp:GridViewDataColumn.CellStyle x:Uid="chkSelect">

 

 

 

 

 

<Style TargetType="tcp:GridViewCell">

 

 

 

 

 

<Setter Property="tcp:GridViewCell.Template">

 

 

 

 

 

<Setter.Value>

 

 

 

 

 

<ControlTemplate TargetType="tcp:GridViewCell">

 

 

 

 

 

<CheckBox CommandParameter="{Binding}"

 

 

HorizontalAlignment="Center" VerticalAlignment="Center"

 

 

IsChecked="{Binding Path=IsSelected, Mode=TwoWay,RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type tcp:GridViewDataColumn}}}" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/>

 

 

 

 

 

</ControlTemplate>

 

 

 

 

 

</Setter.Value>

 

 

 

 

 

</Setter>

 

 

 

 

 

</Style>

 

 

 

 

 

</tcp:GridViewDataColumn.CellStyle>

 

 

 

 

 

</ex:ExGridViewDataColumn>

 

 

 

 

 

<ex:ExGridViewDataColumn PhraseID="2464" UniqueName="ItemCode" DataMemberBinding="{Binding Path=ItemCode, Converter={StaticResource stringToDisplayStringConverter}}" ></ex:ExGridViewDataColumn>

 

 

 

 

 

<ex:ExGridViewDataColumn PhraseID="1218" UniqueName="ItemName" DataMemberBinding="{Binding Path=ItemName, Converter={StaticResource stringToDisplayStringConverter}}" Width="130"></ex:ExGridViewDataColumn>

 

 

 

 

 

<ex:ExGridViewDataColumn PhraseID="1607" UniqueName="DepartmentName" DataMemberBinding="{Binding Path=DepartmentName, Converter={StaticResource stringToDisplayStringConverter}}" ></ex:ExGridViewDataColumn>

 

 

 

 

 

<ex:ExGridViewDataColumn PhraseID="1002" UniqueName="CategoryName" DataMemberBinding="{Binding Path=CategoryName, Converter={StaticResource stringToDisplayStringConverter}}" ></ex:ExGridViewDataColumn>

 

 

 

 

 

 

 

 

</tcp:RadGridView.Columns>

 

 

 

 

 

</ex:ExGridView>

we have extendened radgrid in customizable form. still i don't have idea to bind checkbox's checked property to gridview's IsSelect property , i don't want to link object properties , but i need to bind both controls(checkbox and gridrow ) properties . Please have a look and give me some assistance .

Thanks In advance
Regards

Devendra Kumar

 

Vlad
Telerik team
 answered on 03 Feb 2011
1 answer
243 views
I just switched from .NET DataGrid to RadGridView, but the bindings don't work like in the DataGrid. In RadGridView, all rows are empty. I've looked everywhere, and I haven't found any examples of how to use XPATH in RadGridView. I'd appreciate if you could help me to troubleshoot the bindings below. Thank you.

<telerik:RadGridView Grid.Column="1"
                             Grid.Row="1"
                             AutoGenerateColumns="False"
                             DataContext="{Binding MyXMLDoc}"
                             ItemsSource="{Binding XPath=/Nodes/Node}"
                             RowIndicatorVisibility="Collapsed"
                             ShowGroupPanel="False"
                             GridLinesVisibility="Horizontal">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Width="200"
                                            DataMemberBinding="{Binding XPath=@Key}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Top" >
                                <Image Source="{Binding XPath=@Icon}" ToolTip="{Binding XPath=@Tooltip}" Style="{StaticResource ico16}" />
                                <TextBlock Text="{Binding XPath=@Key}" Foreground="Black" />
                            </StackPanel>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
Vlad
Telerik team
 answered on 03 Feb 2011
1 answer
75 views
I am having a hierarchical gridview, where I am having a gridview nested into another.

When am trying to insert a new item in the OUTER grid by pressing 'Insert', I do get a new item, but I am not able to insert nested gridview items into it. (Basically I was expecting to see an empty instance of the nested gridview appearing when I insert an item in the outer gridview. ) How can I get the nested gridview for the new items inserted in the outer gridview?



Angshuman
Top achievements
Rank 2
 answered on 03 Feb 2011
5 answers
806 views
Hi,
  We are using telerik treeview along with MVVM pattern in a WPF application. The view model exposes an observable collection to which nodes in the tree bound to. Also, viewmodel exposes the commands required to add delete and edit nodes in the tree.

I think, When i add/remove an item in the observable collection it should get reflected in the tree but my concern is, will it preserve the state of expanded tree node after its child nodes are modified?

Also i need to add (drop) a node in the treeview by dragging it from another tree or any other control.

I have few queries:
1. Can you please provide us a sample for add/edit/delete node and drag/drop? It will be great if sample uses MVVM pattern.
2. How theses operations in RadTreeVIew are diffrent/easy as comapred to when i use WPF standard treeview
3.  Can you please shed some light on UI virtualization support in telerik wpf treeview?

Thanks
Sonal
Petar Mladenov
Telerik team
 answered on 02 Feb 2011
4 answers
150 views
Hello,

I am trying to apply the Windows 7 theme to the RadDataFilter control.  If I do so in XAML it works fine.  But, if I try to style the control programmatically when the control is loaded (an approach that works for the RadGridView), it does not seem to work.  Does anyone know how I can go about styling the control programmatically?

The code I am using is as follows:

// Specify the theme to use for this control.
Theme theme = ThemeManager.FromName("Windows7");
if (theme != null)
{
    StyleManager.SetTheme(this, theme);
}

As always, any help, pointers or even thoughts would be appreciated!

Thanks,
Mark.



Mark
Top achievements
Rank 1
 answered on 02 Feb 2011
2 answers
165 views
I have a RadChart that has a dynamic set of lineSeries that i add to it after recieving the data from an end device.  When i try to clear the Chart for new data, the legend Items do not get cleared. 
private void AddTrendPoints(TrendFiles trendfile)
        {
            if (this.trendGraph.Dispatcher.Thread != Thread.CurrentThread)
            {
                this.trendGraph.Dispatcher.Invoke(DispatcherPriority.Normal, new DispatcherOperationCallback(delegate
                {
                     
                    #region Setup Series
                    this.trendGraph.DefaultView.ChartArea.DataSeries.Clear();
                    this.trendGraph.DefaultView.ChartArea.Legend.Items.Clear();
                    this.trendGraph.SamplingSettings.SamplingThreshold = trendfile.Records;
                    DataSeries series = new DataSeries();
                    LineSeriesDefinition lineDefinition = new LineSeriesDefinition();
                    ChartLegendItem legendItem = new ChartLegendItem();
                    int count = 0;
  
                    foreach(TrendVariable trendVar in trendfile.Variables)
                    {
                        series = new DataSeries();
                        lineDefinition = new LineSeriesDefinition();
                        legendItem = new ChartLegendItem();
                        lineDefinition.ShowItemLabels = false;
                        lineDefinition.ShowPointMarks = false;
                        lineDefinition.SeriesName = trendVar.Name;
                        lineDefinition.LegendDisplayMode = LegendDisplayMode.SeriesLabel;
                        series.LegendLabel = trendVar.Name;
                        series.Definition = lineDefinition;
                        series.Definition.Appearance.Stroke = colors[count];
                        series.Definition.Appearance.Fill = colors[count];
                        legendItem.Label = trendVar.Name;
                        legendItem.Background = colors[count];
                        legendItem.Foreground = Brushes.White;
                        trendGraph.DefaultView.ChartLegend.Items.Add(legendItem);
                          
                        foreach (DataPoint point in trendVar.points)
                        {
                            series.Add(point);
                        }
  
                        trendGraph.DefaultView.ChartArea.DataSeries.Add(series);
                         
                        count++;
                    }
  
                    #endregion
  
  
                    return null;
                }), null);
  
            }
            else
            {
                #region Setup Series
                this.trendGraph.DefaultView.ChartArea.DataSeries.Clear();
                this.trendGraph.DefaultView.ChartArea.Legend.Items.Clear();
  
                DataSeries series = new DataSeries();
                LineSeriesDefinition lineDefinition = new LineSeriesDefinition();
                ChartLegendItem legendItem = new ChartLegendItem();
                int count = 0;
  
                foreach (TrendVariable trendVar in trendfile.Variables)
                {
                    series = new DataSeries();
                    lineDefinition = new LineSeriesDefinition();
                    legendItem = new ChartLegendItem();
                    lineDefinition.ShowItemLabels = false;
                    lineDefinition.ShowPointMarks = false;
                    lineDefinition.SeriesName = trendVar.Name;
                    lineDefinition.LegendDisplayMode = LegendDisplayMode.SeriesLabel;
                    series.LegendLabel = trendVar.Name;
                    series.Definition = lineDefinition;
                    series.Definition.Appearance.Stroke = colors[count];
                    series.Definition.Appearance.Fill = colors[count];
                    legendItem.Label = trendVar.Name;
                    legendItem.Background = colors[count];
                    legendItem.Foreground = Brushes.White;
                    trendGraph.DefaultView.ChartLegend.Items.Add(legendItem);
                    foreach (DataPoint point in trendVar.points)
                    {
                        series.Add(point);
                    }
                    trendGraph.DefaultView.ChartArea.DataSeries.Add(series);
                    count++;
                }
  
                #endregion
  
            }
  
        }


After the initial load, the legend items just append to the legend.  So i get repeat Series legend items.  Its not being cleared on the Legend.Items.Clear() method.

Brian
Top achievements
Rank 1
 answered on 02 Feb 2011
1 answer
59 views
   Hi Telerik,

I have a couple of question about how to change the appeance of the selection style.

1. I have disabled editing and do not wish the selection to display a rectangular border around the clicked cell, i just want the row to be selected as per default when the application starts and no cell has been clicked.

2. Can I remove the selection style completely? I'm using the treelistview to display a set of data where I have disabled selection, but when I populate the data, as per default the first item is selected and given the selection style which ruins the layout abit. I still wish to keep the rowheader but without the arrow icon used for selection.

Thanks in advance,

/Kasper Schou
Vanya Pavlova
Telerik team
 answered on 02 Feb 2011
4 answers
133 views
Hello, 

I have the need to be able to persist and restore the state of a RadDataFilter.  I was hoping to be able to save-off and restore the FilterDescriptors collection, but unfortunately it is read-only.  So, what would be the best approach to making this happen?  Is persistence supported at all?

Thanks,
Mark


Mark
Top achievements
Rank 1
 answered on 02 Feb 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
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?