Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
192 views
Hi,
 I have the rad masked input text box and when the page is loaded and the masked text box is empty i see the position of _ lines shrinked and when i start typing it moves along. Can any one help please.I ma using telerik 2009
     <telerik:RadMaskedTextBox MaxLength="11" ID="inpID" runat="server" PromptChar="_" 
                Skin="WebBlue" Mask="###-##-####" Height="15px" Width="65px" BorderColor="black"
                <ClientEvents OnFocus="Focus" /> 
            </telerik:RadMaskedTextBox>&nbsp;<br /> 
 
 
   
         function Focus(sender, eventArgs) 
            { 
               sender.selectAllText(); 
            } 
         


Thank you
John
Top achievements
Rank 1
 answered on 22 Oct 2009
5 answers
204 views
I have an object that has two complex subobjects that are references to other objects.

    [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; } 
        } 
... 


I want the Grid to allow me to create, edit and delete this object. I have utilized the GridDropDownColumn

<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> 


Of course this doesn't work because when editing this the GridDropDownColumn doesn't return the Server object it returns the ServerID (int).

What is the best way to accomplish what I want? Any suggestions?

I have tried creating a DeployedServerID property that would grab the object when passed an id from the dropdown. But then I get a OpenAccess error that two different ObjectScopes tried to manage the same object.

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>(); 
            } 
        } 


Thanks,
   Josh



Joshua Kent
Top achievements
Rank 1
 answered on 22 Oct 2009
2 answers
165 views
Hi,

I have a RadGrid with a GridTemplateColumn.  I want my header when I am in Edit or Insert mode, to be aligned to the top vertically?  I searched the forums but found not a single thread on how to do it.  Is everyone else just accepting that the HeaderText is aligned to the middle vertically?  Any help is much aprpeciated.  Thank you.

- Randy
Randy
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
108 views
I'm using a javascript redirect to send the user to on the next page and I'd like to have the RadAjaxLoadingPanel display while this is happening.  I tried this code but currentLoadingPanel is showing up as null.  It would be even better if I could make the panel display from the CodeBehind, otherwise if someone could tell me what I'm doing wrong here, javascript would be fine.

 

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> 
                <style="margin-top:15px">  
                    Having trouble? Please <href=# style="color: #222222">click here</a> for assistance.  
                </p> 
                <style="margin:5px; vertical-align: bottom;">  
                    <img src="images/microsoft_certified.jpg" /> 
                </p> 
            </div> 
              
              
        </telerik:RadAjaxPanel> 
    </form> 
Daniel
Telerik team
 answered on 22 Oct 2009
1 answer
88 views
Hello,
I want to set a row of my RadGrid to EditMode when I select it.
I write this script function that occour OnRowSelected clientevent
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);  
                      
                 } 
My problem is that the eventArgs is always NULL. Can you tell me why this occour? I search on internet a different method to access to the selected row for open it in editmode onrowselected event but I can't find anything.
Best Regards
archimede 
Pavlina
Telerik team
 answered on 22 Oct 2009
2 answers
154 views
I'm using the selected nodes in a treeview to populate a simple breadcrumb in my tab strip on the client side.  If I haven't clicked on the parent node first then it will return null.  Here is the code that is driving the functionality.  Any help would be greatly appreciated...

        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);
            }
        }

Joe Burton
Top achievements
Rank 1
 answered on 22 Oct 2009
1 answer
96 views
Actually we are facing some issue while setting the default FileType while uploading the file by using RadUpload Control in Telerik

The client requirement is that we require File Type as CSV in the browse option for RadUpload
Can somebody help me in this regards?

Thanks in advance.

Rahul Nasa
Sapient
rahulnasa@gmail.com
Genady Sergeev
Telerik team
 answered on 22 Oct 2009
2 answers
81 views
I'm having an issue displaying radchart in a custom webpart deloyed to SP2010 beta 1 site
ChartHandler is correctly registered. Same code works in an asp.net site
am i missing something?
Ves
Telerik team
 answered on 22 Oct 2009
1 answer
95 views
I'm hoping this is a simple question, though we have spent a lot of time without finding the right answer.  We have a site - http://columbusrealtors.com/Classes_Events/default.aspx?ID=calendarview where we need better control over the individual event line height display.  Under IE 8 you'll see that the bottom of the text is cut off (y's and g's).  We are looking for the settings to control the following:
  1. how many pixels of display height will appear for each row
  2. how many pixels of padding between rows are set
  3. how to dynamically display two rows of data for events that need the extra room

Where do we set these and how?
thanks!
Genady Sergeev
Telerik team
 answered on 22 Oct 2009
1 answer
79 views
Hi Telerik Team,

I would like to report an error in the help of RadGrid : http://www.telerik.com/help/aspnet-ajax/grdvalidation.html
In the first VB.Net sample code, the handle clause is missing (Handles RadGrid1.ItemCreated)

 Protected Sub RadGrid1_ItemCreated(ByVal sender As ObjectByVal 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  

Cheers,

S.F.
Daniel
Telerik team
 answered on 22 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?