Hello
1. Can I add Aggregate Function between the rows without using groping?
2. Can I show column footers for the gird not for the columns with custom function?
Best regards
Ehud
DataSeries barSeries = new DataSeries();var maxKey = features.Max(x => x.Key);ObservableCollection<DataPoint> dataPoints=new ObservableCollection<DataPoint>();Parallel.For(1, maxKey, i => { DataPoint dataPoint; if (features.ContainsKey(i)) { int xLabel = i*_mStatisticsStep; dataPoint = new DataPoint(xLabel, features[i]) {XCategory = xLabel.ToString()}; } else { int xLabel = i*_mStatisticsStep; dataPoint = new DataPoint(xLabel, 0) {XCategory = xLabel.ToString()}; } dataPoints.Add(dataPoint); });barSeries.AddRange(dataPoints);<ComboBox Width="225" VerticalAlignment="Center" IsEditable="True" IsReadOnly="False"> <ComboBox.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding}" /> </DataTemplate> </ComboBox.ItemTemplate> <ComboBox.Text> <Binding Path="Name" UpdateSourceTrigger="LostFocus" NotifyOnValidationError="True" NotifyOnSourceUpdated="True" NotifyOnTargetUpdated="True"> <Binding.ValidationRules> <Validator:RequiredFieldRule FieldName="Field Name Prompt" /> </Binding.ValidationRules> </Binding> </ComboBox.Text> </ComboBox>Here is my Window.Resources code to display the validation error message:
<Style TargetType="ComboBox"> <Setter Property="VerticalAlignment" Value="Center" /> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" />RequiredFieldRule is a class in my application derived from ValidationRule.
When I replace 'ComboBox' with ' RadComboBox' the Style used to set the ToolTip with the error message does not work.
Any help would be greatly appreciated.
Hello!
Now I testing a trial version of RadControls, and I have one issue:
I trying to create RadGridView with 40+ columns, with binds to ObservableCollection<>.
When I start my application, I can see the horizontal scrollbar, but not all of my columns are visible. If I will make several random clicks on RadGridView component, scrollbar width increases, and all columns became visible. What I do wrong?
1.<Grid> 2. <telerik:RadGridView Name="dataGrid1"3. EnableColumnVirtualization="True"4. EnableRowVirtualization="True"5. DataLoadMode="Asynchronous"6. /> 7.</Grid>
01.public partial class MainWindow : Window 02. { 03. /// <summary> 04. /// Here is sample data class with a lot of fields 05. /// </summary> 06. class MyDataClass 07. { 08. public bool IsChecked { get; set; } 09. public int Number { get; set; } 10. public int Num43ber { get; set; } 11. public int Num4ber { get; set; } 12. public int Nu543mber { get; set; } 13. public int Num45ber { get; set; } 14. public int Nu5343mber { get; set; } 15. public int Num435ber { get; set; } 16. public int Num4vd5ber { get; set; } 17. public int Nu543sdmber { get; set; } 18. public int Num4sd5ber { get; set; } 19. public int Nu43mber { get; set; } 20. public int Num4fsdf35ber { get; set; } 21. public int Nu54fds3vmber { get; set; } 22. public int Nu52435mber { get; set; } 23. public int Num43dsad5ber { get; set; } 24. public int Num5435ber { get; set; } 25. public int Nu4532mber { get; set; } 26. public int Nu45mber { get; set; } 27. public int f5344 { get; set; } 28. public int Nufdmber { get; set; } 29. public int Nu3fg45mber { get; set; } 30. public int Nu52dfg435mber { get; set; } 31. public int Numfdg43dsad5ber { get; set; } 32. public int Numfdg5435ber { get; set; } 33. public int Nudfg4532mber { get; set; } 34. public int Nu4fdg5mber { get; set; } 35. public int f53fdg44 { get; set; } 36. public int Nufgfdmber { get; set; } 37. public int Nufgdf345mber { get; set; } 38. // 39. public int Nufds45mber { get; set; } 40. public int f5dsf344 { get; set; } 41. public int Nasdfufdmber { get; set; } 42. public int Nadsfu3fg45mber { get; set; } 43. public int Nudasf52dfg435mber { get; set; } 44. public int Nasdfumfdg43dsad5ber { get; set; } 45. public int Nudsafmfdg5435ber { get; set; } 46. public int Nuadsfdfg4532mber { get; set; } 47. public int Nudsf4fdg5mber { get; set; } 48. public int f5dsaf3fdg44 { get; set; } 49. public int Nuadffgfdmber { get; set; } 50. public int LASTCOLUMN { get; set; } 51. } 52. 53. // here is sample collection 54. ObservableCollection<MyDataClass> list; 55. public MainWindow() 56. { 57. InitializeComponent(); 58. list = new ObservableCollection<MyDataClass>(); 59. // fill the collection with some elements 60. for (int i = 0; i < 50; i++) 61. list.Add(new MyDataClass() { IsChecked = true, Number= i }); 62. // bind it to RadGridView 63. dataGrid1.ItemsSource = list; 64. } 65. }Thanks. And sorry for my bad english, please :(.
Hello,
Here is my question.
We have the GridView, and some columns are bound to the List<MyType>.We've made a custom filter like shown in some of your. demos. Now we need to filter those columns, but the DataMemberBinding is set to the List. Some code:
01.<DataTemplate x:Key="cellTemplate"> 02. <DataTemplate.Resources> 03. <my:PercentsConverter x:Key="PerConv"> 04. </DataTemplate.Resources> 05. <TextBlock> 06. <TextBlock.Text> 07. <MultiBinding Converter ="{StaticResource PerConv}" 08. ConverterParameter="MyParam"> 09. <Binding Path="ListValues"/> 10. <Binding Path="SomeValues"/> 11. </MultiBinding> 12. </TextBlock.Text> 13. </TextBlock> 14.</DataTemplate>
01.var tCol = new GridViewDataColumn() 02.{ 03. Header = temp.ToString(), 04. CellTemplate = datatemplate, 05. CellStyleSelector = new CellStyleSelector(), 06. DataMemberBinding = new Binding("ListValues"), 07. IsFilterable = true, 08. FilteringControl = new Filtering() 09. { 10. Minimum = 0, 11. Maximum = 100 12. }, 13.};