Telerik Forums
UI for WPF Forum
1 answer
185 views

I'm using the RadGridView.ExportToXlsx() to export my grid to an Excel (.xlsx) file. The exported File works perfectly in Excel 2016, but in OpenOffice (Apache_OpenOffice_4.1.2_Win_x86_install_de) I get the error "Wrong Format".

The only workaround is to open the exported file in Excel and save it. After that the file can be opened in OpenOffice.

I can reproduce the error with the WPF Controls Examples Q1 2016 SP1 (Exporting to Xlsx and Pdf fromats).

 

Is there any way to solve this?

Yoan
Telerik team
 answered on 04 Mar 2016
5 answers
266 views

Hi!

Let's say I have a list of 100 items with an Id ranging from 1 to 100. I put them in a QCV, ordered by Id, with a page-size of 20 resulting in 5 pages. I bind that QCV to a GridView and a DataPager. Page 1 is displayed which means Ids 1 to 20 are visible in the Grid.

Question: what is the most efficient way to find and display the item with a specific Id without loading all pages and skipping through all items in a page? Please give an example!

Regards
Heiko

Maya
Telerik team
 answered on 04 Mar 2016
2 answers
149 views

Hi,

Say I have a timeline with a duration of 180hours. If I add events with duration of for instance 1 minute and zoom the timeline all the way out, the events become completely hidden. Zooming in on the area of the event will eventually make the event appear again.

Is there a way to set a minimum event width - at the very least a dot or a small vertical mark - to visually indicate that there exists an event here? 

I am using custom templates for the events. 

Thanks,

Kato

Kato
Top achievements
Rank 1
 answered on 04 Mar 2016
13 answers
227 views

Hello!

I have a question about Hierarchy and IsExpandable, In my GridView ,user can add and remove father and son items.

I tried the code like this two way,they can set  IsExpandable to false or true when loaded or add items,

but when I remove all the sub items of a father item, the IsExpandable can not set to false,is there any way to solve it? thanks a lot.

<telerik:RadGridView.RowStyle>
    <Style TargetType="telerik:GridViewRow">
   <Setter Property="IsExpandable" Value="True"/>
   <Style.Triggers>
    <DataTrigger Binding="{Binding Converter={StaticResource integerToBooleanConverter}, Path=SubList.Count}" Value="False">
    <Setter Property="IsExpandable" Value="False"/>
    </DataTrigger>
    </Style.Triggers>
 </Style>
 </telerik:RadGridView.RowStyle>
<i:Interaction.Behaviors>
  <behavior:IsExpandableBehavior IsExpandableSourcePropertyName="SubList.Count" />
 </i:Interaction.Behaviors>

Wang
Top achievements
Rank 1
 answered on 04 Mar 2016
10 answers
637 views

I have been trying to write a TiledMapSource that reads from the mbtiles format https://github.com/mapbox/mbtiles-spec/blob/master/1.1/spec.md

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace RadMapMbtilesDemo
{
    using System.Data.SQLite;
    using System.Diagnostics;
    using System.IO;
    using System.Security.AccessControl;
    using System.Windows.Media.Imaging;
 
    using Telerik.Windows.Controls.Map;
 
    public class MbTileSource : TiledMapSource
    {
        private readonly string mbtilefilepath;
 
        /// <summary>
        /// Initializes a new instance of the MyMapSource class.
        /// </summary>
        public MbTileSource(string mbtilefilepath, int minZoom, int maxZoom)
              : base(minZoom, maxZoom, 256, 256)
        {
            this.mbtilefilepath = mbtilefilepath;
        }
 
        /// <summary>
        /// Initialize provider.
        /// </summary>
        public override void Initialize()
        {
            // Raise provider initialized event.
            this.RaiseIntializeCompleted();
        }
        /// <summary>
        /// Gets the image URI.
        /// </summary>
        /// <param name="tileLevel">Tile level.</param>
        /// <param name="tilePositionX">Tile X.</param>
        /// <param name="tilePositionY">Tile Y.</param>
        /// <returns>URI of image.</returns>
        protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            return null;
        }
        protected override Stream GetCachedTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            var zoomLevel = this.ConvertTileToZoomLevel(tileLevel);
             
            try
            {
                using (var conn = new SQLiteConnection(String.Format("Data Source={0};Version=3;", this.mbtilefilepath)))
                {
                    conn.Open();
                    var sqlquery = String.Format("SELECT tile_data FROM tiles WHERE tile_column = {0} and tile_row = {1} and zoom_level = {2};", tilePositionX, tilePositionY, zoomLevel);
                    Debug.WriteLine(sqlquery);
                    using (var cmd = new SQLiteCommand() { Connection = conn, CommandText = sqlquery })
                    {
                        var reader = cmd.ExecuteReader();
                        if (reader.Read())
                        {
                            var bytes = reader["tile_data"] as byte[];
                            if (bytes != null)
                            {
                                return new MemoryStream(bytes);
                            }
                        }
                    }
                }
            }
            catch
            {
                return null;
            }
 
            return null;
        }
 
         
    }
}

This works and reads the files from the mbtiles (sqlite underneath the mbtiles spec) but the map is requesting the wrong tiles and I cannot see why. My understanding is:

1) Radmap is requesting tiles in a TMS format

2) MbTiles are stored in a TMS format

So the XYZ values passed into GetCachedTile(int tileLevel, int tilePositionX, int tilePositionY) should be the same I use in my sqlite query. Things I have checked:

1) I wondered if my mbtiles files was actually using OSMs style XYZ and tried the code to flip the Y value, this still gives incorrect tile values

2) I checked my mbtile file with https://viswaug.wordpress.com/2011/06/28/mbtilesviewer/ and it works fine

 So I can only assume that Radmap and mbtiles are using a different format or different projection hence the issues lining the two up. Can anyone help?

brian
Top achievements
Rank 1
 answered on 04 Mar 2016
4 answers
544 views

Hi,

I am going to use a RadCartesianChart to show a point series with  DataTimeContinuousAxis as my Horizontal axis and Linear Vertical axis. My requirement is that I want to show only those DateTime axis labels where I have some data point. Also instead of showing it as DateTime I want to bind to some other string.Except those other axis labels should be hidden (where no data point is present). How do I Achieve this? 

Thanks,

Shilpa

Shilpa
Top achievements
Rank 1
 answered on 04 Mar 2016
1 answer
195 views

Hi Telerik,

We are using the RadPdfViewer for our WPF application and it has a strange behavior. The page borders change on zoomlevel, by default (100%)  the right and bottom border are missing in our application. By zooming in and out it changes the border and it becomes slightly visible.

I added three screenshots with different zoomlevels.

Kind regards,

Ben

Deyan
Telerik team
 answered on 03 Mar 2016
2 answers
212 views

Hello,

I am working on an application where I am using RadRichTextBox to show some document in the application. Document is binded in the form of xml to this control.

<telerik:RadRichTextBox  x:Name="txtMsgBody" Grid.Row="1" Grid.Column="0" DataContext="{Binding STATIONARYXML}"  MinHeight="620" MaxWidth="1200"   VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Hidden" SelectiveScrollingGrid.SelectiveScrollingOrientation="None" ScrollViewer.VerticalScrollBarVisibility="Visible"/>

This document is a word like document maximum of 1.5 to 2 pages. It contains some paragraphs, table and 1-2 small images of 2-3 KB in size. I am facing performance issue in the loading of this document. Document is of approx 20KB (when converted into MS word and saved on HD) and on 2GB RAM machine & 512 KB transfer rate it takes 11 seconds to open the document among which 3.5 to 4 seconds are on service side while rest it takes to load that document in control. I have already switched off the non required features like spell checker or image editor etc and also using only XamlFormatProvider in my TypeCatalog. I need to bring this transaction under 7 seconds. Your help is required in this case.

Thanks.

Tanya
Telerik team
 answered on 03 Mar 2016
3 answers
313 views

Hi,

I am trying to define a mask for a meskedinput control as all capital and required letters so normally I would be using something like ">LLL" as the mask.

You mention in your documentation that ">" should be escaped in XAML so I have set the mask property as "&gt;LLL" 

<telerik:RadMaskedTextInput Name="rmb_SMS_CODE"
                HorizontalAlignment="Center"
                Margin="0,10,0,20"               
                AcceptsReturn="True"
                Mask= "&gt;LLL">
            </telerik:RadMaskedTextInput>

But this does not work, it does not even work if I define the mask in code as this.mymaskcontrol.mask = ">LLL". The control ignores the capitalisation.

Can you please provide me with some assistance on what I am doing wrong?

Thank you,

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Mar 2016
1 answer
236 views

I have a question regarding a GridViewMaskedInputColumn with a MaskType = MaskType.Numeric with a short width, so I'll place this question under this forum.

 

When I focus on the cell the caret seems to be placed at the beginning of the content, and (a) happens (see attached file). I wanted to achieve something like (b).

 

I inherited GridViewMaskedInputColumn and if I do:

 

public class SomeGridViewMaskedInputColumn : GridViewMaskedInputColumn
    {
        public override FrameworkElement CreateCellEditElement(GridViewCell cell, object dataItem)
        {
            var elem = (RadMaskedNumericInput)base.CreateCellEditElement(cell, dataItem);
            elem.GotFocus += Elem_GotFocus;

            // I tried SetCaretToEndOfTextOnFocus(elem, true); but it doesnt work for some reason
            return elem;
        }

        private void Elem_GotFocus(object sender, RoutedEventArgs e)
        {
            var control = ((RadMaskedNumericInput)sender);
            control.SelectionStart = control.Text.IndexOf(",");
        }
    }

 

(c) happens. In fact, (b) looks only achievable if i set SelectionStart to control.Text.Length and then press left 2 times (in this case, because i have 2 decimal places). Is there a better way of doing this?

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Mar 2016
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?