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; }
}
}
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();
}
}
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);
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
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
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
Hi,
Can I set hover style for link in html?
it's style not working:
a:hover {
color: #3ca9f6
}
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?
1.
protected
override
void
SetContentCore(
object
value)
2.
{
3.
this
.RowElement.VisualCells ...
// this contains only the visible cells
4.
}