BUG1: I've got an error telling me that the selectedvalue is not selected when someone press a ImageButton
(<asp:Imagebutton ID="btnSaveReg" runat="server" Enabled="false"
ImageUrl="~/Design/Time/regSave.png" OnClientClick="return CheckDayTotals(this);" OnCommand="saveReg" />
BUG2: cmbRegWT list is also cleared for elements when I select another element and return the cmbRegWT. ErrorSFP24-2.png.
Server Error in '/' Application. |
-------------------------------------------------------------------------------- |
Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. |
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. |
Exception Details: System.BadImageFormatException: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. |
Source Error: |
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Web.UI' could not be loaded. |
WRN: Assembly binding logging is turned OFF. |
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. |
Note: There is some performance penalty associated with assembly bind failure logging. |
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. |
Stack Trace: |
[BadImageFormatException: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.] |
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 |
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43 |
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127 |
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142 |
System.Reflection.Assembly.Load(String assemblyString) +28 |
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46 |
[ConfigurationErrorsException: Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.] |
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613 |
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203 |
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105 |
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178 |
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54 |
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600 |
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125 |
System.Web.Compilation.BuildManager.CompileResourcesDirectory() +31 |
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +304 |
[HttpException (0x80004005): Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.] |
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58 |
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512 |
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729 |
[HttpException (0x80004005): Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.] |
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8897659 |
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85 |
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333 |
-------------------------------------------------------------------------------- |
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 |
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem edit = (GridEditableItem)e.Item;
TextBox txt = (TextBox)edit["Due"].Controls[0];
string dataFormatString = (RadGrid1.MasterTableView.GetColumn("Due") as GridBoundColumn).DataFormatString;
txt.Text = String.Format(dataFormatString, double.Parse(txt.Text));
}
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem edit = (GridEditableItem)e.Item;
TextBox txt = (TextBox)edit["Paid"].Controls[0];
string dataFormatString = (RadGrid1.MasterTableView.GetColumn("Paid") as GridBoundColumn).DataFormatString;
txt.Text = String.Format(dataFormatString, double.Parse(txt.Text));
}
if (e.Item is GridEditableItem && e.Item.IsInEditMode)
{
GridEditableItem edit = (GridEditableItem)e.Item;
TextBox txt = (TextBox)edit["Expenses"].Controls[0];
string dataFormatString = (RadGrid1.MasterTableView.GetColumn("Expenses") as GridBoundColumn).DataFormatString;
txt.Text = String.Format(dataFormatString, double.Parse(txt.Text));
}
}
<telerik:RadGrid ID="RGBankCash" runat="server"
GridLines="None" Skin="Vista" Width="500px"
OnItemDataBound="RGBankCash_ItemDataBound" >
<AlternatingItemStyle BackColor = "White" />
<ClientSettings > <Selecting AllowRowSelect="true" /> </ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="CAKey" AllowFilteringByColumn="True" >
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="CAKey" DataType="System.Int32"
HeaderText="CAKey" ReadOnly="True" SortExpression="CAKey"
UniqueName="CAKey" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="IsTrue" DataType="System.Int32"
HeaderText="IsTrue" ReadOnly="True" SortExpression="IsTrue"
UniqueName="IsTrue" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="MasterTemplate" HeaderText="Select">
<HeaderTemplate>
<input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server" type="checkbox" />
</HeaderTemplate>
<ItemTemplate>
<%
-- <telerik:radwindow runat="server" id="RadWindow1" visibleonpageload="false">
<ContentTemplate>
--
%>
<%
-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" OnUnload="UpdatePanel_Unload">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="RGBankCash" EventName="Click" />
</Triggers>
<contenttemplate>--
%>
<asp:CheckBox runat="server" ID="chkUpdate" OnCheckedChanged="CheckChanged" />
<%
-- </contenttemplate>
</asp:UpdatePanel > --
%>
<%
-- </ContentTemplate>
</telerik:radwindow> --
%>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="TransMonth"
HeaderText="Trans Month" UniqueName="TransMonth">
<ItemTemplate>
<asp:Label ID="TransMonthLabel" runat="server"
Text='<%# Eval("TransMonth") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle Width="250px" />
</telerik:GridTemplateColumn>
protected void CheckChanged(Object sender, System.EventArgs e)
{
CheckBox box = (CheckBox)sender;
GridDataItem item = (GridDataItem)box.NamingContainer;
Hashtable target = null;
if (item.OwnerTableView.DataKeyNames.ToString() == "CAKey")
{
target = CAKeyChecked;
}
if (box.Checked)
{
target[item[
"CAKey"].Text] = true;
}
else
{
target[item[
"CAKey"].Text] = null;
}
}
private Hashtable CAKeyChecked
{
get
{
object res = ViewState["_cc"];
if (res == null)
{
res =
new Hashtable();
ViewState[
"_cc"] = res;
}
return (Hashtable)res;
}
}
protected void RGBankCash_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
DataSet ds1 = new DataSet();
ds1 = SelectDistinctCompanySubmitted();
string transmonth = this.rcboMonth.SelectedValue + this.rcboFiscalYear.SelectedValue;
for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
{
//foreach (DataRow r in ds1.Tables[0].Rows)
//{
string compkey = ds1.Tables[0].Rows[i]["companykey"].ToString();
bool chk = FindoddCompany(Int32.Parse(compkey));
if (chk == true)
{
//Trigger Reject Email to Accountant
// CommonClass.TriggerEmailToAccByCHQ(compkey, transmonth);
//Reset Submit status
//conn.Open();
//SqlCommand cmd1 = new SqlCommand("Update CashAnalysisDetail_Tbl Set IsSubmitted = 0 where CompanyKey = " + Int32.Parse(compkey) + " and TransMonth = '" + transmonth + "'", conn);
//cmd1.ExecuteNonQuery();
//conn.Close();
}
else
{
if (e.Item is GridDataItem)
{
string sqlst1 = "SELECT CAKey from CashAnalysisDetail_Tbl where CompanyKey = " + compkey + " and Transmonth = '" + transmonth + "' and IsSubmitted = 1 and ReportStatus='A'";
cn =
new SqlConnection(connString);
cn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = sqlst1;
cmd.Connection = cn;
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = cmd;
DataSet ds = new DataSet();
adapter.Fill(ds,
"dt1");
for (int j = 0; j < ds.Tables[0].Rows.Count; j++)
{
GridDataItem dataItem = (GridDataItem)e.Item;
string CAKey = ds.Tables[0].Rows[j]["CAKey"].ToString();
if (Int32.Parse((e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["CAKey"].ToString()) == Int32.Parse(CAKey))
{
dataItem.BackColor = System.Drawing.
Color.Yellow;
dataItem.Font.Bold =
true;
}
}
}
}
}
if (e.Item is GridDataItem)
{
GridDataItem item = e.Item as GridDataItem;
CheckBox box = (CheckBox)item.FindControl("cbChecked");
object isChecked = null;
if (item.OwnerTableView.DataMember == "CAKey")
{
isChecked = CAKeyChecked[item[
"CAKey"].Text];
}
//if (item.OwnerTableView.DataMember == "Customers1")
//{
// isChecked = Customers1Checked[item["CustomerID"].Text];
//}
//if (item.OwnerTableView.DataMember == "Customers2")
//{
// isChecked = Customers2Checked[item["CustomerID"].Text];
//}
if (isChecked != null)
{
box.Checked = (
bool)isChecked == true;
}
}
}
Please help me.<
telerik:RadDropDownList
ID
=
"RadDropDownList5"
runat
=
"server"
AutoPostBack
=
"true"
DataValueField
=
"category"
SelectedValue='<%#Bind("category") %>' OnSelectedIndexChanged="category_selectedindexchaged" >
<
Items
>
<
telerik:DropDownListItem
Text
=
"India"
Value
=
'India'
/>
<
telerik:DropDownListItem
Text
=
"International"
Value
=
'International'
/>
</
Items
>
</
telerik:RadDropDownList
>
<
telerik:RadDropDownList
ID
=
"RadDropDownList6"
runat
=
"server"
>
</
telerik:RadDropDownList
>