I have a grid that will bind upon choosing date with RadDatePicker and code in RadComboBox.
I have set the combo box like this:
<telerik:RadComboBox DropDownAutoWidth="Enabled" ID="cboCode" runat="server" AutoPostBack="true" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"></telerik:RadComboBox>
When I choose more that 4 options, click the Search button, the grid shows the searched data but when i click the export to excel button, it exported nothing.
Meanwhile, if I choose less than 4 options, the data did get exported in the excel - please refer image attached.
Below is the code for export setting:
<ExportSettings ExportOnlyData="true" Excel-Format="Biff" IgnorePaging="true" ></ExportSettings><MasterTableView AllowMultiColumnSorting="true" DataKeyNames="some column name here" AllowNaturalSort="true" CommandItemDisplay="Top" UseAllDataFields="true">

Hi,
In the latest 2019.3.917 release there is a scripting error if setting animation duration to zero. It happens on open. This error is also in your demo (if setting duration to 0):
https://demos.telerik.com/aspnet-ajax/datepicker/overview/defaultcs.aspx
This scripting error was not present in earlier versions.
The effect of this error is that the opened event isn't raised!
Regards
Andreas

I'm trying to create a scenario where the upload must contain exactly 9 files and a way to validate that each one exists.
Is there a way to grab the process, perhaps client side that would allow me perform this check? The methods I've found so far seem to operate on one file uploaded at a time rather than being to examine the entire batch before sending the files. Thanks.

protected void grdAssetImport_ItemDataBound(object sender, GridItemEventArgs e){ if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem edit = (GridEditableItem)e.Item; TextBox txt = (TextBox)edit["AssetTypeName"].Controls[0]; txt.Visible = false; DropDownList rddl = new DropDownList(); PortalView.LookupListBO list = LookupListBA.LookupList_GetByKey(DB_Context, "SITE_ASSETTYPE_LIST", UtilityBA.IsActiveChoice.Active); List<PortalView.LookupListItemBO> oList = LookupListBA.LookupListItem_GetList_ByLookupListId(DB_Context, list.LookupListId, (Guid)Current.Employee.SiteId); var AssetList = oList.Select(l => new { AssetTypeName = l.Name }); rddl.ID = "ddlAssetTypeName";
rddl.AutoPostBack = false; rddl.DataSource = AssetList; rddl.DataTextField = "AssetTypeName"; rddl.DataValueField = "AssetTypeName"; rddl.DataBind(); edit["AssetTypeName"].Controls.Add(rddl); }}
I try to use the follow update command, but neither attempt to capture the dropdownlist works and when it gets to the actual column it only sees the textbox in the column and never finds the dropdownlist at all:
protected void grdAssetImport_UpdateCommand(object sender, GridCommandEventArgs e){ GridEditableItem editedItem = e.Item as GridEditableItem; GridEditManager editMan = editedItem.EditManager; foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns) { GridEditableItem editableItem = e.Item as GridEditableItem; DropDownList ddl = editableItem.FindControl("ddlAssetTypeName") as DropDownList; if(ddl != null) { string assetType = ddl.SelectedValue; } DropDownList ddl2 = editableItem["AssetTypeName"].Controls[0] as DropDownList; if(ddl2 != null) { string assetType = ddl.SelectedValue; } if (column is IGridEditableColumn) { IGridEditableColumn editableCol = (column as IGridEditableColumn); if (editableCol.IsEditable) { IGridColumnEditor editor = editMan.GetColumnEditor(editableCol); string editorText = "unknown"; object editorValue = null; if (editor is GridTextColumnEditor) { editorText = (editor as GridTextColumnEditor).Text; editorValue = (editor as GridTextColumnEditor).Text; } if (editor is GridBoolColumnEditor) { editorText = (editor as GridBoolColumnEditor).Value.ToString(); editorValue = (editor as GridBoolColumnEditor).Value; } if (editor is GridDropDownColumnEditor) { editorText = (editor as GridDropDownColumnEditor).SelectedText + "; " + (editor as GridDropDownColumnEditor).SelectedValue; editorValue = (editor as GridDropDownColumnEditor).SelectedValue; } try { DataRow[] changedRows = this.AssetGridDataSource.Select("Id = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Id"].ToString()); changedRows[0][column.UniqueName] = editorValue; this.AssetGridDataSource.AcceptChanges(); GetSearchColumns(); } catch (Exception ex) { // Label1.Text = "<strong>Unable to set value of column '" + column.UniqueName + "'</strong> - " + ex.Message; e.Canceled = true; break; } } } }}
Any assistance is greatly appreciated as I am on day 4 of trying to get this working.

I have an auto-generated radgrid bound to a table. In Edit Mode, in the code-behind, I have successfully created a drop-down list to replace the default a textbox for ONE column.
This drop down list pulls its list items from a second table and data source. The FAILURE POINT is that the selected item from the drop down list is not SAVED to the subject tablet record. The other columns will update and save properly.
The code behind that WORKS for creating the substitute drop-down is here, with my notation as to where I am GUESSING I need to do something correctly. I have tried every possible forum suggestion, but the source of my pain is that the value in the drop-down list is not being passed to the actual column value on update. Been stuck for several hours on this one. Probably something silly that I will kick myself for, but not the first time.
<p></p>protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem edit = (GridEditableItem)e.Item; edit["EmployeeRecordID"].Visible = false; SqlConnection con = new SqlConnection(MasterConnectionString); String queryString = "SELECT GroupLabel From Groups"; con.Open(); SqlDataAdapter dr = new SqlDataAdapter(queryString, con); DataTable dt = new DataTable(); dr.Fill(dt); con.Close(); ddledit = (GridEditableItem)e.Item; txt = (TextBox)ddledit["GroupAssociation"].Controls[0]; //txt.Visible = false; DropDownList droplist = new DropDownList(); droplist.DataSource = dt; droplist.DataTextField = "GroupLabel"; droplist.DataValueField = "GroupLabel"; droplist.DataBind(); ddledit["GroupAssociation"].Controls.Add(droplist); } } protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e) { //this is where I THINK my failure point is, but not sure. }
Hi,
we have an application that uses the RadGrid.
Our customer has set compatibility mode for the entire domain (evidently through group policy).
In compatibility mode our application has rendering problems, so we added the directive <add name = "X-UA-Compatible" value = "IE = edge" /> in IIS to force IE11 to work in standard mode.
Now we have a problem: the radgrid shows the header not correctly aligned with the content of the grid.
It seems that bringing IE from compatibility mode to standard mode is not the same as working directly in standard mode.
Did you experienced this kind of problem?
Thanks in advance for the support

I am converting an old application that stores its images as base64strings in a SQL Server database.
I am trying to add the images to the gallery. Pointing the ImageURL to a base64 string works fine, but not the ThumbnailURL.
public static string ImageToBase64(System.Drawing.Image image, System.Drawing.Imaging.ImageFormat format)
{
string returnString = "";
System.IO.MemoryStream ms = new MemoryStream();
image.Save(ms, format);
byte[] imageBytes = ms.ToArray();
returnString = "data:image;base64," + Convert.ToBase64String(imageBytes);
return returnString;
}
public static Telerik.Web.UI.ImageGalleryItem ImageBase64(byte[] BlobData, string ImageTitle)
{
Telerik.Web.UI.ImageGalleryItem returnImage = new Telerik.Web.UI.ImageGalleryItem();
System.Drawing.Image img = null;
System.IO.MemoryStream mem = new MemoryStream();
mem.Write(BlobData, 0, BlobData.Length);
mem.Seek(0, SeekOrigin.Begin);
img = System.Drawing.Image.FromStream(mem);
returnImage.Title = ImageTitle;
returnImage.ThumbnailUrl = ImageToBase64(SizedImage(img, 100, 75), System.Drawing.Imaging.ImageFormat.Jpeg);
returnImage.ImageUrl = ImageToBase64(SizedImage(img, 800, 600), System.Drawing.Imaging.ImageFormat.Jpeg);
return returnImage;
}
returnImage.ImageUrl works perfectly fine.
public static System.Drawing.Bitmap SizedImage(System.Drawing.Image img, int dispWidth, int dispHeight)
{
double scale = 1.0, hScale = 1.0;
double imgWidth = img.Width;
double imgHeight = img.Height;
if (imgWidth > dispWidth)
scale = dispWidth / imgWidth;
if (imgHeight > dispHeight)
hScale = dispHeight / imgHeight;
if (hScale < scale)
scale = hScale;
int imgw = Convert.ToInt32(imgWidth * scale);
int imgh = Convert.ToInt32(imgHeight * scale);
return new System.Drawing.Bitmap(img, imgw, imgh);
}
<telerik:RadGrid runat="server" ID="grdImportData" RenderMode="Lightweight" AllowPaging="true" PageSize="10" OnNeedDataSource="grdImportData_NeedDataSource" OnPageIndexChanged="grdImportData_PageIndexChanged" OnUpdateCommand="grdImportData_UpdateCommand" OnDeleteCommand="grdImportData_DeleteCommand" OnItemCommand="grdImportData_ItemCommand" OnItemDataBound="grdImportData_ItemDataBound" AllowSorting="False" AlternatingItemStyle-BackColor="#f5f5f5" ItemStyle-BackColor="#ffffff" ColumnWidth="Auto" HorizontalAlignment="Stretch" Width="100%"> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="1" EnableVirtualScrollPaging="true"></Scrolling> <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" EnableRealTimeResize="true" /> </ClientSettings> <MasterTableView EditMode="InPlace" DataKeyNames="Id"> <Columns> <telerik:GridEditCommandColumn HeaderStyle-Width="75px" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right"/> <telerik:GridTemplateColumn HeaderStyle-Width="50px"> <ItemTemplate> <asp:LinkButton runat="server" CommandName="Delete"><i class="icon s7-junk grid-edit-icon"></i></asp:LinkButton> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView></telerik:RadGrid>
I then try to add a TemplateColumn, EditTemplateColumn and RadDropdownlist programmatically like below:
protected void grdImportData_ItemDataBound(object sender, GridItemEventArgs e){ if(ImportType == "CLEARGISTIX_ASSETS") { if (e.Item is GridDataItem) { string templateColumnName = "AssetTypeName"; GridTemplateColumn templateColumn = new GridTemplateColumn(); templateColumn.ItemTemplate = new MyTemplate(templateColumnName); templateColumn.EditItemTemplate = new MyEditTemplate(); templateColumn.HeaderText = templateColumnName; templateColumn.DataField = "AssetTypeName"; if (e.Item.IsInEditMode) { RadDropDownList rddl = new RadDropDownList(); PortalView.LookupListBO list = LookupListBA.LookupList_GetByKey(DB_Context, "SITE_ASSETTYPE_LIST", UtilityBA.IsActiveChoice.Active); List<PortalView.LookupListItemBO> oList = LookupListBA.LookupListItem_GetList_ByLookupListId(DB_Context, list.LookupListId, (Guid)Current.Employee.SiteId); rddl.ID = "dropdownlist1"; rddl.DataSource = oList; rddl.DataTextField = "Name"; rddl.DataValueField = "LookupListItemId"; } grdImportData.MasterTableView.Columns.Add(templateColumn); } }}public class MyTemplate : ITemplate{ private string colname; protected Label lControl; public MyTemplate(string cName) { colname = cName; } public void InstantiateIn(System.Web.UI.Control container) { lControl = new Label(); lControl.ID = "lControl"; lControl.DataBinding += new EventHandler(lControl_DataBinding); container.Controls.Add(lControl); } public void lControl_DataBinding(object sender, EventArgs e) { Label l = (Label)sender; GridDataItem container = (GridDataItem)l.NamingContainer; l.Text = ((DataRowView)container.DataItem)[colname].ToString() + "<br />"; }}public class MyEditTemplate : IBindableTemplate{ public void InstantiateIn(Control container) { GridEditFormItem item = ((GridEditFormItem)(container.NamingContainer)); RadDropDownList drop = new RadDropDownList(); drop.ID = "dropdownlist1"; container.Controls.Add(drop); } public System.Collections.Specialized.IOrderedDictionary ExtractValues(System.Web.UI.Control container) { OrderedDictionary od = new OrderedDictionary(); od.Add("LookupListItemId", ((RadDropDownList)(((GridEditFormItem)(container)).FindControl("dropdownlist1"))).DataValueField); return od; }}
When I click on the edit button, I error: 'Unable to cast object of type 'Telerik.Web.UI.GridDataItem' to type 'Telerik.Web.UI.GridEditFormItem'.' on this line:
od.Add("LookupListItemId", ((RadDropDownList)(((GridEditFormItem)(container)).FindControl("dropdownlist1"))).DataValueField);I notice that it never his the InstaniateIn code at all.
Any assistance is greatly appreciated.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="cmbHR_DOCS_ID_START" UpdatePanelRenderMode="Inline" /> <telerik:AjaxUpdatedControl ControlID="cmbHR_DOCS_ID" UpdatePanelRenderMode="Inline" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager>$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(x);
