Hello,
I have a problem exporting to a text file while grouping the data.
When i press the save button the variable 's' gets the _correct_ value:
"\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\nHELLO5\r\n"
When i press the save button while grouping the column i get the following value on 's':
"\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\nHELLO5\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\nHELLO5\r\n"
This means that i cant export a grid if the user is grouping. I thought that it would generate a sorted grid. This behavior also applies to ToHtml.
I have a problem exporting to a text file while grouping the data.
<!-- Window1.xaml --> |
<Window x:Class="WpfTelerikRadGridViewTest.Window1" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
Title="Window1" Width="800" Height="600" > |
<Grid> |
<Grid.RowDefinitions> |
<RowDefinition /> |
<RowDefinition Height="Auto" /> |
</Grid.RowDefinitions> |
<telerik:RadGridView Name="radGridView1" ItemsSource="{Binding}" /> |
<Button Grid.Row="1" Click="ButtonBase_OnClick">Save</Button> |
</Grid> |
</Window> |
// Window1.xaml.cs |
public partial class Window1 |
{ |
public Window1() |
{ |
InitializeComponent(); |
var list = new ObservableCollection<string>(); |
list.Add("HELLO1"); |
list.Add("HELLO2"); |
list.Add("HELLO3"); |
list.Add("HELLO4"); |
list.Add("HELLO5"); |
DataContext = list; |
} |
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) |
{ |
var s = radGridView1.ToText(); |
} |
} |
When i press the save button the variable 's' gets the _correct_ value:
"\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\nHELLO5\r\n"
When i press the save button while grouping the column i get the following value on 's':
"\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\nHELLO5\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\n\r\nHELLO1\r\n\r\nHELLO1\r\nHELLO2\r\nHELLO3\r\nHELLO4\r\nHELLO5\r\n"
This means that i cant export a grid if the user is grouping. I thought that it would generate a sorted grid. This behavior also applies to ToHtml.