I want to localize my GridView from xml file which has translation for my GridView headers.
I use next code:
<Window.Resources> <Style TargetType="telerik:GridViewDataColumn"> <Setter Property="Header" Value="someValue"/> </Style> </Window.Resources> <Grid> <telerik:RadGridView HorizontalAlignment="Left" Name="radGridView1" VerticalAlignment="Top" > </telerik:RadGridView> </Grid>
public partial class Window1 : Window{ public Window1() { InitializeComponent(); var lst = new List<Foo> { new Foo() {CompanyName = "Burkinafaso", Phone = "6666"}, new Foo() {CompanyName = "Reebok", Phone = "555"} }; radGridView1.SetBinding(RadGridView.ItemsSourceProperty, new Binding {Source = lst}); }}public class Foo{ public string CompanyName { get; set; } public string Phone { get; set; }}
private void radDockPanel1_Close(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e) { p1.IsHidden = !p1.IsHidden; }Hello again,
I want to suggest a better behavior for this control that would help it stay 508 compliant. When I use the RadTabControl in my applications, and a user attempts to change the tab using just the keyboard, this control behaves in a way that is not typical. For starters, the RadTabItem’s default IsTabStop value is “false”. Second, even when we set the IsTabStop to “true”, the focus is automatically changed from the Tabs to the first control in the tab being activated. This is not a typical behavior as seen in the stock TabControl that Microsoft wrote (or any other Tab control to speak of). Finally there is the matter of the AutomationPeer (as in there is none for either the RadTabControl or RadTabItem). This presents an issue for customers like me who are required to make our products accessible.
- Rashad Rivera


public DataTable GetDataTable() { DataTable dataTable = new DataTable(); dataTable.Columns.Add("Time", typeof(DateTime)); dataTable.Columns.Add("DoubleData", typeof(double)); dataTable.Columns.Add("Time2", typeof(DateTime)); dataTable.Columns.Add("DoubleData2", typeof(double)); for (int index = 0; index <1000; index++) { DataRow dataRow = dataTable.NewRow(); dataRow["DoubleData"] = 21.7003078460693; dataRow["DoubleData2"] = 21.7003078460693 + 10; dataRow["Time"] = DateTime.Now.AddSeconds(index); dataRow["Time2"] = DateTime.Now.AddSeconds(index+1); dataTable.Rows.Add(dataRow); } return dataTable; } radChart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto; radChart.DefaultView.ChartArea.AxisX.IsDateTime = true; radChart.DefaultView.ChartArea.AxisX .DefaultLabelFormat = "hh:mm MM:ss"; radChart.DefaultView.ChartArea.AxisX.AutoRange = true; SeriesMapping seriesMapping = new SeriesMapping(); LineSeriesDefinition lineSeriesDefinition = new LineSeriesDefinition(); ItemMapping YItem = new ItemMapping("DoubleData", DataPointMember.YValue); ItemMapping XItem = new ItemMapping("Time", DataPointMember.XValue); seriesMapping.LegendLabel = "1"; lineSeriesDefinition.ShowItemLabels = false; lineSeriesDefinition.ShowPointMarks = false; seriesMapping.SeriesDefinition = lineSeriesDefinition; seriesMapping.ItemMappings.Add(YItem); seriesMapping.ItemMappings.Add(XItem); lineSeriesDefinition.ShowItemToolTips = true; radChart.SeriesMappings.Add(seriesMapping); SeriesMapping seriesMapping2 = new SeriesMapping(); LineSeriesDefinition lineSeriesDefinition2 = new LineSeriesDefinition(); ItemMapping YItem2 = new ItemMapping("DoubleData2", DataPointMember.YValue); ItemMapping XItem2 = new ItemMapping("Time2", DataPointMember.XValue); seriesMapping2.LegendLabel = "2"; lineSeriesDefinition2.ShowItemLabels = false; lineSeriesDefinition2.ShowPointMarks = false; lineSeriesDefinition2.ItemLabelFormat = "mm:dd hh:MM:ss"; seriesMapping2.SeriesDefinition = lineSeriesDefinition2; seriesMapping2.ItemMappings.Add(YItem2); seriesMapping2.ItemMappings.Add(XItem2); radChart.SeriesMappings.Add(seriesMapping2); radChart.ItemsSource = GetDataTable(); <-- ErrorNo generic method 'Average' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.