I've got a problem with the Telerik controls not rendering controls.
The error I get is:
Could not load file or assembly 'Telerik.Web.UI, Version=209.3.1208.35, Culture=neutral, PublicKeyToken=121fae78165ba3dy' or one of its dependencies. The system cannot find the file specified.
I've gone through the telerik knowledge base, including the troubleshoot guide, and still have resolved the issue.
I've removed Telerik, restarted computer. I deleted the telerik directory in Program Files. Re-opened visual studio and there's no vestiage of telerik in the system. I close VS and re-run the telerik instalation. I then restart VS and Create A New Website using the 'RadControls CSharp WebSite.' I then open the generated Default.aspx and switch to design view. There are three telerik controls: RadAjaxManager1, RadAjaxManager1 and RadSkinManager1.
The following is the web.config file:
<?
xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<
configuration>
<
configSections>
<
sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<
sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<
section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<
sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<
section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<
section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<
section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<
section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</
sectionGroup>
</
sectionGroup>
</
sectionGroup>
</
configSections>
<
appSettings>
<
add key="Telerik.Skin" value="Sunset" />
<
add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
<
add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />
</
appSettings>
<
connectionStrings/>
<
system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<
compilation debug="false" >
<
assemblies>
<
add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<
add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<
add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</
assemblies>
</
compilation>
<
pages>
<
controls>
<
add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
</
controls>
</
pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<
authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<
httpHandlers>
<
remove verb="*" path="*.asmx"/>
<
add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<
add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
<
add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
<
add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
<
add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
<
add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
</
httpHandlers>
<
httpModules>
<
add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>
<
add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
</
httpModules>
</
system.web>
<
system.codedom>
<
compilers>
<
compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<
providerOption name="CompilerVersion" value="v3.5"/>
<
providerOption name="WarnAsError" value="false"/>
</
compiler>
<
compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<
providerOption name="CompilerVersion" value="v3.5"/>
<
providerOption name="OptionInfer" value="true"/>
<
providerOption name="WarnAsError" value="false"/>
</
compiler>
</
compilers>
</
system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<
system.webServer>
<
validation validateIntegratedModeConfiguration="false"/>
<
modules>
<
remove name="ScriptModule" />
<
add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0"/>
<
add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode,runtimeVersionv2.0"/>
</
modules>
<
handlers>
<
remove name="WebServiceHandlerFactory-Integrated"/>
<
remove name="ScriptHandlerFactory" />
<
remove name="ScriptHandlerFactoryAppServices" />
<
remove name="ScriptResource" />
<
add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<
add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<
add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
<
add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
<
add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
<
add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
<
add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0" />
</
handlers>
</
system.webServer>
<
runtime>
<
assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<
dependentAssembly>
<
assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<
bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</
dependentAssembly>
<
dependentAssembly>
<
assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<
bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</
dependentAssembly>
</
assemblyBinding>
</
runtime>
</
configuration>
| private void BindWebDataGrid() |
| { |
| TelerikCSGConsultantRadGrid.DataSource = null; |
| csgAgreementEfcoUserXRefs = _csgAgreementEfcoUserXrefBL.GetByCsgAgreementId(Agreement.Id); |
| TelerikCSGConsultantRadGrid.DataSource = csgAgreementEfcoUserXRefs; |
| TelerikCSGConsultantRadGrid.DataBind(); |
| } |
| protected void TelerikCSGConsultantRadGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| TelerikCSGConsultantRadGrid.DataSource = null; |
| csgAgreementEfcoUserXRefs = _csgAgreementEfcoUserXrefBL.GetByCsgAgreementId(Agreement.Id); |
| TelerikCSGConsultantRadGrid.DataSource = csgAgreementEfcoUserXRefs; |
| } |
| protected void TelerikCSGConsultantRadGrid_UpdateCommand(object source, GridCommandEventArgs e) |
| { |
| Efco.Business.Data.CsgAgreementEfcoUserXRef csgAgreementEfcoUserXRef = new CsgAgreementEfcoUserXRef(CurrentUser); |
| GridEditableItem item = e.Item as GridEditableItem; |
| try |
| { |
| csgAgreementEfcoUserXRef.AgreementId = Agreement.Id; |
| csgAgreementEfcoUserXRef.EfcoUserId = Convert.ToInt32((item["EfcoUserId"].Controls[0] as TextBox).Text); |
| csgAgreementEfcoUserXRef.CommissionPercentage = Convert.ToDecimal((item["CommissionPercentage"].Controls[0] as TextBox).Text); |
| csgAgreementEfcoUserXRef.Sequence = Convert.ToInt16((item["Sequence"].Controls[0] as TextBox).Text); |
| _csgAgreementEfcoUserXrefBL.Save(csgAgreementEfcoUserXRef); |
| } |
| catch (Exception ex) |
| { |
| TelerikCSGConsultantRadGrid.Controls.Add(new LiteralControl("Unable to update CSG Consultant. Reason: " + ex.Message)); |
| } |
| } |
| protected void TelerikCSGConsultantRadGrid_InsertCommand(object source, GridCommandEventArgs e) |
| { |
| Efco.Business.Data.CsgAgreementEfcoUserXRef csgAgreementEfcoUserXRef = new CsgAgreementEfcoUserXRef(CurrentUser); |
| GridEditableItem item = e.Item as GridEditableItem; |
| try |
| { |
| csgAgreementEfcoUserXRef.AgreementId = Agreement.Id; |
| csgAgreementEfcoUserXRef.EfcoUserId = Convert.ToInt32((item["EfcoUserId"].Controls[0] as TextBox).Text); |
| csgAgreementEfcoUserXRef.CommissionPercentage = Convert.ToDecimal((item["CommissionPercentage"].Controls[0] as TextBox).Text); |
| csgAgreementEfcoUserXRef.Sequence = Convert.ToInt16((item["Sequence"].Controls[0] as TextBox).Text); |
| csgAgreementEfcoUserXRef.RecordCreatedDate = DateTime.Now; |
| csgAgreementEfcoUserXRef.RecordCreatedEfcoUserId = CurrentUser.Id; |
| csgAgreementEfcoUserXRef.RecordUpdateDate = DateTime.Now; |
| csgAgreementEfcoUserXRef.RecordUpdatedEfcoUserId = CurrentUser.Id; |
| _csgAgreementEfcoUserXrefBL.Save(csgAgreementEfcoUserXRef); |
| } |
| catch (Exception ex) |
| { |
| TelerikCSGConsultantRadGrid.Controls.Add(new LiteralControl("Unable to insert CSG Consultant. Reason: " + ex.Message)); |
| } |
| } |
| protected void TelerikCSGConsultantRadGrid_DeleteCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| Efco.Business.Data.CsgAgreementEfcoUserXRef csgAgreementEfcoUserXRef = new CsgAgreementEfcoUserXRef(CurrentUser); |
| GridDataItem item = e.Item as GridDataItem; |
| try |
| { |
| Convert.ToInt32(item.OwnerTableView.DataKeyValues[item.ItemIndex]["EfcoUserId"]); |
| csgAgreementEfcoUserXRef = _csgAgreementEfcoUserXrefBL.GetById(Agreement.Id, |
| Convert.ToInt32(item["EfcoUserId"].Text)); |
| _csgAgreementEfcoUserXrefBL.Delete(csgAgreementEfcoUserXRef); |
| } |
| catch (Exception ex) |
| { |
| TelerikCSGConsultantRadGrid.Controls.Add(new LiteralControl("Unable to delete CSG Consultant. Reason: " + ex.Message)); |
| } |
| } |
| <Easi:EasiDataPanel ID="TelerikCSGConsultantDataPanel" runat="server"> |
| <telerik:RadGrid ID="TelerikCSGConsultantRadGrid" runat="server" |
| AutoGenerateColumns="False" GridLines="None" |
| ondeletecommand="TelerikCSGConsultantRadGrid_DeleteCommand" |
| oninsertcommand="TelerikCSGConsultantRadGrid_InsertCommand" |
| onneeddatasource="TelerikCSGConsultantRadGrid_NeedDataSource" |
| onupdatecommand="TelerikCSGConsultantRadGrid_UpdateCommand" |
| ShowStatusBar="True" > |
| <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" > |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="AgreementId" HeaderText="Agreement ID" DefaultInsertValue="" UniqueName="AgreementNumber" |
| Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="EfcoUserId" HeaderText="Efco User ID" DefaultInsertValue="" UniqueName="EfcoUserId"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="CommissionPercentage" HeaderText="Commission Percentage" DefaultInsertValue="" |
| UniqueName="CommissionPercentage"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Sequence" HeaderText="Sequence" DefaultInsertValue="" UniqueName="Sequence"> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn CommandName="Select" Text="Select" |
| UniqueName="column1"> |
| </telerik:GridButtonColumn> |
| <telerik:GridEditCommandColumn> |
| </telerik:GridEditCommandColumn> |
| <telerik:GridButtonColumn CommandName="Delete" Text="Delete" |
| UniqueName="column"> |
| </telerik:GridButtonColumn> |
| </Columns> |
| <EditFormSettings> |
| <EditColumn UniqueName="EditCommandColumn1"> |
| </EditColumn> |
| </EditFormSettings> |
| </MasterTableView> |
| </telerik:RadGrid> |
| </Easi:EasiDataPanel> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" |
| EnablePageHeadUpdate="False"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="TelerikCSGConsultantRadGrid"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="TelerikCSGConsultantRadGrid" LoadingPanelID="TelerikCSGConsultantDataPanel" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="XmlHttpPanel3.aspx.cs" Inherits="XmlHttpPanel3" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| <telerik:radcodeblock id="RadCodeBlock" runat="server"> |
| <script type="text/javascript"> |
| //<![CDATA[ |
| function radGrid_RowSelected(sender, args) { |
| var key = args.getDataKeyValue("ContentId"); |
| var panel = $find("<%=RadXmlHttpPanel.ClientID %>"); |
| panel.set_value(key); |
| } |
| //]]> |
| </script> |
| </telerik:radcodeblock> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <asp:scriptmanager id="ScriptManager" runat="server" /> |
| <telerik:radcombobox id="RadComboBox" runat="server" skin="Telerik" datasourceid="ContentGroupDataSource" datatextfield="ContentGroupName" datavaluefield="ContentGroupId" autopostback="true" appenddatabounditems="true" onselectedindexchanged="RadComboBox_SelectedIndexChanged"> |
| <items> |
| <telerik:radcomboboxitem text="All" value="0" selected="true" /> |
| </items> |
| </telerik:radcombobox> |
| <br /> |
| <style type="text/css"> |
| .RadGrid_Telerik .rgFilterRow td { |
| padding-top: 8px; |
| } |
| </style> |
| <telerik:radgrid id="RadGrid" runat="server" skin="Telerik" width="250" allowpaging="true" allowfilteringbycolumn="true" autogeneratecolumns="false" oninit="RadGrid_Init" onneeddatasource="RadGrid_NeedDataSource" onitemcommand="RadGrid_ItemCommand"> |
| <mastertableview commanditemdisplay="Top" editmode="EditForms" datakeynames="ContentId" clientdatakeynames="ContentId"> |
| <columns> |
| <telerik:gridboundcolumn uniquename="ContentName" datafield="ContentName" headertext="Name" filtercontrolwidth="200px" currentfilterfunction="Contains" autopostbackonfilter="true"></telerik:gridboundcolumn> |
| </columns> |
| <commanditemsettings addnewrecordtext="Add new content" /> |
| <editformsettings editformtype="Template"> |
| <formtemplate> |
| <div style="background:#9DDF6C;padding-top:5px;"> |
| <table width="100%"> |
| <tr> |
| <td> |
| Name: |
| </td> |
| <td style="padding-left:2px;"> |
| <asp:textbox id="ContentName" runat="server" width="187px"></asp:textbox> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" align="right" style="padding-right:10px;"> |
| <asp:linkbutton id="Insert" runat="server" commandname="PerformInsert" text="Insert"></asp:linkbutton> |
| |
| <asp:linkbutton id="Cancel" runat="server" commandname="Cancel" text="Cancel" causesvalidation="false" onclientclick="<%Eval(this.ClientFireCommandFunction(Telerik.Web.UI.RadGrid.CancelCommandName, String.Empty)) %>"></asp:linkbutton> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </formtemplate> |
| </editformsettings> |
| </mastertableview> |
| <clientsettings enablerowhoverstyle="true"> |
| <selecting allowrowselect="true" /> |
| <clientevents onrowselected="radGrid_RowSelected" /> |
| </clientsettings> |
| <groupingsettings casesensitive="false" /> |
| <pagerstyle mode="NumericPages" showpagertext="false" pagebuttoncount="5" /> |
| </telerik:radgrid> |
| <telerik:radxmlhttppanel id="RadXmlHttpPanel" runat="server" skin="Telerik" onservicerequest="RadXmlHttpPanel_ServiceRequest" loadingpanelid="RadAjaxLoadingPanel" enableclientscriptevaluation="true"> |
| <asp:multiview id="MultiView" runat="server"> |
| <asp:view id="SelectView" runat="server"> |
| Select Content |
| </asp:view> |
| <asp:view id="EditView" runat="server"> |
| <asp:label id="ContentId" runat="server"></asp:label> |
| <br /> |
| <asp:textbox id="ContentName" runat="server"></asp:textbox> |
| <br /> |
| <telerik:radcombobox id="ContentGroup" runat="server" skin="Telerik" datatextfield="ContentGroupName" datavaluefield="ContentGroupId"></telerik:radcombobox> |
| <br /> |
| <asp:linkbutton id="SaveContent" runat="server" text="Save" onclick="SaveContent_Click"></asp:linkbutton> |
| </asp:view> |
| </asp:multiview> |
| </telerik:radxmlhttppanel> |
| <telerik:radajaxmanager id="RadAjaxManager" runat="server"> |
| <ajaxsettings> |
| <telerik:ajaxsetting ajaxcontrolid="RadComboBox"> |
| <updatedcontrols> |
| <telerik:ajaxupdatedcontrol controlid="RadComboBox" /> |
| <telerik:ajaxupdatedcontrol controlid="RadGrid" loadingpanelid="RadAjaxLoadingPanel" /> |
| <telerik:ajaxupdatedcontrol controlid="RadXmlHttpPanel" /> |
| </updatedcontrols> |
| </telerik:ajaxsetting> |
| <telerik:ajaxsetting ajaxcontrolid="RadGrid"> |
| <updatedcontrols> |
| <telerik:ajaxupdatedcontrol controlid="RadComboBox" /> |
| <telerik:ajaxupdatedcontrol controlid="RadGrid" loadingpanelid="RadAjaxLoadingPanel" /> |
| <telerik:ajaxupdatedcontrol controlid="RadXmlHttpPanel" /> |
| </updatedcontrols> |
| </telerik:ajaxsetting> |
| </ajaxsettings> |
| </telerik:radajaxmanager> |
| <telerik:radajaxloadingpanel id="RadAjaxLoadingPanel" runat="server"></telerik:radajaxloadingpanel> |
| <asp:objectdatasource id="ContentGroupDataSource" runat="server" typename="Abc.WD.InternationalStore.DataAccess.DataTableAdapters.ContentGroupInfoTableAdapter" selectmethod="GetDataByStoreId"> |
| <selectparameters> |
| <asp:parameter type="String" name="StoreId" defaultvalue="49D4B1F4-236B-DE11-870E-001A6465230E" /> |
| <asp:parameter type="Int32" name="CultureId" defaultvalue="1033" /> |
| </selectparameters> |
| </asp:objectdatasource> |
| </div> |
| </form> |
| </body> |
| </html> |
| using System; |
| using System.Collections.Generic; |
| using System.Linq; |
| using System.Web; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using Abc.WD.InternationalStore.DataAccess.DataTableAdapters; |
| using Abc.WD.InternationalStore.DataAccess; |
| using Telerik.Web.UI; |
| public partial class XmlHttpPanel3 : System.Web.UI.Page |
| { |
| protected void Page_Load(Object sender, EventArgs e) |
| { |
| } |
| protected void SaveContent_Click(Object sender, EventArgs e) |
| { |
| (RadGrid.Items[0] as GridDataItem).FireCommandEvent(RadGrid.UpdateCommandName, String.Empty); |
| } |
| protected void RadGrid_Init(Object sender, EventArgs e) |
| { |
| GridFilterMenu menu = RadGrid.FilterMenu; |
| Int32 i = 0; |
| while (i < menu.Items.Count) |
| { |
| if (menu.Items[i].Text == "NoFilter" || menu.Items[i].Text == "Contains") |
| { |
| i++; |
| } |
| else |
| { |
| menu.Items.RemoveAt(i); |
| } |
| } |
| } |
| protected void RadGrid_ItemCreated(Object sender, GridItemEventArgs e) |
| { |
| if(e.Item is GridEditableItem && e.Item.IsInEditMode) |
| { |
| GridEditableItem item = e.Item as GridEditableItem; |
| LinkButton insert = item.FindControl("Insert") as LinkButton; |
| insert.OnClientClick = String.Format("if(!$find('{0}').fireCommand('PerformInsert', '')) return false;", e.Item.OwnerID); |
| LinkButton cancel = item.FindControl("Cancel") as LinkButton; |
| cancel.OnClientClick = String.Format("if(!$find('{0}').fireCommand('CancelInsert','')) return false;", e.Item.OwnerID); |
| } |
| } |
| protected void RadGrid_ItemCommand(Object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| switch (e.CommandName) |
| { |
| case RadGrid.PageCommandName: |
| { |
| MultiView.ActiveViewIndex = 0; |
| } |
| break; |
| case RadGrid.InitInsertCommandName: |
| { |
| RadComboBox.Text = "All"; |
| RadComboBox.Items[0].Selected = true; |
| RadComboBox.Enabled = false; |
| RadGrid.MasterTableView.FilterExpression = String.Empty; |
| foreach (GridColumn column in RadGrid.Columns) |
| { |
| column.CurrentFilterFunction = GridKnownFunction.Contains; |
| column.CurrentFilterValue = String.Empty; |
| } |
| RadXmlHttpPanel.Value = String.Empty; |
| } |
| break; |
| case RadGrid.PerformInsertCommandName: |
| { |
| GridEditFormInsertItem item = e.Item as GridEditFormInsertItem; |
| String contentName = ((TextBox)item.FindControl("ContentName")).Text; |
| //String contentGroupId = ((RadComboBox)item.FindControl("ContentGroup")).SelectedValue; |
| String contentGroupId = RadComboBox.FindItemByText("General").Value; |
| ContentInfoTableAdapter adpater = new ContentInfoTableAdapter(); |
| adpater.GetDataByInsert("49D4B1F4-236B-DE11-870E-001A6465230E", contentGroupId, contentName, String.Empty, 1033); |
| RadComboBox.Enabled = true; |
| RadGrid.AllowFilteringByColumn = true; |
| if (RadGrid.Items.Count == RadGrid.PageSize) |
| { |
| RadGrid.CurrentPageIndex++; |
| } |
| } |
| break; |
| case RadGrid.CancelCommandName: |
| { |
| RadComboBox.Enabled = true; |
| RadGrid.CurrentPageIndex = 0; |
| RadGrid.AllowFilteringByColumn = true; |
| } |
| break; |
| case RadGrid.UpdateCommandName: |
| { |
| String contentId = (RadGrid.SelectedItems[0] as GridDataItem).GetDataKeyValue("ContentId").ToString(); |
| ContentInfoTableAdapter adapter = new ContentInfoTableAdapter(); |
| Data.ContentInfoDataTable table = adapter.GetDataByUpdate(contentId, ContentName.Text, String.Empty, 1033, ContentGroup.SelectedValue); |
| Data.ContentInfoRow content = table[0]; |
| SetEditView(content); |
| MultiView.ActiveViewIndex = 1; |
| e.Item.OwnerTableView.Rebind(); |
| e.Item.Selected = true; |
| } |
| break; |
| } |
| } |
| protected void RadComboBox_SelectedIndexChanged(Object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) |
| { |
| MultiView.ActiveViewIndex = 0; |
| RadGrid.CurrentPageIndex = 0; |
| RadGrid.Rebind(); |
| } |
| protected void RadGrid_NeedDataSource(Object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| ContentInfoTableAdapter adapter = new ContentInfoTableAdapter(); |
| if (RadComboBox.SelectedIndex == 0) |
| { |
| RadGrid.DataSource = adapter.GetDataByStoreId("49D4B1F4-236B-DE11-870E-001A6465230E", 1033); |
| } |
| else |
| { |
| RadGrid.DataSource = adapter.GetDataByContentGroupId(RadComboBox.SelectedValue, 1033); |
| } |
| } |
| protected void RadXmlHttpPanel_ServiceRequest(Object sender, RadXmlHttpPanelEventArgs e) |
| { |
| ContentInfoTableAdapter adapter = new ContentInfoTableAdapter(); |
| Data.ContentInfoDataTable table = adapter.GetDataByContentId(e.Value, 1033); |
| Data.ContentInfoRow content = table[0]; |
| SetEditView(content); |
| MultiView.ActiveViewIndex = 1; |
| } |
| void SetEditView(Data.ContentInfoRow content) |
| { |
| ContentId.Text = content.ContentId.ToString(); |
| ContentName.Text = content.ContentName; |
| ContentGroup.DataSource = ContentGroupDataSource; |
| ContentGroup.DataBind(); |
| RadComboBoxItem selectedContentGroup = ContentGroup.FindItemByValue(content.ContentGroupId.ToString()); |
| selectedContentGroup.Selected = true; |
| ContentGroup.Text = selectedContentGroup.Text; |
| } |
| } |
When I am in the rad editor I hit enter to place a line space between a table and an image.
When I postback to the server the
Me.RadEditor.Content
removes the <BR> tag.
Here is what I start off with:
<TABLE>
<TR><TD> </TD></TR></TABLE>
<P align=center><BR><IMG style="WIDTH: 393px; HEIGHT: 236px" src="http://www.domain.com/client_images/11/8ball.gif" width=381 height=279></P>
Here is what I end up with when i post back.
<TABLE>
<TR><TD> </TD></TR></TABLE>
<P align=center><IMG style="WIDTH: 393px; HEIGHT: 236px" src="http://www.domain.com/client_images/11/8ball.gif" width=381 height=279></P>
The rad editor also removes this tage when i switch from source view to design view.
Please advise.
Trevor


