I've been trying to display a System.Drawing.Image (obtained from live camera feed snapshot) dynamically in a DataList control with asp:Image control but not having any success.
I was looking at RadBinaryImage to see if this is a viable option.
The images to be displayed are variable (aka dynamic number of images not static number/count) so I may have 5 images or 10 images or 7 images that are all System.Drawing.Image types. I want to display those images in a Grid or DataList.
<asp:DataList ID="cameras" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" RepeatLayout="Table">
<ItemTemplate>
<asp:Image ID="cameraX" runat="server" />
</ItemTemplate>
</asp:DataList>
In the ItemDataBound event handler I convert to byte array and assign to asp:Image ImageUrl ... but this results in nothing being displayed. No errors, just nothing displayed. Would RadBinaryImage be a solution?
protected void cameras_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
{
Models.Facility.Camera camera = e.Item.DataItem as Models.Facility.Camera;
Image img = GetImage(camera);
MemoryStream ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
System.Web.UI.WebControls.Image imgControl = (System.Web.UI.WebControls.Image)e.Item.FindControl("camera");
var base64Data = Convert.ToBase64String(ms.ToArray());
imgControl.ImageUrl = "data:image/jpg;base64," + base64Data;
}
hello, I'm using RadSpreadsheet and didn't figure out how to do the following:
1. In SpreadsheetTool Name="InsertCells", Can I change the default tool that appear to be other than "Add Column left"?
2. When dragging down a cell it behaves like "Copy cell" , but if the cell include content that ends with a digit the dragging will cause a "Fill Series" behavior, which means the new cell will have the prev cell value increased by 1, is there a way to control this default behavior and config it to be only "copy cell" with no increments??
Thanks,
Efrat
I allow the user to create in runtime, zones (my sections) and docks.
<asp:Repeater ID="repSections" runat="server" OnItemDataBound="repSections_ItemDataBound">
<ItemTemplate>
<asp:Panel ID="panelSection" runat="server" CssClass="container">
A RadDockZone(section) and it's RadDocks are injected here in runtime...
</asp:Panel>
</ItemTemplate>
</asp:Repeater>
This repeater is populated from database and zones and it's docks injected in runtime, assigning the DockPositionChanged event to each of the created docks. Since I also inject in runtime, controls before and after each zone to manage it (Add, configure, move up/down) and I want them to postback using ajax, I'm configuring the ajax behavior in the ItemDataBound event of the Repeater:
protected void repSections_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
LinkButton linkbtAddNormalSection = e.Item.FindControl("linkbtAddNormalSection") as LinkButton;
linkbtAddNormalSection.CommandArgument = section.Id.ToString();
AjaxSetting ajaxSetting_linkbtAddNormalSection = new AjaxSetting();
ajaxSetting_linkbtAddNormalSection.AjaxControlID = linkbtAddNormalSection.UniqueID;
ajaxSetting_linkbtAddNormalSection.EventName = "Click";
ajaxSetting_linkbtAddNormalSection.UpdatedControls.AddRange(new AjaxUpdatedControlsCollection()
{
new AjaxUpdatedControl(repSections.UniqueID,""),
new AjaxUpdatedControl(panelNosections.UniqueID,""),
new AjaxUpdatedControl(radNotification.UniqueID, "")
});
ajaxManagerProxy.AjaxSettings.Add(ajaxSetting_linkbtAddNormalSection);
...
}
Because of this, RadAjax places a RadAjaxPanel that includes all the created zones inside of the repeater causing the DockPositionChanged event to function in ajax mode. That's fine, and works great since avoids a regular postback each time a dock changes position.
The issue is that I need to show a RadNotification that is outside the repeater and consequently, outside that RadAjaxPanel and I can't show it from the DockPositionChanged event.
Any suggestion to overcome this?
Thank you!
I have this control with EnableDescriptionField="true". The issue is if I enter the html contents in this description field or subject field and hit either Save or Cancel. the attached error happens. Is there a way to strip off the html tags or allow the html inputs to be entered?
I also tested this with the demo below. It did not work either.
https://demos.telerik.com/aspnet-ajax/scheduler/examples/month-view/defaultvb.aspx
Thanks,
Bob
The subject pretty much says it all...how do you get RadSpreadsheet to act like Excel when trying to auto resize all columns. In Excel you select the upper left most cell, to the left of A1 and it will select the whole spreadsheet. Next you put the cursor between 2 of the columns and get the "resize" cursor then you double click and all the columns will auto resize according to content.
How do I get a RadSpreadsheet to do that, or is that not an available function?
Language="VB"
<%@ Register Src="../App_API/PatientInfo.ascx" TagName="PatientInfo" TagPrefix="ucl" %>
<ucl:PatientInfo ID="PatientInfoUserControl" runat="server" />
In CodeBehind
Dim AssignedPathologist As RadComboBox = CType(PatientInfoUserControl.FindControl("AssignedPathologistRadComboBox"), RadComboBox)
Dim AssignedPathologistText As String = AssignedPathologist.text
Dim AssignedPathologistValue As String = AssignedPathologist.value
Getting : error BC30456: 'value' is not a member of 'Telerik.Web.UI.RadComboBox'.
Hi,
The Gantt tooltip's time format differs from the format in the task dialog.
Please refer to attached screenshots...can this be changed?
Marc
<
telerik:RadPanelBar
runat
=
"server"
ID
=
"pbSupplierAgreements"
AllowCollapseAllItems
=
"true"
OnItemDataBound
=
"pbSupplierAgreements_ItemDataBound"
ExpandMode
=
"SingleExpandedItem"
Width
=
"100%"
DataValueField
=
"ID"
DataTextField
=
"SupplierCode"
DataTextFormatString
=
"Supplier: {0}"
>
<
ItemTemplate
>
<
telerik:RadPanelItem
>
<
Items
>
<
telerik:RadPanelItem
>
<
ItemTemplate
>
<
e:SupplierAgreementView
ID
=
"SupplierView"
runat
=
"server"
/>
</
ItemTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
</
telerik:RadPanelItem
>
</
ItemTemplate
>
</
telerik:RadPanelBar
>