Struggling to mimic the Grid View Exporting to Xlsx and Pdf example in the DEMO to understand how to build this function in a project. For the most part I have created the a working code but two things happens.
1) I get zero bit excel file.
2) In the code get System.ArgumentException "Please provide GridViewDataControl for exporting!". Sure enough in "var grid = param as RadGridView;" Param looks good bu the "grid" is null. Not sure how to over come.
When I run the demo program for the first time and open the xlsx file I'm getting something about the formatting is not correct...
private
void
Export(
object
param)
{
var grid = param
as
RadGridView;
var dialog =
new
SaveFileDialog()
{
DefaultExt =
this
.SelectedExportFormat,
Filter = String.Format(
"(*.{0})|*.{1}"
,
this
.SelectedExportFormat,
this
.SelectedExportFormat)
};
if
(dialog.ShowDialog() ==
true
)
{
using
(var stream = dialog.OpenFile())
{
switch
(
this
.SelectedExportFormat)
{
case
"xlsx"
:
grid.ExportToXlsx(stream);
break
;
case
"pdf"
:
//grid.ExportToPdf(stream);
break
;
}
}
}
}
::
private
void
ExportDefaultStyles(
object
param)
//private void ExportDefaultStyles(RadGridView param)
{
var grid = param
as
RadGridView;
var exportOptions =
new
GridViewDocumentExportOptions()
{
ExportDefaultStyles =
true
,
ShowColumnFooters = grid.ShowColumnFooters,
ShowColumnHeaders = grid.ShowColumnHeaders,
ShowGroupFooters = grid.ShowGroupFooters
};
var dialog =
new
SaveFileDialog()
{
DefaultExt =
this
.SelectedExportFormat,
Filter = String.Format(
"(*.{0})|*.{1}"
,
this
.SelectedExportFormat,
this
.SelectedExportFormat)
};
if
(dialog.ShowDialog() ==
true
)
{
using
(var stream = dialog.OpenFile())
{
switch
(
this
.SelectedExportFormat)
{
case
"xlsx"
:
grid.ExportToXlsx(stream, exportOptions);
break
;
case
"pdf"
:
grid.ExportToPdf(stream, exportOptions);
break
;
}
}
}
}
In both methods I'm not correctly figuring out how to set the "grid" correctly so it can be passed down. It works this way in your demo.
Is there any way to download the demo to work on it locally?
Hi. I am looking at using your SyntaxEditor control and had a few questions before I dive into this. I have read all forum items and all documentation. I am pretty sure your control supports these questions, but I want to double check.
I have a custom language where I would need dynamic Inteliprompt lists to be displayed. For instance, if I have a variable and I press a period. I would like different lists to be displayed based on datatype (which I would parse out ahead of time). Is this dynamic functionality available?
Next, at times I need the control to be read-only. Is this available?
Next, while the control is read-only, can I dynamically highlight a single row and change this highlighted row as needed via your API?
Lastly, are the language element tooltips dynamic? Is there an event that fires or something I may intercept to set the tooltip for a language element (i.e. a variable) before it is displayed? (I assume your tooltips use your tooltip control.)
Thank you for your time.
Hello,
Help me to perform sorting on telerik gantt view columns
I'm looking for a quick way to enabled/disable tooltips application wide (globally). I realize I can do the following on EVERY single control:
RadToolTipService.SetIsEnabled(
Me
.bnSettings,
False
)
repeat for each control in my application, however, I was hoping there was an easy way to enable/disable all tooltips in my application?
Cheers, Rob.
Hi there,
I am trying to make an offline world map using the RadMap control. I am using shapefiles (.shp and .dbf) such as done in the ShapefileMapShapeReader example in the SDK. However, this is done targeting .NET Framework v4.0, whereas I'd like to attempt this targeting .NET 5. What I did was: Update to the latest version of the Telerik UI for WPF, including the Visual Studio 2019 plugins. I made a new Telerik WPF application (targeting .NET 5) and copied the contents from the SDK example (the MainWindow.xaml contents and the world.shp and world.dbf files, set the latter two to have Build Action "Resource"). However, this does not display the map as it does in the example.
Now I tried the exact same steps as described above, but now for a Telerik WPF application targeting .NET Framework v4.0 (and hence making my own ShapefileMapShapeReader example). This does work properly. Can you give me any pointers on if you experience the same and if there are possibilities to fix this issue? Or, if you're reading this and have a better idea about showing offline coastal lines in the RadMap control, I'm open to that too. :-)
Kind regards,
Tom
See http://www.tomjoosten.nl/TelerikWpfMap.zip
Hey
I'm trying to configure a TreeListView to select the full row of childless rows when I use the arrow keys for navigation, curiously I checked the demo and it has the behaviour I'm trying to achieve! However I have looked at the demo code and can't spot how it's achieving it, which makes me think it's the default behaviour?
When I use the arrow keys on our TreeListView, it selects the cell of childless nodes rather than the whole row, see attached gif
Many thanks
I was wondering if it's possible to cycle thru "available" themes programmatically when using XAML/StyleManager approach? I'd like to cycle thru whatever themes are supported in the XAML approach and display their names in a ComboBox for a user to select.
Cheers, Rob.
Hi
I've a question: I would like to create a live chart view (with measurment points, updated every second) combining 2 styles:
- A simple threshold bar
- A gradient mountain style (gradient could be fix from min to max of the y axis)
Is this possible with Telerik chartviews (how), or do I have to use some other chart packages like scichart?
I've attached an example, what I want do create...
best regards
Patrick