Good day,
We would like to know if is there any way to apply style of a control to an another. We have table inside RadPanelBar. Its looks fine with Metro style. Text is gray (#767676) and also there is bigger space between rows. If table is outside RadPanelBar, text is black and row space is not so big.
Question is how to apply style from RadPanelBar to another object. We apply class rfdAspLabel. Text is good colored but that’s all. There is now style for table formatting.
Thank you in advance for your advice.
Below employees are requested me at HR’s desk in
“Chris”
“Jhon”
Below employees are requested me at HR's desk in
"Chris"
"Jhon"

The custom collection is needed because the user should be able to select the time 23:59. But this does not work in other timezones: when not in the same timezone as UTC time, the picker "results" in another time than the selected. For example, if I pick 23:59, the time in the textbox results in 21:59 for my timezone. Every other time is ok - for example if I pick 12:00, it picks the right one. It seems that the property UseClientTimeOffset does not work for this particular time 23:59?
public static void SetA4DValidTimeView(this RadTimeView timeView) { ArrayList arrayList = new ArrayList(); arrayList.Add(new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day, 23, 59, 0)); for (int hour = 1; hour < 24; hour++) arrayList.Add(DateTime.UtcNow.Date.AddHours(hour)); timeView.DataList.DataSource = arrayList; }
I created a class in order to use the UseClientTimeOffset property.
public class A4DRadTimeView: RadTimeView { public A4DRadTimeView() { this.SetA4DValidTimeView(); base.UseClientTimeOffset = true; } }<MCN:A4DRadDateTimePicker runat="server" ID="dateTimePickerDepartureTime" Enabled="false" CssClass="labelregular" Calendar-CultureInfo="en-US" SharedTimeViewID="A4DSharedTimeView"> <DateInput EmptyMessage="____-__-__ __:__"> <ClientEvents OnValueChanged="inputValueChanged" /> </DateInput> </MCN:A4DRadDateTimePicker> <MCN:A4DRadTimeView ID="A4DSharedTimeView" runat="server"></MCN:A4DRadTimeView>function inputValueChanged(sender, args) { var newValue = args.get_newValue(); var dateFormat = sender.get_dateFormat(); var date = args.get_newDate(); if (date != null) { if (newValue.indexOf(sender.get_dateFormatInfo().TimeSeparator) < 0 && date.getHours() == 0 && date.getMinutes() == 0 && date.getSeconds() == 0) { date.setHours(0); date.setMinutes(01); sender.set_value(date.format(dateFormat)); } } }
<telerik:RadGrid ID="RadGrid1" Width="99%" OnNeedDataSource="Grid_NeedDataSource" AllowFilteringByColumn="True" AllowSorting="True" PageSize="20" ShowFooter="True" AllowPaging="True" runat="server" AutoGenerateColumns="False" GridLines="None" Skin="Office2007"> <GroupingSettings CaseSensitive="false" /> <MasterTableView ShowHeadersWhenNoRecords="true" AllowFilteringByColumn="True" ShowFooter="True" DataKeyNames="OffenseTypeId" TableLayout="Fixed" ClientDataKeyNames="OffenseTypeId, StateCode, Description"> <Columns> <telerik:GridClientSelectColumn HeaderStyle-Width="30px" /> <telerik:GridBoundColumn DataField="StateCode" HeaderText="VCC Code" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true" FilterControlWidth="70%"> <HeaderStyle Width="120px" /> </telerik:GridBoundColumn> <custom:OffenseModifierFilteringColumn DataField="ModifierDescription" HeaderText="Offense Modifier" AllowFiltering="true" FilterControlWidth="90%"> <HeaderStyle Width="200px" /> <ItemTemplate> <%# Eval("ModifierDescription")%> </ItemTemplate> </custom:OffenseModifierFilteringColumn> <telerik:GridBoundColumn DataField="Description" HeaderText="Description" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true" FilterControlWidth="95%"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="OffenseStatute" HeaderText="Statute" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="true" FilterControlWidth="70%"> <HeaderStyle Width="120px" /> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings> <Selecting AllowRowSelect="true" /> <ClientEvents OnRowSelected="RowSelected" /> </ClientSettings> </telerik:RadGrid>/// <summary> /// Custom Filtering column for the SelectOffense /// </summary> public class OffenseModifierFilteringColumn : GridTemplateColumn { /// <summary> /// Setups the filter controls. /// </summary> /// <param name="cell">The cell.</param> protected override void SetupFilterControls(TableCell cell) { var rcBox = new RadComboBox { ID = "DropDownList1", AutoPostBack = true, DataTextField = DataField, DataValueField = DataField }; rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged; var table = GetDataTable(); var row = table.NewRow(); row[DataField] = ""; table.Rows.InsertAt(row, 0); rcBox.DataSource = table; cell.Controls.Add(rcBox); } /// <summary> /// Sets the current filter value to control. /// </summary> /// <param name="cell">The cell.</param> protected override void SetCurrentFilterValueToControl(TableCell cell) { if (!(CurrentFilterValue == "")) { ((RadComboBox)cell.Controls[0]).Items.FindItemByText(CurrentFilterValue).Selected = true; } } /// <summary> /// Gets the current filter value from control. /// </summary> /// <param name="cell">The cell.</param> /// <returns></returns> protected override string GetCurrentFilterValueFromControl(TableCell cell) { var currentValue = ((RadComboBox)cell.Controls[0]).SelectedItem.Value; CurrentFilterFunction = (currentValue != "") ? GridKnownFunction.EqualTo : GridKnownFunction.NoFilter; return currentValue; } /// <summary> /// Handles the SelectedIndexChanged event of the rcBox control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs"/> instance containing the event data.</param> protected void rcBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { ((GridFilteringItem)(((RadComboBox)sender).Parent.Parent)).FireCommandEvent("Filter", new Pair()); } /// <summary> /// Gets the filter data field. /// </summary> /// <returns></returns> protected override string GetFilterDataField() { return DataField; } #region Private Members /// <summary> /// Gets the data table. /// </summary> /// <returns></returns> public DataTable GetDataTable() { var offenseModifiers = BusinessProcessManagerFactory<IOffenseTypeManager>.Instance.Get().GetOffenseModifiers(); // convert to datatable var myDataTable = SqlTableTypeHelper.CreateTableType(offenseModifiers.Select(x => x.ModifierDescription).ToList(), typeof(String), "ModifierDescription"); return myDataTable; } #endregion }