Telerik Forums
UI for WinForms Forum
4 answers
647 views

hi I'm running visual studio 2019, with Telerik Winforms UI 2019.2.508.40

I'm trying to convert an existing VB project to Telerik controls, but I don't see the menu option for the converter tool.    (Under Extensions->Telerik->Telerik for WInforms, I see a bunch of options:  Configure project, AddRad** References, and AddRad** Forms, but no option to convert.   (In a new or existing project) 

I have read this thread: https://www.telerik.com/forums/convert-your-existing-application-to-telerik-ui-for-for-winforms-does-not-work

with no luck. 

I have tried adding the Telerik Winforms VsExtension through the Extention manager but it is not showing anywhere that I can find as an option to install. 

Running
C:\Program Files (x86)\Progress\Telerik UI for WinForms R2 2019\VSExtensions\VS2019\Telerik.WinControls.VSPackage.vsix
reports that:
"This extension is already installed to all applicable projects"

 

Any ideas?  Thanks,

 

 

 

Dimitar
Telerik team
 answered on 20 Feb 2020
1 answer
129 views

Hello.

I'm tring to make a custom cell with radtimepickerelement but something is not working in SetContentCore because any value I set in the timepicker editor when i see the value it's always nothing.

 

And in the other hand I can't use the custom editor in the row witch is used for add new rows in the grid.

 

I've done a sample code if you could help me

Thx.

 

 

  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim colnombre As New GridViewTextBoxColumn("nombre")
        Dim colHora As New TimePickerColumn("hora")

        GVPrueba.Columns.Add(colnombre)
        GVPrueba.Columns.Add(colHora)

        GVPrueba.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill


    End Sub

    Private Sub GVPrueba_SelectionChanged(sender As Object, e As EventArgs) Handles GVPrueba.SelectionChanged
        If GVPrueba.SelectedRows.Count = 1 Then

            If GVPrueba.SelectedRows(0).Cells("hora").Value IsNot Nothing Then
                MsgBox(GVPrueba.SelectedRows(0).Cells("hora").Value.ToString)

            End If
        End If
    End Sub




    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        If GVPrueba.Rows.Count > 0 Then
            GVPrueba.Rows(0).Cells("hora").Value = Now
        End If
    End Sub


    Public Class TimePickerCellElement
        Inherits GridDataCellElement

        Public Sub New(ByVal column As GridViewColumn, ByVal row As GridRowElement)
            MyBase.New(column, row)
        End Sub

        Private oRadTimePickerElement As RadTimePickerElement
        Protected Overrides Sub CreateChildElements()
            MyBase.CreateChildElements()
            oRadTimePickerElement = New RadTimePickerElement()
            Me.Children.Add(oRadTimePickerElement)
        End Sub

        Protected Overrides Sub SetContentCore(value As Object)
            If Me.Value IsNot Nothing AndAlso Me.Value IsNot DBNull.Value Then
                DateTime.TryParse(value, oRadTimePickerElement.Value)
                '       MyBase.SetContentCore(value)
            End If
        End Sub

        Public Overrides Function IsCompatible(ByVal data As GridViewColumn, ByVal context As Object) As Boolean
            Return TypeOf data Is TimePickerColumn AndAlso (TypeOf context Is GridDataRowElement OrElse TypeOf context Is GridNewRowElement)
        End Function

    End Class

    Public Class TimePickerColumn
        Inherits GridViewDataColumn
        Public Sub New(ByVal fieldName As String)
            MyBase.New(fieldName)
        End Sub

        Public Overrides Function GetCellType(ByVal row As GridViewRowInfo) As Type
            If TypeOf row Is GridViewDataRowInfo Then
                Return GetType(TimePickerCellElement)
            End If
            Return MyBase.GetCellType(row)
        End Function

    End Class

 


Nadya | Tech Support Engineer
Telerik team
 answered on 20 Feb 2020
7 answers
739 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
731 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
162 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.3K+ 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
210 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
260 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
131 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
447 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
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
ScrollablePanel
DataEntry
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?