or
I'm trying to find a way to change the background colour of a row/cell.
Currently, our asset booking system looks like late-current.gif - whereas the red highlighted booking indicates that that resource it is overdue and hasn't been returned. What is required is for the whole row of the timeline to turn red if the asset is overdue, as indicated in late-required.gif.
The appointments change colour using the following code:
protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e) { DateTime now = DateTime.Now; if (e.Appointment.Resources.GetResource("Status", 1) != null) e.Appointment.CssClass = "rsCategoryOrange";PolicyAPI.GetPolicyData(__getData) has data but the grid does not seem to reload. I have checked all of the samples but have not found any direction. I appreciate any assistance.protected void Page_Init(object source, EventArgs e)
{
this.__policyRadGrid = PolicyRadGrid.GridDefinition();
this.PlaceHolder1.Controls.Add(this.__policyRadGrid);
}
protected void Page_Load(object sender, EventArgs e)
{
this.__policyRadGrid.NeedDataSource += new GridNeedDataSourceEventHandler(PolicyRadGrid_NeedDataSource);
}
protected void btnRetrieveData_OnClick(object sender, EventArgs e){
__getData = true;
this.__policyRadGrid.Rebind();} protected void PolicyRadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e){ this.__policyRadGrid.DataSource = PolicyAPI.GetPolicyData(__getData);}<telerik:RadGrid ID="grdResult" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" PageSize="20" Width="100%" BorderStyle="None" EnableEmbeddedSkins="False" EnableViewState="true" Culture="de-DE" ShowFooter="True" ShowGroupPanel="True"> <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true" DataBinding-CountPropertyName="CountProduct" DataBinding-DataPropertyName="DataProduct"> <Selecting AllowRowSelect="true" /> <DataBinding Location="WebServiceProduct.asmx" SelectMethod="GetDataAndCount" EnableCaching="false"/> <ClientEvents OnDataBinding="grdResult_DataBinding" OnDataBound="grdResult_DataBound"/> </ClientSettings> <HeaderStyle Wrap="False" /> <MasterTableView GroupLoadMode="Client"> <GroupByExpressions> <telerik:GridGroupByExpression> <SelectFields> <telerik:GridGroupByField FieldAlias="USER_Profile" FieldName="USER_Profile"></telerik:GridGroupByField> </SelectFields> <GroupByFields> <telerik:GridGroupByField FieldName="USER_Profile"></telerik:GridGroupByField> </GroupByFields> </telerik:GridGroupByExpression> </GroupByExpressions> <Columns> <telerik:GridBoundColumn DataField="GroupIcon" HeaderText="Group" UniqueName="colResultGroup" ItemStyle-CssClass="grid_td_line"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Text1" HeaderText="Typ Caption" UniqueName="colResultText1" ItemStyle-CssClass="grid_td_line"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="USER_Profile" HeaderText="USER_Profile" UniqueName="USER_Profile" ItemStyle-CssClass="grid_td_line"></telerik:GridBoundColumn> ... </Columns> </MasterTableView> <PagerStyle Mode="NextPrevAndNumeric" PageButtonCount="10" /> <GroupingSettings ShowUnGroupButton="true" /></telerik:RadGrid>private void llenacomboedificio() { var bdinstedificio = new BD_INSTEntities(); var query = from edi in bdinstedificio.Inmuebles select edi.nom_inm; rdCmbEdificio.DataSource = query.ToList(); }