
<%@ Page Title="Home Page" MasterPageFile="~/Views/Shared/WebForm.master" EnableViewState="False" Language="C#" AutoEventWireup="True" CodeBehind="Dashboard.aspx.cs" Inherits="CableSolve.Web.Dashboard.Dashboard"%>/// <summary>/// Performs one tick of a timer on the chart./// Ticks based on time for testability and to prevent/// weird cases when skipping the clock time forward./// </summary>public void DoTimerCycleTick(object sender, TimerEventArgs eventArgs){ GlobalSettings globalSettings = StateManager.GetStates<GlobalSettings>(); if( globalSettings.CycleEnabled ) { if (!Equals(DateTime.Now.CompareTo(globalSettings.TimeLastCycled.AddMinutes(globalSettings.CycleInterval)), -1)) //CompareTo returns -1 when time is earlier than. { int oldIndex = SelectedIndex; int newIndex = (oldIndex + 1) != Tabs.Count ? (oldIndex + 1) : 0; SelectedIndex = newIndex; LayoutManager.Instance.MultiPage.PageViews[newIndex].Selected = true; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "KEY", string.Format("OnServerTabSelected({0});", newIndex), true); globalSettings.TimeLastCycled = DateTime.Now; } } StateManager.SaveGlobalSettings(globalSettings);}var showLoadingPanel = true;function OnServerTabSelected(newIndex) { var oldID = $find(multiPageID).get_selectedPageView().get_id(); var newID = $find(multiPageID).get_pageViews().getPageView(newIndex).get_id(); if ($telerik.$("#" + oldID).is(":visible")) { $telerik.$("#" + oldID).fadeOut(1000, function () { $telerik.$("#" + newID).fadeIn(1000, function () { showLoadingPanel = true; $find(multiPageID).set_selectedIndex(newIndex); }); }); showLoadingPanel = false; FixSplitter($find(rightPaneID)); return; }}i am working on a web application that needs to load customised grid column headers depending on the logged in users locale.
there are a number of different grids in the application, and whilst many of the header labels for these grids are generic, a small number are not and need to be loaded at runtime to the term relevant to them.
how would i do this?
currently my grid is populated from a datatable and the column names are coming from the datatable column names.
i think first step will be to create my localised column names in a database for each locale and bring them into my datatable.
i just need to know how to populate/override my radgrid column header text with the database values for specific columns.
One of my end-user copied this kind of text from Word:
<P class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="TEXT-DECORATION: underline"><SPAN style="mso-ansi-language: EN-US" lang=EN-US>Symptom<o:p></o:p></SPAN></SPAN></B></P> The problem is that the RadEditor transforms that to:
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal;">Symptom<o:p _rdEditor_exists="1"></o:p></b></p> Here, the "underline" style disappears. Is there a way to prevent that?
<telerik:RadGrid ID="grdSearchResults" runat="server" AllowSorting="true" GridLines="None" Skin="Windows7" AutoGenerateColumns="False" PageSize="5" onitemdatabound="grdSearchResults_ItemDataBound" onneeddatasource="grdSearchResults_NeedDataSource" > <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true"> </ClientSettings> <MasterTableView Width="100%" TableLayout="Auto" CommandItemDisplay="Top" AllowPaging="true" AllowSorting="true" PageSize="10" > protected void grdSearchResults_ItemDataBound(object sender, GridItemEventArgs e) { try { if (e.Item is GridDataItem) { DataTable dt = (DataTable)ViewState["StatementList"]; if (dt != null) { string credit = dt.Rows[e.Item.ItemIndex]["CreditImage"].ToString(); string BackImages = dt.Rows[e.Item.ItemIndex]["BackImage"].ToString(); string AddImages = dt.Rows[e.Item.ItemIndex]["Image"].ToString(); CheckBox chkCredits = (CheckBox)e.Item.FindControl("chkCredits"); CheckBox chkBackImages = (CheckBox)e.Item.FindControl("chkBackImages"); CheckBox chkAddImages = (CheckBox)e.Item.FindControl("chkAddImages"); if (credit == "True") chkCredits.Checked = true; else chkCredits.Checked = false; if (BackImages == "True") chkBackImages.Checked = true; else chkBackImages.Checked = false; if (AddImages == "True") chkAddImages.Checked = true; else chkAddImages.Checked = false; } } } catch (Exception ex) { Log.WriteLine(LogParams.USERCONTROLS, "StatementGrid : grdSearchResults_ItemDataBound : " + ex.Message, LogLevel.Error, LogParams.ERRORMSG); LoadDummyData(); } }