From 2 monts ago i´ve developing with this framework or suite package telerik, while i was program some aspx pages i founded some stop times for get or mapping the radcontrols from javascript file my great reason for write this post !!
for mapping a control on our javascript we have put the next propertie ClientMode="Static" like
<telerik:RadTimePicker ClientIDMode="Static" DateInput-DateFormat="HH:mm:ss" Style="position:absolute; top:220px; left:500px" ID="_dtpMonthlyHour" runat="server">
</telerik:RadTimePicker>
and our javascript file mike this //.
var _dtpMonthlyHour=$telerik.findDatePicker("_dtpMonthlyHour");
with this line of code we can get all we want about this radControl !!

Scenario:
1. Change Editor to the "HTML" mode.
2. Paste the following text:
<span class="button primary">
<span style="color: red">
test
</span>
</span>
3. Change to the "Design" mode.
4. Change to the "HTML" mode.
Actual Result:
<span class="button primary" style="color: red;">
test
</span>
Two <span> tags merged into the one. Is it expected?
<telerik:RadGrid ID="RadGrid1" runat="server" PageSize="5" Width="75%" AllowSorting="True" AllowFilteringByColumn="True" AllowMultiRowSelection="True" AllowPaging="True" ShowGroupPanel="True" GridLines="None" AutoGenerateColumns="True" ShowFooter="True" OnItemCommand="testcomm" OnGroupsChanging="testgroup" OnColumnsReorder="testreorder" OnNeedDataSource="RadGrid1_NeedDataSource" Skin="WebBlue" EnableViewState="True" > <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True"> <Resizing AllowColumnResize="true" /> </ClientSettings> <GroupingSettings ShowUnGroupButton="true" /> </telerik:RadGridprotected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { ObservableCollection<PersonDTO> col = new ObservableCollection<PersonDTO>(); if (ViewState["RadGrid1_DataSource"] != null) { col = (ObservableCollection<PersonDTO>)ViewState["RadGrid1_DataSource"]; } else { col = GridDataSource2(); } RadGrid1.DataSource = col; } private void LoadViewState() { ObservableCollection<PersonDTO> col = new ObservableCollection<PersonDTO>(); if (ViewState["RadGrid1_DataSource"] == null) { // collection isn't in view state, so we need to load it from scratch. if (RadGrid1.DataSource == null) { col = GridDataSource2(); } else { col = (ObservableCollection<PersonDTO>)RadGrid1.DataSource; } if (col != null) { ViewState.Add("RadGrid1_DataSource", col); } } } protected void testcomm(object o, Telerik.Web.UI.GridCommandEventArgs e) { LoadViewState(); } protected void testreorder(object o, Telerik.Web.UI.GridColumnsReorderEventArgs e) { LoadViewState(); } protected void testgroup(object o, Telerik.Web.UI.GridGroupsChangingEventArgs e) { LoadViewState(); }I create string variable "onEditUser" to be filled with a cell value (Label) when "Edit" command is fired. It is assigned correctly when The Edit button is clicked but when OnItemCommand() is recalled to perform Update Command, the variable assignment is removed and onEditUser become null.
Is there any help why this occurs, and what is the solution? (I need to use this variable in another method)
public partial class EditUsers : System.Web.UI.Page{string onEditUser; public void GridItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == RadGrid.UpdateCommandName || e.CommandName == RadGrid.PerformInsertCommandName) { GridEditableItem item = e.Item as GridEditableItem; RadComboBox userTypecombo = (RadComboBox)item.FindControl("UserTypeRadComboBox"); string userType = userTypecombo.SelectedItem.Text; SqlDataSource1.InsertParameters["UserType"].DefaultValue = userType; SqlDataSource1.UpdateParameters["UserType"].DefaultValue = userType; } if (e.CommandName == RadGrid.EditCommandName) { GridItem item = e.Item; Label userNameLB = (Label)item.FindControl("UserNameLabel"); onEditUser = userNameLB.Text; } }
Hi,
I am using the Advanced Template for my appointment and the form contains a buttons with command names of "Insert" and "Update". I can successfully trigger these events and everything works well as long as the user enters all valid information. The command event code behind contains a lot of server-side validation.
If the validation fails at any point, the validation displays the appropriate error messages on the screen as expected. However, the advanced form closes and the day view calendar reappears. Is is extremely annoying to my users as they have entered a lot of information. They then have to recreate the entire appointment all over again.
Is there a way to cancel the event so that the advanced for stays on the page? There does not seem to be an e.Cancel setting as there is in the FormCreating event and I have searched the forums as well as google in general without locating a solution.
Thanks


Hi,
i tried to make a gallery like this link
http://demos.telerik.com/aspnet-ajax/lightbox/examples/client-data-source-binding/defaultvb.aspx?show-source=true
but i can't.
i think this code is not complete or need something more then this code on this page.
i want load picture from database and bind on listview and then when i click on picture show lightbox like sample of this code
I 've uploaded the project . you can download it from this link : http://s000.tinyupload.com/index.php?file_id=38114169756156525387
FilesName: lightbox.zip
Filesize: 23.638 MB
please help me to complete my source code.
thank you

Hi,
When I'm setting the "GridType" property to "Fluid", it isn't fitting the full width on Chrome.
It works as expected on IE8 but not with Chrome, I always have a left and right margin.
Is there a way to fix this issue ?
Thanks, Rémi.
Hi
I am in the process of moving my site built with Q3 2013 control set and running on iis 7.0 to a new server running iis 7.5. In both case the server is windows server 2008 R2.
The problem is that after transferring all the files, including web.config and the telerik dlls in /bin to the new server, the ajax function has stooped working. symptoms: drop list does not display, buttons are not active and do not submit forms etc .
I did upload a standard ajax toolkit menu to make sure it was not inability to run ajax per se, and it is OK.
I have a feeling the answer lies in web.config, but I try to leave well alone if possible, since this is a legacy site and I don't plan any development work on it; i just want to relocate to a new server!
Can anyone suggest where the problem might lie, or how I can find out what it is?
Thanks
Clive
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"> <%-- <script type="text/javascript"> var manager; Sys.Application.add_load(function () { manager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>'); }) </script> <script type="text/javascript"> function gridCommand(sender, args) { alert(args.get_commandName()); if (args.get_commandName() == "DownloadAttachment") { manager.set_enableAJAX(false); setTimeout(function () { manager.set_enableAJAX(true); }, 0); } } </script>--%> <script type="text/javascript"> function onRequestStart(sender, args) { if (args.get_eventTarget().indexOf("Button") >= 0) { args.set_enableAjax(false); } } </script> </telerik:RadCodeBlock> <%--<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="gridProjectManagement"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="gridProjectManagement"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager>--%><telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel> <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecorationZoneID="demo" DecoratedControls="All" EnableRoundedCorners="false" /> <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel2" ClientEvents-OnRequestStart="onRequestStart" CssClass="div-container no-bg" LoadingPanelID="RadAjaxLoadingPanel1"> <telerik:RadGrid ID="gridProjectManagement" GridLines="None" runat="server" AllowAutomaticDeletes="false" AllowAutomaticInserts="True" AllowSorting="true" OnItemCreated="gridProjectManagement_ItemCreated" OnPreRender="gridProjectManagement_PreRender" AllowAutomaticUpdates="True" AutoGenerateColumns="False" OnBatchEditCommand="gridProjectManagement_BatchEditCommand" OnItemCommand="gridProjectManagement_ItemCommand" OnNeedDataSource="gridProjectManagement_NeedDataSource" OnItemDataBound="gridProjectManagement_ItemDataBound" > <ExportSettings ExportOnlyData="true" HideStructureColumns="true" OpenInNewWindow="true" IgnorePaging="true"><Excel Format="Html" /></ExportSettings> <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" Font-Size="Small" CommandItemSettings-ShowAddNewRecordButton="false" CommandItemSettings-ShowRefreshButton="false" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False" > <CommandItemSettings ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowAddNewRecordButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true" /> <BatchEditingSettings EditType="Cell" OpenEditingEvent="Click" /> <%-- <SortExpressions> <telerik:GridSortExpression FieldName="PerspModel_ID" SortOrder="Descending" /> </SortExpressions>--%> <Columns> <telerik:GridBoundColumn DataField="ID" ForceExtractValue="Always" Display="false" HeaderText="ID" UniqueName="ID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Activity" SortExpression="Activity" HeaderStyle-Width="150px" HeaderText="Activity" UniqueName="Activity"> </telerik:GridBoundColumn> <telerik:GridNumericColumn DataField="Estimate" HeaderStyle-Width="80px" AllowSorting="false" DataType="System.Decimal" DecimalDigits="1" HeaderText="Estimate(hours)" SortExpression="Estimate" UniqueName="Estimate"> </telerik:GridNumericColumn> <%-- <telerik:GridTemplateColumn ColumnEditorID="EstimateAssumptions" ItemStyle-CssClass="breakWord120" UniqueName="EstimateAssumptions" ItemStyle-Width="100px" HeaderStyle-Width="150px" HeaderText="Estimate Assumptions"> <ItemTemplate> <%# Eval("EstimateAssumptions")%> </ItemTemplate> <EditItemTemplate> <telerik:RadTextBox ID="txtEditEstimateAssumptions" Height="50px" Wrap="true" TextMode="MultiLine" ToolTip='<%# Eval("EstimateAssumptions")%>' runat="server" Text='<%# Eval("EstimateAssumptions")%>'></telerik:RadTextBox> </EditItemTemplate> </telerik:GridTemplateColumn>--%><%-- <telerik:GridBoundColumn DataField="EstimateAssumptions" ItemStyle-CssClass="breakWord120" SortExpression="EstimateAssumptions" HeaderStyle-Width="150px" HeaderText="Estimate Assumptions" UniqueName="EstimateAssumptions"> </telerik:GridBoundColumn>--%> <telerik:GridAttachmentColumn EditFormHeaderTextFormat="Upload File:" HeaderStyle-Width="150px" HeaderText="Attachment" AttachmentDataField="Attachment" UploadControlType="RadAsyncUpload" AttachmentKeyFields="ID" FileNameTextField="FileName" DataTextField="FileName" UniqueName="Attachment"> </telerik:GridAttachmentColumn> </Columns> </MasterTableView> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="300px" SaveScrollPosition="true"></Scrolling> <%-- <ClientEvents OnBatchEditOpened="OnBatchEditOpened" OnBatchEditOpening="BatchEditOpening" />--%> <%--<ClientEvents OnCommand="gridCommand"></ClientEvents>--%> </ClientSettings> </telerik:RadGrid> </telerik:RadAjaxPanel>using System;using System.Linq;using System.Collections.Generic;using System.Collections;using System.Web.UI.WebControls;using System.IO;using Telerik.Web.UI;using RetirementAcceleratorTool.DataAccess;using RetirementAcceleratorTool.UIClass;namespace RetirementAcceleratorTool.UserControls{ public partial class ProjectManagementROIControl : System.Web.UI.UserControl { private EntitiesModel _dataContext; protected EntitiesModel DbContext { get { if (_dataContext == null) { _dataContext = new EntitiesModel(); } return _dataContext; } } public override void Dispose() { if (_dataContext != null) { _dataContext.Dispose(); } base.Dispose(); } private int? appname; public int? AppName { get { if (Session["AppName"] != null) { return Convert.ToInt32(Session["AppName"]); } else return null; } } public List<ApplicationName> ListApplicationName { get { var list = new List<ApplicationName>(); using (var db = new EntitiesModel()) { list = db.ApplicationNames.Where(x => x.InScope == true && x.IsRetirementCandidate == true).ToList(); } return list; } } public List<ActivityArchivalSupportPM> ListActivityArchivalSupportPM { get { var list = new List<ActivityArchivalSupportPM>(); using (var db = new EntitiesModel()) { list = db.ActivityArchivalSupportPMs.Where(x => x.IsProjectManagement == true).ToList(); } return list; } } protected void Page_Load(object sender, EventArgs e) { } protected void gridProjectManagement_ItemCreated(object sender, GridItemEventArgs e) { //if (e.Item is GridDataItem) //{ // GridDataItem dataItem = e.Item as GridDataItem; // GridAttachmentColumn ibtnAddToCart = (GridAttachmentColumn)(dataItem["Attachment"]); // ImageButton ibtnAddToCart1 = (ImageButton)(dataItem["TemplateColumn1"]).FindControl("ibtnAddToCart"); // //ajaxify the button // RadAjaxManager1.AjaxSettings.AddAjaxSetting(ibtnAddToCart1, gridProjectManagement, RadAjaxLoadingPanel1); //} } protected void gridProjectManagement_PreRender(object sender, EventArgs e) { } protected void gridProjectManagement_BatchEditCommand(object sender, GridBatchEditingEventArgs e) { int s = e.Commands.Count(); foreach (GridBatchEditingCommand command in e.Commands) { Hashtable newValues = command.NewValues; Hashtable oldValues = command.OldValues; int? id = (int?)newValues["ID"]; //Convert.ToInt64(newValues["ID"].ToString()); RadAsyncUpload upload = (gridProjectManagement.MasterTableView.GetBatchEditorContainer("Attachment").Controls[0] as RadAsyncUpload) as RadAsyncUpload; // string fileName = upload.UploadedFiles[0].FileName; string fileName = ""; foreach (UploadedFile file in upload.UploadedFiles) { byte[] result; using (var streamReader = new MemoryStream()) { file.InputStream.CopyTo(streamReader); result = streamReader.ToArray(); } if (Equality(result, (byte[])newValues["FileName"])) { fileName = file.FileName; } } // string newFirstName = newValues["PerspectiveRating"].ToString(); if (id.HasValue) { var OldeItem = ListActivityArchivalSupportPM.Where(x => x.ID == Convert.ToInt32(id)).FirstOrDefault(); using (var db = new EntitiesModel()) { var p = db.ActivityArchivalSupportPMs.Where(x => x.ID == Convert.ToInt32(id)).FirstOrDefault(); if (newValues["Estimate"] != null) { p.Estimate = Convert.ToDecimal(newValues["Estimate"].ToString()); } p.FileName = fileName; p.Activity = (string)newValues["Activity"]; p.EstimateAssumptions = (string)newValues["EstimateAssumptions"]; p.ApplicationID = AppName.Value; if (newValues["FileName"] != null) { p.Attachment = (Byte[])newValues["FileName"]; } db.SaveChanges(); try { //save chanages to Db } catch (System.Exception) { } } //do update } else { ActivityArchivalSupportPM newItem = new ActivityArchivalSupportPM(); if (newValues["Estimate"] != null) { newItem.Estimate = Convert.ToDecimal(newValues["Estimate"].ToString()); } newItem.EstimateAssumptions = (string)newValues["EstimateAssumptions"]; newItem.Activity = (string)newValues["Activity"]; newItem.IsProjectManagement = true; newItem.IsArchivalSupport = false; newItem.ApplicationID = AppName.Value; newItem.FileName = fileName; if (newValues["FileName"] != null) { newItem.Attachment = (Byte[])newValues["FileName"]; } DbContext.Add(newItem); try { //save chanages to Db DbContext.SaveChanges(); //command.Item.Edit = false; } catch (System.Exception) { } } } } protected void gridProjectManagement_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == RadGrid.DownloadAttachmentCommandName) { RadAjaxManager Manager = new RadAjaxManager(); Manager.EnableAJAX = false; GridDownloadAttachmentCommandEventArgs args = e as GridDownloadAttachmentCommandEventArgs; string fileName = args.FileName; int attachmentId = (int)args.AttachmentKeyValues["ID"]; var query = DbContext.ActivityArchivalSupportPMs.Where(x => x.ID == attachmentId).FirstOrDefault(); byte[] binaryData = (byte[])query.Attachment; Response.ClearContent(); Response.ContentType = "application/octet-stream"; Response.AddHeader("content-disposition", "attachment; filename=" + fileName); Response.AddHeader( "Content-Length", fileName.Length.ToString()); Response.BinaryWrite(binaryData); // Response.TransmitFile(fileName); //Response.OutputStream.Write(binaryData, 0, binaryData.Length); //Response.Flush(); //Response.Close(); Response.End(); } } protected void gridProjectManagement_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { if (AppName.HasValue) { var list = ListActivityArchivalSupportPM.Where(x => x.ApplicationID == AppName).ToList(); if (list.Count > 0) { gridProjectManagement.DataSource = list; } else { gridProjectManagement.DataSource = string.Empty; } } } protected void gridProjectManagement_ItemDataBound(object sender, GridItemEventArgs e) { //if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode)) //{ // GridEditableItem editItem = (GridEditableItem)e.Item; // RadTextBox txtbx = (RadTextBox)editItem["EstimateAssumptions"].Controls[0]; // //txtbx.MaxLength = 500; // //txtbx.Width = 800; // txtbx.Height = 50; // txtbx.TextMode = InputMode.MultiLine; //} } public void BindGrid() { if (AppName.HasValue) { var list = ListActivityArchivalSupportPM.Where(x => x.ApplicationID == AppName).ToList(); if (list.Count > 0) { gridProjectManagement.DataSource = list; } else { gridProjectManagement.DataSource = string.Empty; } } else { gridProjectManagement.DataSource = string.Empty; } gridProjectManagement.DataBind(); } public bool Equality(byte[] a1, byte[] b1) { int i; if (a1.Length == b1.Length) { i = 0; while (i < a1.Length && (a1[i] == b1[i])) //Earlier it was a1[i]!=b1[i] { i++; } if (i == a1.Length) { return true; } } return false; } protected void gridProjectManagement_DeleteCommand(object sender, GridCommandEventArgs e) { } }}i have tried different approaches to resolve the issue below. but not able to fix it. kindly help me on this.
i am not able to download the file. and not able to disable ajax. the file is saved in db in byte format
message - Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '���JFIF'.
http://screencast.com/t/CQePwsXg7cmm
please find video for further detail.