I have a column which has read mode or edit mode. Read mode means that column display text in a textblock. Edit mode means that the column display a textbox or combobox so the use can input the value in the control. So I want to customize the datetemplate.
<telerik:GridViewDataColumn DataMemberBinding="{Binding Salary}"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Salary}" Visibility="{Binding ReadOrEdit, Convert={StackResources BooleanToOpacityConverter}}" Validation.ErrorTemplate="{StackResources myTemplate}"/> <TextBox Text="{Binding Salary}" Visibility="{Binding ReadOrEdit, Convert={StackResources InvertedBooleanToVisibilityConverter}}" Validation.ErrorTemplate="{StackResources myTemplate}"/> </StackPanel> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn>The validation template likes
<ControlTemplate x:Key="myTemplate"> <DockPanel> <Border BorderBrush="Red" BorderThickness="1"> <AdornedElementPlaceholder x:Name="controlWithError"/> </Border> <TextBlock Foreground="Red" FontSize="20" FontFamily="Segoe UI" Margin="3,0,0,0" MouseDown="Exclamation_MouseDown" Tag="{Binding AdornedElement.(Validation.Errors)[0].ErrorContent, ElementName=controlWithError}">!</TextBlock> </DockPanel></ControlTemplate>I am not sure it is the right way. Should I put the textbox in CellEditingTemplate because of it is for editing? The reason is when we validate the textbox I found besides the textbox also inside the textbox there was a red border around the text. It means there are two adorners.
Thanks
This is a bit hard to describe, but I have a RadGridView that I'm exporting to Excel.
The date and time fields register as "General" (under Right Click --> "Format Cells") when I need them to be either "Date" or "Time" based on what they are. The Excel sorting of DateTime fields doesn't work property otherwise - it seems to sorts on the textual representation as opposed to proper dates.
The attached picture clearly shows what I have in mind.
How do I get Excel to see them (checkboxed) as either "Date" (for date columns/cells) or "Time" (for time columns/cells)...instead of "General" ?
Barry


Is it possible to customize the GridViewGroupPanelItem content so that custom controls inside the header are not visible?
Please see the attached image i took from the example project ColumnSelection, can i remove the CheckBox from the GridViewGroupPanelItem?
Kind regards,
Gian Paolo Tessitore

Hi, I am developing a WPF Application using MVVM pattern. I m attaching the final output which is required named "Final output required.jpg" and also what I am currently getting named "GridView xaml.png".
I need to display data in a grid where the columns are dynamic. So in order to achieve that I had created two classes, one named rows and other one columns. Finally I bind the collection containing rows with the GridView. My code sample is as follows:
//Observable property to bind with public ObservableCollection<Row> GridRows { get { return _gridRows; } set { _gridRows = value; RaisePropertyChanged(() => GridRows); } } //Rad Grid public class Grid { public Grid(){ Rows = new List<Row>(); } //contains mutiple row public List<Row> Rows { get; set; } } // RadGrid Row public class Row { public Row() { Columns = new List<Column>(); } // Row Name public string RowName { get; set; } //each row contains multiple columns public List<Column> Columns{ get;set;} } //Rad Grid Column public class Column { public string ColumnName {get;set;} public int Value { get; set; } } public void LoadData() { Grid table = new Grid(); for (int i = 1; i < 11; i++) { Row row = new Row(); row.RowName = "Row_" + i; for (int j = 0; j < 5; j++) { Column Column = new Column { ColumnName = "Row_" + i + "Col_" + j, Value = i + j }; row.Columns.Add(Column); } table.Rows.Add(row); } GridRows = new ObservableCollection<Row>(table.Rows); }
The View for this is as follows:
<telerik:RadGridView Name="GridView" CanUserReorderColumns="False" CanUserSortColumns="False" ItemsSource="{Binding GridRows}" GridLinesVisibility="Both" AutoGenerateColumns="True" > <telerik:RadGridView.Columns > <!-- My question is how can i bind the dynamic columns here --> <!-- I want to generate the columns spcified for each row --> <telerik:GridViewColumn Header = "{Binding Name}" > <telerik:GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Value}" /> </DataTemplate > </telerik:GridViewColumn.CellTemplate> </telerik:GridViewColumn > </telerik:RadGridView.Columns> </telerik:RadGridView>Basically what my requirement is to create dynamic columns as per the Collection of column in Rows. . I tried but it's showing Collection in column.
Also i want to inline editing for columns that why using the GridView. Please check the required output and suggest if there is any other i can use .
Please response soon as i'm in rush .Also let me know if anything not clear.
Thanks

Hello,
I have this combobox with is bound to List of customers around 5k customers
<telerik:RadComboBox ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Clear Selection" ItemsSource="{Binding Customers}" Margin="0 0 0 18" DisplayMemberPath="DisplayMember" SelectedValuePath="Id" SelectedValue="{Binding CustomerId,Mode=OneWay}" Command="{Binding GetCustomerCommand}"> <telerik:RadComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> </telerik:RadComboBox.ItemsPanel></telerik:RadComboBox>
I changed to virtualization and this helped in getting the list faster but when I added SelectedValue to bind to my viewmodel It is getting very very slow to load.
Is there any way to overcome this problem ?
Regards
Using the RangeBarSeries with data points that overlap another series, the tooltip for the covered up data point is shown rather than the one on top.
However the "hover" clearly knows which is the series being hovered over. See attached screenshots. chart1.pg shows the longest (yellow) bar being hovered over. chart2.png shows the adjacent orange series and chart3 shows the green series. All 3 have the same tooltip, of the longest series which runs underneath the others.
How can I fix this and get the tooltips to show for the proper data point?
Does the RadGridView have something similar to the SelectedItemsSource that the RadListbox has? I'd like to automatically bind the selected items to a collection in my view-model like I do with the list box.
example:
<telerik:RadGridView
ItemsSource="{Binding ..., Mode=OneWay}"
telerik:ListBoxSelectedItemsBehavior.SelectedItemsSource="{Binding ..., Mode=OneWay}">

I am trying to set the default visual style of my line series. (Using Telerik UI for WPF 2015)
Based on the page, the default visual style of the dot & line styling can be set at the default visualstyle properties:
https://docs.telerik.com/devtools/wpf/controls/radchartview/styles-and-templates/customizing-cartesianchart-series
This configuration does not seems to work on Telerik UI for WPF 2015, how do I set the dot size & coloring on line series ?

I have two series, and I want to display them in a same graph.
The series 1 has valued at {0.5: value1, 1.5 : value2, 2.5 : value3}
And series 2 has value at { 1: value 1, 2 value2: 3 value3}
How do I draw the two series on the same graph with X value being interlaced ? Tried linear axis but nothing displayed, tried catagroy axis but the graph is separated into two parts. The x value is not interlacing.
