Telerik Forums
UI for WinForms Forum
7 answers
633 views

 Is there a way to display an encrypted file in PdfViewer ?

I created a file:

formatProvider = new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider();
formatProvider.ExportSettings.UserPassword = "xxx";
formatProvider.ExportSettings.IsEncrypted = true;

formatProvider.Export( ...)

And now I want to display it, but haven't found a place to pass a password to the viewer.
It's not displaying any error, it's just displaying - the correct number of - empty pages.

 

Tanya
Telerik team
 answered on 20 Feb 2020
4 answers
685 views

Hi there,

I've been tasked with migrating DataTable functionality to Telerik RadGridView in a C# WinForms app.

DataTable code sample:

   var taxColumn = new DataColumn();
   taxColumn.DataType = System.Type.GetType("System.String");
   taxColumn.ColumnName = "tax";
   taxColumn.Expression = "SUBSTRING('ABC',2,3)";

My attempt to do the equivalent using a RadGridView TextBoxColumn fails with "unknown function SUBSTRING()".

Is there any similar functionality in RadGridView to the Substring function in DataColumn please? It's essential to be able to write expressions that do substirng operations in the app I'm working on.

 

Thanks as ever for your help!

Kind regards, James

James
Top achievements
Rank 1
 answered on 19 Feb 2020
3 answers
120 views

I am happy Telerik created these dialogs for aesthetic reasons.

Is there a way to restrict access to file operations (Delete, copy, et. al.)?? I want to restrict file functions that can be performed via these dialogs. For example, I want to prevent someone from copying files from a USB when selecting a folder or selecting a file.

 

Thanks,

 

Jim

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Feb 2020
15 answers
1.1K+ views

Hi,

I need to build a solution to export text from PDF including their X,Y cordinates. 

Could it be done with PDFViewer or other Telerik product?

Best regards,
André

Tanya
Telerik team
 answered on 19 Feb 2020
2 answers
168 views

Hi, i read the documentation for "custom-sorting" and "Setting Sorting Programmatically" but that´s not my case.

i need a possibility to add a custom-sorting only for one column and sort with the data of a hidden column.

What´s the right way to do that?

Best regards

Martin

Martin
Top achievements
Rank 1
 answered on 19 Feb 2020
1 answer
227 views

I am trying to achieve a similar experience as in your CardView demo with the cities. The images are stored as block blobs in an Azure storage account. The blobs have tags, which i want to expose , similar to the meta from the demo where we have city name, population, country).

As far as i saw, there is no direct integration for CloudBlockBlob, so i am trying to place this in a byte array in order to display. Yet the outcome is an empty box in the grid, for each item from the container. the blobs are correctly downloaded, verified by writing the fileContent byte array to disk via filestream.

Any idea on how to achieve this?

 

Thank you!

 

 public partial class Form1 : Form
    {
        string sasToken = "?st=2020-02-12T21%3A05%3A08Z&se=2021-02-13T21%3A05%3A00Z&sp=rl&sv=2018-03-28&sr=c&sig=*redacted*";
        public Form1()
        {
            InitializeComponent();
            
        }


        public List<IListBlobItem> MainBody3(string id)
        {
            StorageCredentials accountSAS = new StorageCredentials(sasToken);

            // Use these credentials and the account name to create a Blob service client.
            CloudStorageAccount account = new CloudStorageAccount(accountSAS, "storage_account_name", endpointSuffix: null, useHttps: true);

            CloudBlobClient client = account.CreateCloudBlobClient();
            CloudBlobContainer container = client.GetContainerReference("images-analyzed-sampled");

            BlobContinuationToken token = null;
            List<BlobInfo> blobi = new List<BlobInfo>();
            List<IListBlobItem> poze = new List<IListBlobItem>();
            BlobRequestOptions options = new BlobRequestOptions();
            var myResults = new DataSet();
            do
            {
                var result = container.ListBlobsSegmented(null, true, new BlobListingDetails(), 20, token, null, null);
                token = result.ContinuationToken;

                var blobs = result.Results;
                foreach (IListBlobItem item in blobs)
                {
                    var blob = item as CloudBlockBlob;

                    long fileByteLength = blob.Properties.Length;
                    byte[] fileContent = new byte[fileByteLength];
                    for (int i = 0; i < fileByteLength; i++)
                    {
                        fileContent[i] = 0x20;
                    }
                   
                    radCardView1.Items.Add(blob.DownloadToByteArray(fileContent, 0));

                }
            } while (token != null);


            return poze;

        }




        private bool HasMatchingMetadata(CloudBlockBlob blob, string term)
        {
            foreach (var item in blob.Metadata)
            {
                if (((item.Key.StartsWith("Tag") || (item.Key.StartsWith("PredictedImageType"))) && item.Value.Equals(term, StringComparison.InvariantCultureIgnoreCase)))
                    return true;
            }

            return false;
        }

        private void radButton1_Click(object sender, EventArgs e)
        {
            MainBody3("");
        }
    }
    public class BlobInfo
    {
        public string ImageUri { get; set; }
        public string ThumbnailUri { get; set; }
        public string Caption { get; set; }
    }
}

Nadya | Tech Support Engineer
Telerik team
 answered on 19 Feb 2020
1 answer
105 views

public RadForm1() 
        {
            RadMapElement.VisualElementFactory = new MyMapVisualElementFactory();
            InitializeComponent();

            <..filling data and asigning clustering here>

        } 

public class MyMapVisualElementFactory : MapVisualElementFactory
    {
        public override MapCluster CreateCluster()
        {
            System.Diagnostics.Debug.WriteLine("FIRE!");
            return new MapCluster();
        }
    }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Feb 2020
2 answers
387 views

Hi, 

Can I load pictures via LoadImageFromUrl from a local disk without async methods?

The code below works, but it works poorly and often the images do not load, or not all are loaded.

Uri uri = new Uri(Path.Combine(Holder.TempPath, e.Url), UriKind.Absolute);

WebClient client = new WebClient();
client.OpenReadCompleted += (w, a) =>
    {
     if(a.Error == null)
      {
    try
     {
             e.ImageElement.Init(a.Result, new Telerik.WinControls.RichTextEditor.UI.Size(16, 16), extension);
     }
      catch
     {
       //Handle errors
      }
    }
    };
    client.OpenReadAsync(uri);

Sergey
Top achievements
Rank 2
 answered on 19 Feb 2020
2 answers
191 views

Hi,

i would like to change cursor for data field label in RadDataLayout, to make it work as hyperlink, I set it font as below, but can't find any cursor property, is it possible?

Private Sub RadDataLayout1_ItemInitialized(sender As Object, e As Telerik.WinControls.UI.DataLayoutItemInitializedEventArgs)

            Dim ci As DataLayoutControlItem = e.Item
            e.Item.Font = New System.Drawing.Font(e.Item.Font.Name, e.Item.Font.Size, FontStyle.Underline)

end sub

Thanks

Alex

Alex Dybenko
Top achievements
Rank 2
 answered on 19 Feb 2020
2 answers
217 views

Hi,

When the record count is more than 500, the loading time of the appointments on the scheduler, loading time of the unassigned calls & drag & drop the assigned calls on the scheduler is taking more time to load, as we have used for loop function for binding the records.

To reduce the time taken we have used parellel.for threading concept but this is not applicable for the below functions.

=> scheduler.Appointments.Add(appointment)
=> scheduler.PerformLayout()
=> scheduler.Refresh()

It is a big problem for us, Can you please suggest if there a concept/method to reduce the loading time in the radscheduler? 

Video link mentioned below for your reference.

Video Link : https://ttprivatenew.s3.amazonaws.com/pulse/suganya-gmail/attachments/12503756/TinyTake14-02-2020-05-55-27.mp4

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Feb 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?