I am using the simple code below to load and image from SQL, then save it back to the Image datatype column.
I am able to load the image, but when I perform ANY edit feature (from the RadImageEditor control) the size of the image (relative size on disk in bytes) increases over 10x the original image. Eventually it will consume all the memory and crash the application. This behavior does not happen if I load a fixed image directly from disk.
The two attached images show the size of the image after immediately loading it, then the size of the image after performing a single Rotate 90 degrees.
I cannot find any example of either loading an image from a DB nor saving to DB. Please review and provide any correction to loading and saving images (blob, image) from SQL, or please provide a simple example of loading and saving a SQL image.
FYI: objAttach.ImageBlob is defined as Byte()
Private Sub frmAttachmentViewer_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.lblMessage.Text = ""
mbImageChanged = False
Dim ms As MemoryStream = New MemoryStream(objAttach.ImageBlob, 0, objAttach.ImageBlob.Length)
Dim img As Image = Image.FromStream(ms)
Me.RadImageEditor1.OpenImage(img)
lblImgSize.Text = "Size: " & ms.Length & " KB"
End Sub
Private Sub RadImageEditor1_CurrentImageChanged(sender As Object, e As ImageChangedEventArgs) Handles RadImageEditor1.CurrentImageChanged
Dim ms As New MemoryStream()
Me.RadImageEditor1.SaveImage(ms)
lblImgSize.Text = "Size: " & ms.Length & " KB"
End Sub
Hello,
1. In the attached picture, the localization strings of the items with the red arrow are not in the LocalizationProvider. How can I localize them?
2. How can I turn off the DropDown button shown with the blue arrow in the picture?
Kind regards.
It's great being able to set the backcolor for userinfo() values.
However, the ForeColor property is missing or is hidden...
It appears that the "Hidden" Forecolor property is set to White.
Consequently, one cannot set a contrasting forecolor for the given backcolor that is used.
For Example:
Private user1 As UserInfo = New UserInfo()
user1.FirstName = _UserFirstName
user1.LastName = _UserLastName
User1.BackColor = Color.LightYellow
What is needed now for the contrasting ForeColor would be this:
User1.ForeColor = Color.Black
Currently, if the backcolor is set to a very light back color - one cannot read the White ForeColor text
Hello All,
I am trying to enable scroll bar for the radsplitcontainer and I am having hard time. I set autoscroll to true but the scroll bar doesn't show up. I am able to get the scroll bar for the individual split panels. Is there a way I can get the scroll bar for the whole panel instead of the individual splits. basically, I split it into three panels and trying to stretch my controls as the size grows but on higher resolutions I may need scrollbars and that's the reason I want the scrollbars enabled. I have attached my sample application. Can I get some help please.
Hi,
I am using the radSchduler for a new project. I encountered and error when trying to save a modified appointment.
"Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Hi
is there any way to change the font of the add new row in WinForms grid view
thanks in advance
regards
Hi, how do I resolve this error? Please see attachement.
RadScheduler: Error Could not find Schema information for the attribute 'urn:schemas-microsoft.com:xml-msdata:UseCurrentLocale'.
Thanks and best regards,
Dominic
I want to implement my own version of load on demand feature for RadCheckedDropDownList (if there's already one that meets my requirements then sorry for posting).
When the RadCheckedDropDownList's OnKeyUp event happens for alphanumeric char I want to send async request to my ASP.NET Web Service - when webservice's request is completed I want to either (both options are viable for me):
a) add new items (that are not already existing) to the DataSource,
b) save somewhere items that are already checked and load items to the DataSource,
and show Popup scrolled to the item that is matching the text that already user inserted into RadCheckedDropDownList's RadCheckedDropDownListEditableAreaElement.
My code so far:
private void LoadOnDemandCompleted( object sender, GetDropDownMenuItemsPagedCompletedEventArgs e )
{
//RadCheckedDropDownListOnDemand - my class that inherits RadCheckedDropDownList
if ( e.Error != null || e.Result == null || (int)e.UserState != this.RadCheckedDropDownListOnDemand.RequestId )
{
//WS call errored out, nothing was returned, or the request number is not matching
return;
}
if ( !( this.RadCheckedDropDownListOnDemand.DataSource is List<RadCheckedListDataItem> mainDataSource ) )
return;
//Properties explanation:
//Value == string to display
//Id == id in database
//ChoiceOrder - order in which the RadCheckedListDataItem should appear -> lower ChoiceOrder means it is higher on the list
var itemsFiltered = e.Result.Select( re => new RadCheckedListDataItem( re.Value )
{
Value = re.Id,
Tag = re.ChoiceOrder,
} )
.Where( item => !mainDataSource.Any( mainDataSourceItem => (int)item.Value == (int)mainDataSourceItem.Value ) )
.ToList();
//don not want to add items that are already existing in
if ( itemsFiltered.Count > 0 )
{
mainDataSource.AddRange( itemsFiltered );
//want to refresh item list for CheckedDropDownListElement
if ( !( this.RadCheckedDropDownListOnDemand.CheckedDropDownListElement.DataSource is List<RadCheckedListDataItem> listElementDataSource ) )
return;
listElementDataSource.AddRange( itemsFiltered );
//this does not show the newly added items
this.RadCheckedDropDownListOnDemand.CheckedDropDownListElement.ShowPopup();
}
}