| <telerik:RadMaskedTextBox MaxLength="11" ID="inpID" runat="server" PromptChar="_" |
| Skin="WebBlue" Mask="###-##-####" Height="15px" Width="65px" BorderColor="black"> |
| <ClientEvents OnFocus="Focus" /> |
| </telerik:RadMaskedTextBox> <br /> |
| function Focus(sender, eventArgs) |
| { |
| sender.selectAllText(); |
| } |
| [Telerik.OpenAccess.Persistent(IdentityField = "deploymentID")] |
| public class Deployment |
| { |
| enum DeploymentStatus { Offline = 0, Running = 1, Deploying = 2 }; |
| private int deploymentID; |
| public int DeploymentID |
| { |
| get { return deploymentID; } |
| set { deploymentID = value; } |
| } |
| private Application deployedApplication; |
| public Application DeployedApplication |
| { |
| get { return deployedApplication; } |
| set { deployedApplication = value; } |
| } |
| private Server deployedServer; |
| public Server DeployedServer |
| { |
| get { return deployedServer; } |
| set { deployedServer = value; } |
| } |
| ... |
| <Columns> |
| <telerik:GridBoundColumn DataField="DeploymentID" DataType="System.Int32" HeaderText="DeploymentID" ReadOnly="True" SortExpression="DeploymentID" UniqueName="DeploymentID"> |
| </telerik:GridBoundColumn> |
| <telerik:GridDropDownColumn DataField="DeployedServer" HeaderText="Server" UniqueName="DeployedServer" DropDownControlType="DropDownList" DataSourceID="odsServers" ListTextField="ServerName" ListValueField="ServerID"></telerik:GridDropDownColumn> |
| <telerik:GridBoundColumn DataField="BuildServerURI" HeaderText="BuildServerURI" SortExpression="BuildServerURI" UniqueName="BuildServerURI"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="CurrentBuild" DataType="System.Int32" HeaderText="CurrentBuild" SortExpression="CurrentBuild" UniqueName="CurrentBuild"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Location" HeaderText="Location" SortExpression="Location" UniqueName="Location"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn DataField="Application" UniqueName="TemplateColumn"> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| private Server deployedServer; |
| public Server DeployedServer |
| { |
| get { return deployedServer; } |
| set { deployedServer = value; } |
| } |
| public int DeployedServerID |
| { |
| get |
| { |
| if (deployedServer == null) |
| return -1; |
| else |
| return deployedServer.ServerID; |
| } |
| set |
| { |
| deployedServer = (from servers in DataModel.ObjectScope().Extent<Server>() where servers.ServerID == value select servers).First<Server>(); |
| } |
| } |
var currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
var currentUpdatedControl = "loginArea";
currentLoadingPanel.show(currentUpdatedControl);
| <form id="form1" runat="server"> |
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function forwardUser(page) { |
| var currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>"); |
| var currentUpdatedControl = "loginArea"; |
| currentLoadingPanel.show(currentUpdatedControl); |
| window.parent.navigate(page); |
| } |
| </script> </telerik:RadCodeBlock> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Web20" /> |
| <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" MinDisplayTime="1000"></telerik:RadAjaxLoadingPanel> |
| <div style="font-size: 8pt; font-family: Tahoma; color: #222222;" id="loginArea"> |
| <img src="images/Solutions7-Logo.png" alt="" /> |
| <div style="margin-top:5px; text-align: left; width: 150px; margin-left: auto; margin-right: auto"> |
| <telerik:RadTextBox ID="txtUsername" runat="server" EmptyMessage="username" |
| InvalidStyleDuration="100" Width="125px" MaxLength="25"></telerik:RadTextBox> |
| <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" |
| ControlToValidate="txtUsername" ErrorMessage="Username is required" Display="Dynamic" EnableClientScript="true" |
| SetFocusOnError="True"></asp:RequiredFieldValidator> |
| <telerik:RadTextBox ID="txtPassword" style="margin-right:0px;" Runat="server" |
| Width="125px" AutoCompleteType="None" |
| Textmode="Password" SelectionOnFocus="SelectAll" Height="15px" |
| MaxLength="25"></telerik:RadTextBox><asp:Button ID="Button1" runat="server" |
| Text="Log In" UseSubmitBehavior="true" /> |
| <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" |
| ControlToValidate="txtPassword" ErrorMessage="Password is required" Display="Dynamic" |
| SetFocusOnError="True"></asp:RequiredFieldValidator> |
| </div> |
| <p> |
| <asp:Label ID="Label1" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label> |
| </p> |
| <p style="margin-top:15px"> |
| Having trouble? Please <a href=# style="color: #222222">click here</a> for assistance. |
| </p> |
| <p style="margin:5px; vertical-align: bottom;"> |
| <img src="images/microsoft_certified.jpg" /> |
| </p> |
| </div> |
| </telerik:RadAjaxPanel> |
| </form> |
| function RowClick(sender, eventArgs) |
| { |
| if(editedRow && hasChanges) |
| { |
| if(confirm("Update changes?")) |
| { |
| hasChanges = false; |
| $find("<%= GridName.MasterTableView.ClientID %>").updateItem(editedRow); |
| } |
| else |
| { |
| hasChanges = false; |
| } |
| } |
| if(eventArgs != null){ |
| alert("eventOK"); |
| }else{ |
| alert("eventNULL"); |
| } |
| editedRow = eventArgs.get_ItemIndexHierarchical(); |
| $find("<%= GridName.MasterTableView.ClientID %>").editItem(editedRow); |
| } |
function OnClientNodeClicked(sender, args)
{
var treeView = $find("<%= RadTreeView1.ClientID %>");
var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
var selectedTab = tabStrip.get_selectedTab();
var selectedNode = treeView.get_selectedNode();
var parentNode = selectedNode.get_parent();
if (selectedNode.get_level() == 0)
{
selectedTab.set_text(selectedNode._text);
} else {
selectedTab.set_text(parentNode._text + " -> " + selectedNode._text);
}
}
| Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated |
| If (TypeOf e.Item is GridEditableItem AndAlso e.Item.IsInEditMode) Then |
| Dim item As GridEditableItem = CType(e.Item,GridEditableItem) |
| Dim editor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("ContactName"),GridTextBoxColumnEditor) |
| Dim cell As TableCell = CType(editor.TextBoxControl.Parent,TableCell) |
| Dim validator As RequiredFieldValidator = New RequiredFieldValidator |
| editor.TextBoxControl.ID = "ID_for_validation" |
| validator.ControlToValidate = editor.TextBoxControl.ID |
| validator.ErrorMessage = "*" |
| cell.Controls.Add(validator) |
| End If |
| End Sub |