<%@ Page Title="" Language="C#" MasterPageFile="~/DWL.Master" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="DWL_WebApplication.UserList" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"><html><head><title></title> </head> <body style="width:100%; height:100%; background-color:#666666;"> <div id="wrapper" class="grid" style="background-color:#F0F2F4 !important; padding-bottom:30%; margin-top:-55px; padding-left:3px; width:100%; height: 100%;"> <form id="Form1" action=""> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <div style="margin-left:14px; margin-right:14px; "> <telerik:RadGrid ID="RadGridUserList" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" AllowMultiRowSelection="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" Width="998px" CssClass="gridHeightSet" OnItemDataBound="radGridUser_ItemDataBound" GroupingSettings-CaseSensitive="false" PageSize="20" OnItemCommand="radGridUserList_ItemCommand" OnInit="radGridUserList_OnInit" OnNeedDataSource="RadGridUserList_NeedDataSource"> <HeaderContextMenu> </HeaderContextMenu> <PagerStyle AlwaysVisible="True" /> <MasterTableView CommandItemDisplay="Top" AllowAutomaticDeletes="False" AllowAutomaticInserts="False" AllowAutomaticUpdates="False" AllowFilteringByColumn="True" FilterItemStyle-Height="10px" HeaderStyle-CssClass="gridcloumnHeader" HeaderStyle-Height="35px" FilterItemStyle-Width="100%"> <CommandItemTemplate> </CommandItemTemplate> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> </ExpandCollapseColumn> <AlternatingItemStyle BackColor="#EDF1F3" /> <Columns> <telerik:GridTemplateColumn AllowFiltering="False"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" /><ItemStyle HorizontalAlign="Left" /> <HeaderTemplate> <asp:Label ID="lblHeaderAction" runat="server" Text="Action" CssClass="gridHAlign"></asp:Label> </HeaderTemplate> <ItemTemplate> <asp:Panel ID="editButtonPanel" runat="server" Width="60px"> <asp:ImageButton ID="editUserButton" runat="server" OnClick="editUser_Click" Height="16px" Width="19px" ToolTip="Edit" CausesValidation="False" /> <img alt="" src="images/menu_border-action.gif" /> <asp:ImageButton ID="deleteUserButton" runat="server" OnClick="deleteUser" Height="16px" Width="14px" ToolTip="Delete" CausesValidation="False" /> </asp:Panel> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="UserID" UniqueName="columnUserId" Visible="false"> <HeaderStyle /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserName" UniqueName="columnUserName" FilterControlAltText="Filter columnUserName column" HeaderText="Username" HeaderTooltip="Username" FilterControlWidth="70%" ItemStyle-HorizontalAlign="Center"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" /><ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="IsActive" AllowFiltering="false" AllowSorting="true" FilterControlAltText="Filter columnCategory column" HeaderText="Status" HeaderTooltip="Status" UniqueName="columnUserStatus" Visible="true"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White"/><ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserFullName" FilterControlAltText="Filter columnDetails column" HeaderText="Full Name" HeaderTooltip="Full Name" UniqueName="columnUserFullName" ItemStyle-HorizontalAlign="Center" FilterControlWidth="70%"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" ForeColor="White" HorizontalAlign="Left" Width="200px" Height="15px"/> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="RoleCode" FilterControlAltText="Filter columnUserRole column" HeaderText="Role" HeaderTooltip="Role" AllowFiltering="false" UniqueName="columnRole"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" /> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UserEmail" FilterControlAltText="Filter columnAssignedTo column" HeaderText="Email address" HeaderTooltip="Email address" AllowFiltering="false" UniqueName="columnEmailaddress" FilterControlWidth="70%"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" Width="200px" Height="15px"/> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ClientName" FilterControlAltText="Filter columnCompany By column" HeaderText="Company" HeaderTooltip="Company" UniqueName="columnCompany" AllowFiltering="false" FilterControlWidth="70%"> <HeaderStyle CssClass="gridcloumnHeader gridHAlign" HorizontalAlign="Left" ForeColor="White" Width="200px" Height="15px"/> <ItemStyle HorizontalAlign="Left" /> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> </div> </form> </div> </body> </html></asp:Content><asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server"></asp:Content><AppointmentTemplate>
<div style='background-color: <%# Eval("BackgroundColor")%>); height: 200px'><img src='../uploads/avatars/<%# Eval("Photo") %>' style="height: 28px;float: left" alt='' /> <%# Eval("Subject")%></div>
</AppointmentTemplate>
I will really appreciate if you can help me with the following.
In our application we have some controls with parent child functionality inside rad panel.
We need the dropdown1 ="Yes" enable the remaining controls and "No" to disable them.
On disable/enable the backcolor should change too.
We need to achieve this clientside using javascript.
The other controls include 1 textbox, 1 radDatepicker and 3 radcombobox.
The enable/disable should also change the backcolor.
What's happening is .......
1. TextBox is enabling and disabling also changing the backcolor.
2. Radcombobox is enabling and disabling but not changing the backcolor.
3. RadDatepicker is neither enabling and disabling also not changing the backcolor.
Here is the script
function
OnPriorCathChange() {
// alert("Inside OnPriorCathChange");
var PriorCath;
var ProcedureLookupCombo;
// var ProcedureLookupComboJs;
var ProcedureID;
PriorCath = $telerik.$(
"[id$='UIPriorCath']");
ProcedureLookupCombo = $telerik.$(
"[id$='UIProcedureLookupCombo']");
// ProcedureLookupComboJs = $find(ProcedureLookupCombo[0].id);
var LastCathDate;
var MostRecCathProcID;
var NumPriorCath;
LastCathDate = $telerik.$(
"[id$='UILastCathDate']");
MostRecCathProcID = $telerik.$(
"[id$='UIMostRecCathProcID']");
NumPriorCath = $telerik.$(
"[id$='UINumPriorCath']");
ProcedureID = $telerik.$(
"[id$='ProcedureID']");
var HFConfirm = $telerik.$("[id$='HFConfirm']");
// var LastCathDatetextBox = LastCathDate[0].get_textBox();
if (PriorCath[0].selectedIndex != 1)
{
// if (!confirm('All child records will be deleted. Are you sure you want to proceed?')) {
// HFConfirm.val('0');
// PriorCath[0].selectedIndex = '1';
// return false;
// }
// else {
// HFConfirm.val('1');
//__doPostBack(PriorCath[0].id, '');
// access the select DOM element and set the selected index
ProcedureLookupCombo[0].selectedIndex = 0;
ProcedureLookupCombo[0].attributes(
'disabled').value = true
// ProcedureLookupCombo[0].style.backgroundColor = "Beige";
ProcedureLookupCombo[0].style.backgroundColor =
"Beige";
//document.getElementById(ProcedureLookupCombo[0].id).style.backgroundColor = "Beige";
LastCathDate[0].value =
'';
LastCathDate[0].attributes(
'disabled').value = true
//LastCathDate.attr("disabled", "disabled");
// LastCathDatetextBox.css("backgroundColor", "Beige");
MostRecCathProcID[0].selectedIndex = 0;
MostRecCathProcID.attr(
"disabled", "disabled");
MostRecCathProcID.css(
"backgroundColor", "Beige");
ProcedureID[0].selectedIndex = 0;
ProcedureID.attr(
"disabled", "disabled");
ProcedureID.css(
"backgroundColor", "Beige");
NumPriorCath[0].selectedIndex = 0;
NumPriorCath.attr(
"disabled", "disabled");
NumPriorCath.css(
"backgroundColor", "Beige");
NumPriorCath.val(
'');
// }
}
else {
if (ProcedureLookupCombo.attr("disabled"))
ProcedureLookupCombo.removeAttr(
"disabled");
ProcedureLookupCombo.css(
"backgroundColor", "#05EDFF");
if (LastCathDate.attr("disabled"))
LastCathDate.removeAttr(
"disabled");
LastCathDate.css(
"backgroundColor", "#05EDFF");
if (MostRecCathProcID.attr("disabled"))
MostRecCathProcID.removeAttr(
"disabled");
MostRecCathProcID.css(
"backgroundColor", "#05EDFF");
if (NumPriorCath.attr("disabled"))
NumPriorCath.removeAttr(
"disabled");
NumPriorCath.css(
"backgroundColor", "#05EDFF");
}
}
Thanks,
Gauri
<telerik:GridTemplateColumn UniqueName="CVATemplateColumn" InitializeTemplatesFirst="false"> <HeaderTemplate> <asp:Button ID="id" runat="server" OnClick="NewWindowCommand" /> </HeaderTemplate></telerik:GridTemplateColumn>protected void NewWindowCommand(object sender, EventArgs e){ RadWindowManager windowManager = new RadWindowManager(); RadWindow radWindow = new RadWindow(); // Set the window properties radWindowNavigateUrl = "radWindow.aspx"; radWindow.ID = "radWindowId"; radWindow.VisibleOnPageLoad = true; windowManager.Windows.Add(radWindow ); Form.Controls.Add(radWindow );}<telerik:RadGrid>....</telerik:RadGrid><asp:Button ID="id" runat="server" OnClick="NewWindowCommand" />(rgdGenderAgeSummaryReport.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem)["ExpandColumn"].Visible = false; foreach (GridDataItem dataItem in rgdGenderAgeSummaryReport.MasterTableView.Items) { dataItem["ExpandColumn"].Style["display"] = "none"; dataItem["ExpandColumn"].Visible = false; }<telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"><telerik:RadDock ID="RadDock1" runat="server" Width="300px"><ContentTemplate> <scheduler:MultipleValuesResourceControl runat="server" ID="ResStudent" Type="Student" Label="User: " /></ContentTemplate></telerik:RadDock></telerik:RadDockZone>