Telerik Forums
UI for WinForms Forum
1 answer
179 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
82 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
329 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
142 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
153 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
3 answers
567 views

Hi

i use link bellow to produce custom filtering in MulticolumnCombobox  and it work well

https://www.telerik.com/support/kb/winforms/details/use-custom-filtering-to-search-in-radmulticolumncombobox

but i want have filtering row in in grid too. what can i do to achieve this?

when i enabe and ShowFilterRow in grid and try to filter in filter row nothing happen and the popup close. could you please give me a c# sample

code to achive both filter by row filter and filter by all columns?

thanks

Nadya | Tech Support Engineer
Telerik team
 answered on 17 Feb 2020
2 answers
77 views

Hi,

Can I set hover style for link in html?

it's style not working:

a:hover {
            color: #3ca9f6
        }

Sergey
Top achievements
Rank 2
 answered on 17 Feb 2020
1 answer
110 views

     Hi, I've been researching and trying to understand the custom filtering, but can't seem to understand it. I currently have a gridview with 5 columns.  I plan to have 4 text box and 1 dropdown that I want to use to filter the gridview.   I have tried the custom filtering from (https://www.telerik.com/videos/winforms/filtering-and-expressions-in-radgridview-for-winforms) but this is more on the style and doesn't hide the non-filtered rows.  I have tried to understand the custom filtering row in Demo application >> GridView >> Filtering >> Custom Filtering Row however, this is a bit too complicated with the usercontrols...  I've attached what my page looks like...  I can't seem to get the filtering on this page correct.  Can someone help?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Feb 2020
6 answers
238 views
Hi there,

I'm currently working on an application which needs an ImageColumn with two small checkboxes (without any text). The CheckState of the checkboxes is based on cell values. The clue is, that these cell values are hidden.
I've seen in your documentation and in a few other threads, that the override method SetContentCore is to set the content based on the row data. Unfortunately, I couldn't find anything to get the data from hidden cells in the current row.

1.protected override void SetContentCore(object value)
2.{
3.    this.RowElement.VisualCells ... // this contains only the visible cells
4.}

I'm wondering if it's possible to get the hidden cell values as well or if I could pass any data? One way I thought was to show the hidden cells, create my custom cell and then hide the cells again. But I think this is pretty ugly and I'm not even sure if it would work properly.

Is there any solution for this?

Kind Regards,
Roman
Roman
Top achievements
Rank 1
Iron
 answered on 14 Feb 2020
7 answers
2.1K+ views
Hello:

In our validation forms, we like to preselect the currently choosen item. I have the code written for selecting the corresponding BindingSource.Position. This automatically selects the row. How can I force the GridView to scroll to the currently selected row?

Thanks,
Travis
Imane
Top achievements
Rank 1
 answered on 13 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
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?