or
| Error 158 The project currently contains references to more than one version of System.Web.Extensions, a direct reference to version 1.0.61025.0 and an indirect reference (through 'Telerik.Web.UI.RadScriptManager') to version 3.5.0.0. Change the direct reference to use version 3.5.0.0 (or higher) of System.Web.Extensions. C:\Users\Administrator\Desktop\Projects Current\Personal Projects\ussidingpros.com\simpweb.com\admin\admin.Master.designer.vb 34 47 USSidingPros |
| Error 159 The project currently contains references to more than one version of System.Web.Extensions, a direct reference to version 1.0.61025.0 and an indirect reference (through 'Telerik.Web.UI.RadTabStrip') to version 3.5.0.0. Change the direct reference to use version 3.5.0.0 (or higher) of System.Web.Extensions. C:\Users\Administrator\Desktop\Projects Current\Personal Projects\ussidingpros.com\simpweb.com\admin\admin.Master.designer.vb 43 46 USSidingPros |
| Error 160 The project currently contains references to more than one version of System.Web.Extensions, a direct reference to version 1.0.61025.0 and an indirect reference (through 'Telerik.Web.UI.RadMenu') to version 3.5.0.0. Change the direct reference to use version 3.5.0.0 (or higher) of System.Web.Extensions. C:\Users\Administrator\Desktop\Projects Current\Personal Projects\ussidingpros.com\simpweb.com\admin\admin.Master.designer.vb 52 38 USSidingPros |
| web.config file |
| <?xml version="1.0"?><configuration> |
| <configSections> |
| <sectionGroup name="telerik.web.ui"> |
| <section name="radScheduler" type="Telerik.Web.UI.RadSchedulerConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication" requirePermission="false"/> |
| </sectionGroup> |
| </configSections> |
| <connectionStrings> |
| <add name="DATABASECONNECTIONodb" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\website.mdb;User Id=admin;Password=;"/> |
| <add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\website.mdb;Persist Security Info=True" providerName="System.Data.OleDb"/> |
| </connectionStrings> |
| <appSettings> |
| </appSettings> |
| <system.net> |
| <mailSettings> |
| <smtp deliveryMethod="Network"> |
| <network host="blabla" port="25" userName="adam" password="blabla"/> |
| </smtp> |
| </mailSettings> |
| </system.net> |
| <system.web> |
| <webServices> |
| <protocols> |
| <add name="HttpPost"/> |
| </protocols> |
| </webServices> |
| <authentication mode="Forms"> |
| <forms loginUrl="LoginPage.aspx"> |
| </forms> |
| </authentication> |
| <customErrors mode="Off"/> |
| <!-- mode="On|Off|RemoteOnly"> --> |
| <pages> |
| <namespaces> |
| <clear/> |
| <add namespace="System"/> |
| <add namespace="System.Collections"/> |
| <add namespace="System.Collections.Specialized"/> |
| <add namespace="System.Configuration"/> |
| <add namespace="System.Text"/> |
| <add namespace="System.Text.RegularExpressions"/> |
| <add namespace="System.Web"/> |
| <add namespace="System.Web.Caching"/> |
| <add namespace="System.Web.SessionState"/> |
| <add namespace="System.Web.Security"/> |
| <add namespace="System.Web.Profile"/> |
| <add namespace="System.Web.UI"/> |
| <add namespace="System.Web.UI.WebControls"/> |
| <add namespace="System.Web.UI.WebControls.WebParts"/> |
| <add namespace="System.Web.UI.HtmlControls"/> |
| </namespaces> |
| <controls> |
| </controls> |
| </pages> |
| <!-- |
| 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="true"> |
| <assemblies> |
| <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> |
| <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> |
| </assemblies> |
| </compilation> |
| <httpRuntime maxRequestLength="1024000" executionTimeout="3600"/> |
| <httpHandlers> |
| <remove path="*.asmx" verb="*"/> |
| <add path="*.flv" verb="*" type="FLVStreaming"/> |
| <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/> |
| <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> |
| <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> |
| <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> |
| <add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" validate="false"/> |
| <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI" validate="false"/> |
| <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/> |
| </httpHandlers> |
| <httpModules> |
| <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/> |
| </httpModules> |
| </system.web> |
| <telerik.web.ui> |
| <radScheduler defaultAppointmentProvider="Integrated"> |
| <appointmentProviders> |
| <add name="ReadOnlyXmlSchedulerProvider" type="Telerik.Web.UI.XmlSchedulerProvider" fileName="~/App_Data/Appointments.xml" persistChanges="false"/> |
| <add name="ReadOnlySchedulerData" type="Telerik.Web.Examples.Scheduler.MyDbSchedulerProvider" connectionStringName="RadSchedulerConnectionString" persistChanges="false"/> |
| </appointmentProviders> |
| </radScheduler> |
| </telerik.web.ui> |
| <system.webServer> |
| <modules> |
| <remove name="ScriptModule"/> |
| <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/> |
| </modules> |
| <handlers> |
| <remove name="WebServiceHandlerFactory-Integrated"/> |
| <remove name="ScriptHandlerFactory"/> |
| <remove name="ScriptHandlerFactoryAppServices"/> |
| <remove name="ScriptResource"/> |
| <add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/> |
| <add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/> |
| <add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/> |
| <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/> |
| <add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/> |
| <add name="Telerik.Web.UI.DialogHandler" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI"/> |
| </handlers> |
| <validation validateIntegratedModeConfiguration="false"/> |
| </system.webServer> |
| <system.codedom> |
| <compilers> |
| <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4"> |
| <providerOption name="CompilerVersion" value="v3.5"/> |
| <providerOption name="OptionInfer" value="true"/> |
| <providerOption name="WarnAsError" value="false"/> |
| </compiler> |
| </compilers> |
| </system.codedom> |
| </configuration> |
| <div style="width: 100%;"> |
| <Telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" |
| AllowSorting="True" ShowStatusBar="true" GridLines="None" ShowGroupPanel="True" > |
| <PagerStyle Mode="NextPrevAndNumeric" /> |
| <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True"> |
| <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" /> |
| <Scrolling AllowScroll="True" ScrollHeight='400px' UseStaticHeaders="True" SaveScrollPosition="True" /> |
| <Selecting AllowRowSelect="True" /> |
| </ClientSettings> |
| <MasterTableView Width="100%" TableLayout='Fixed' AllowMultiColumnSorting="true"> |
| <ItemStyle Wrap='true' /> |
| <HeaderStyle Width='100px' /> |
| <AlternatingItemStyle Wrap='true' /> |
| </MasterTableView> |
| <SortingSettings SortedBackColor="Azure" /> |
| </Telerik:RadGrid> |
| </div> |
| private void CreateCustomControl(TableCell templateControl, Property property) |
| { |
| switch (property.UiType) |
| { |
| case "RadTextBox": |
| #region |
| RadTextBox radTextBox1 = new RadTextBox(); |
| radTextBox1.ID = string.Format("RadTextBox_{0}", property.Id); |
| if(!IsPostBack)radTextBox1.Text = property.DefaultValue; |
| if (property.MaxLength != null) |
| { |
| radTextBox1.MaxLength = (int)property.MaxLength; |
| } |
| templateControl.Controls.Add(radTextBox1); |
| #endregion |
| break; |
| case "MultilineRadTextBox": |
| #region |
| RadTextBox radTextBox2 = new RadTextBox(); |
| radTextBox2.ID = string.Format("MultilineRadTextBox_{0}", property.Id); |
| radTextBox2.TextMode = InputMode.MultiLine; |
| if (!IsPostBack) radTextBox2.Text = property.DefaultValue; |
| if (property.MaxLength != null) |
| { |
| radTextBox2.MaxLength = (int)property.MaxLength; |
| } |
| templateControl.Controls.Add(radTextBox2); |
| #endregion |
| break; |
| case "NumericTextBox": |
| #region |
| RadNumericTextBox radNumericTextBox = new RadNumericTextBox(); |
| radNumericTextBox.ID = string.Format("NumericTextBox_{0}", property.Id); |
| if (!IsPostBack) radNumericTextBox.Value = !string.IsNullOrEmpty(property.DefaultValue) ? double.Parse(property.DefaultValue) : (double)0; |
| radNumericTextBox.MaxValue = (double)property.MaxValue; |
| radNumericTextBox.MinValue = (double)property.MinValue; |
| templateControl.Controls.Add(radNumericTextBox); |
| #endregion |
| break; |
| case "RadDateInput": |
| #region |
| RadDateInput radDatePicker = new RadDateInput(); |
| radDatePicker.ID = string.Format("RadDateInput_{0}", property.Id); |
| radDatePicker.ReadOnly = true; |
| if (!string.IsNullOrEmpty(property.DefaultValue)) |
| { |
| if (!IsPostBack) radDatePicker.SelectedDate = Convert.ToDateTime(property.DefaultValue); |
| } |
| templateControl.Controls.Add(radDatePicker); |
| #endregion |
| break; |
| case "RadComboBox": |
| #region |
| RadComboBox radComboBox = new RadComboBox(); |
| radComboBox.ID = string.Format("RadComboBox_{0}", property.Id); |
| string[] options = property.Options.Split('#'); |
| string[] optionItemKeyValPair; |
| foreach (string optionItem in options) |
| { |
| optionItemoptionItemKeyValPair = optionItem.Split('$'); |
| radComboBox.Items.Add(new RadComboBoxItem(optionItemKeyValPair[0], optionItemKeyValPair[1])); |
| } |
| radComboBox.Items.Insert(0, new RadComboBoxItem(GetGlobalResourceObject("GeneralResource", "PleaseSelect").ToString(), "-1")); |
| if (!IsPostBack) radComboBox.FindItemByValue(property.DefaultValue).Selected = true; |
| templateControl.Controls.Add(radComboBox); |
| #endregion |
| break; |
| case "CheckBox": |
| #region |
| CheckBox checkBox = new CheckBox(); |
| checkBox.ID = string.Format("CheckBox_{0}", property.Id); |
| if (!IsPostBack) checkBox.Checked = property.DefaultValue == "0" ? false : true; |
| templateControl.Controls.Add(checkBox); |
| #endregion |
| break; |
| } |
| } |
and i call the method on grid's itemcreated event
| protected void SelectGrid_ItemCreated(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem item = e.Item as GridDataItem; |
| Entities.Domain.Property property = item.DataItem as Entities.Domain.Property; |
| if (property != null && property.PropertyTypeCodelookup != null && !string.IsNullOrEmpty(property.PropertyTypeCodelookup.UiType)) |
| { |
| CreateCustomControl(item["PropertyValueColumn"], property); |
| } |
| } |
| } |
| public List<Property> SelectedProperties |
| { |
| get |
| { |
| List<Property> _selectedProperties=new List<Property>(); |
| Property tmpProperty; |
| if (_currentPropertyCollection != null && _currentPropertyCollection.Count > 0) |
| { |
| foreach (GridDataItem item in PropertySelectGrid.Items) |
| { |
| if (((CheckBox)item["Selection"].Controls[1]).Checked) |
| { |
| tmpProperty = _currentPropertyCollection.Find(p => p.Id == (Convert.ToInt64(item["Id"].Text))); |
| Control c = item["PropertyValueColumn"].Controls[0]; |
| string text = string.Empty; |
| if (c is RadTextBox || c is RadNumericTextBox) |
| { |
| if (c is RadTextBox) |
| { |
| text = ((RadTextBox)item["PropertyValueColumn"].Controls[0]).Text; |
| } |
| else if (c is RadNumericTextBox) |
| { |
| text = ((RadNumericTextBox)item["PropertyValueColumn"].Controls[0]).Text; |
| } |
| } |
| else if (c is RadDateInput) |
| { |
| if (((RadDateInput)item["PropertyValueColumn"].Controls[0]).SelectedDate.HasValue) |
| { |
| text = ((RadDateInput)item["PropertyValueColumn"].Controls[0]).SelectedDate.Value.ToString(); |
| } |
| } |
| else if (c is RadComboBox) |
| { |
| if (((RadComboBox)item["PropertyValueColumn"].Controls[0]).SelectedItem != null) |
| { |
| if (((RadComboBox)item["PropertyValueColumn"].Controls[0]).SelectedItem.Value != "-1") |
| { |
| text = ((RadComboBox)item["PropertyValueColumn"].Controls[0]).SelectedItem.Value; |
| } |
| } |
| } |
| else if (c is CheckBox) |
| { |
| if (((CheckBox)item["PropertyValueColumn"].Controls[0]).Checked) |
| { |
| text = "1"; |
| } |
| } |
| tmpProperty.DefaultValue = text; |
| _selectedProperties.Add(tmpProperty); |
| } |
| } |
| } |
| //string key = "UnitPropertySelectedList_" + WebSessionManager.DataFilter.CurrentId; |
| //if (!WebSessionManager.DataFilter.ObjectList.ContainsKey(key) || WebSessionManager.DataFilter.ObjectList[key] == null) |
| //{ |
| // List<Property> propertyList = new List<Property>(); |
| // WebSessionManager.DataFilter.Add(key, propertyList); |
| //} |
| //return (List<Property>)WebSessionManager.DataFilter.ObjectList[key]; |
| return _selectedProperties; |
| } |