<ScrollViewer x:Name="carouselScrollViewer" CanContentScroll="True" VerticalScrollBarVisibility="Hidden" Margin="0"> |
<telerik:RadCarouselPanel x:Name="mainMenuCarousel" |
ItemsPerPage="3" PathPadding="0,0,0,100" d:LayoutOverrides="Width, Height" ScrollViewer.VerticalScrollBarVisibility="Hidden"> |
<Frame Width="600" Height="400" Content="Frame" Source="\View\MediaPlayerView.xaml" NavigationUIVisibility="Hidden" IsEnabled="False" ScrollViewer.VerticalScrollBarVisibility="Disabled"/> |
<Frame Width="600" Height="400" Content="Frame" Source="\View\WebBrowserView.xaml" NavigationUIVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled"/> |
<Frame Width="600" Height="400" Content="Frame" Source="\View\MediaPlayerView.xaml" NavigationUIVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" Focusable="False" IsTabStop="False"/> |
</telerik:RadCarouselPanel> |
</ScrollViewer> |
<telerik:GridViewDataColumn Header="Happy<LineBreakHere>(Days)"/> |
I want the text to be centered with (Days) appearing underneath "Happy", and I want to do this without implementing any Wrapping/ColumnWidth tricks.
When I try to export the data inside gridview table to an excel file with "xls" file extension a warning message is shown like "different format than specified by the file extension"(Office 2007 is installed in the PC). However, when I change the file extension to xlsx it does not work at all.
Can anyone help me to figure out the problem?
Many thanks
Bo
Bellow is the code
string content = string.Empty;
string extension = "xls";
content = radGridView1.ToHtml(true);
string path = String.Format("Export.{0}", extension);
if (File.Exists(path))
{
File.Delete(path);
}
using (FileStream fs = File.Create(path))
{
Byte[] info = Encoding.Default.GetBytes(content);
fs.Write(info, 0, info.Length);
}
Process.Start(path);