Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
138 views
Hello Sir,
Im using a rad editor as ediotr in my web application.
 i added a table in radeditor from word and then after i set a table properties in radediotr to border type=solid and border width=1
after that when i see the report in pdf format then first cell width is increased .
i didnt find out the reason for that please tell me solution for that

pls reply ASAP.

thanks in Advancem,
Bhushan
Rumen
Telerik team
 answered on 25 Oct 2011
2 answers
120 views
In the following example: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

I would like to add a small spinning .gif in front of the "loading..." text to indicate activity. Is this possible?

You can look in the "LoadCountries()" javascript function of the examples source code to see where the "loading" text gets set.
Ivana
Telerik team
 answered on 25 Oct 2011
11 answers
415 views

I have implemented many RadGrids and they all work fine but for the life of me I can't understand why the "Update" command doesn't fire when I hit the update button. Here is my code:

Markup: This page is NOT ajaxified

<telerik:RadGrid ID="RadGridEmployees" runat="server" Visible="False" 
    AutoGenerateColumns="False" GridLines="None" AllowSorting="True" 
        AllowPaging="True" Width="975px" AllowAutomaticUpdates="false"
        AllowAutomaticInserts="false" AllowAutomaticDeletes="false">
    <HeaderContextMenu>
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </HeaderContextMenu>
    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
    <MasterTableView AllowPaging="true" PageSize="25" DataKeyNames="UserID" EditMode="InPlace" 
    AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false">
    <Columns> 
        <telerik:GridEditCommandColumn ButtonType="ImageButton" >
            <ItemStyle VerticalAlign="Top" Width="5px" />
        </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="UserID" 
            Groupable="False" HeaderText="User ID" ReadOnly="True" SortExpression="UserID" 
            UniqueName="UserID">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="DIV_NUM" 
            Groupable="False" HeaderText="Division" ReadOnly="True" SortExpression="DIV_NUM" 
            UniqueName="DIV_NUM">
            <ItemStyle Width="50" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="TIN_NUM" 
            Groupable="False" HeaderText="TIN" ReadOnly="True" 
            SortExpression="TIN_NUM" UniqueName="TIN_NUM">
            <ItemStyle Width="100" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="FIRST_NAME" 
            Groupable="False" HeaderText="First Name" ReadOnly="True" 
            SortExpression="FIRST_NAME" UniqueName="FIRST_NAME">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" Groupable="False" 
            HeaderText="Last Name" ReadOnly="True" SortExpression="LAST_NAME" 
            UniqueName="LAST_NAME" DataField="LAST_NAME">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="BIRTH_YYYYMMDD" 
            DataFormatString="{0:d}" Groupable="False" HeaderText="DOB" ReadOnly="True" 
            SortExpression="BIRTH_YYYYMMDD" UniqueName="BIRTH_YYYYMMDD">
            <ItemStyle Width="75" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="UserEmail" 
            Groupable="False" HeaderText="E-Mail" SortExpression="UserEmail" 
            UniqueName="UserEmail">
            <ItemStyle Width="175" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="secQuestion" 
            Groupable="False" HeaderText="Security Question" ReadOnly="True" 
            SortExpression="secQuestion" UniqueName="secQuestion">
            <ItemStyle Width="125" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn AllowFiltering="False" DataField="secQuestionAnswer" 
            Groupable="False" HeaderText="Security Question Answer" ReadOnly="True" 
            SortExpression="secQuestionAnswer" UniqueName="secQuestionAnswer">
            <ItemStyle Width="125" />
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ButtonType="LinkButton" UniqueName="ResetPasswordColumn" Text="Reset Password" CommandName="Reset">            
            <ItemStyle Width="50px" /> 
        </telerik:GridButtonColumn>
        <telerik:GridTemplateColumn UniqueName="Login">
            <ItemTemplate>
                <a href='Login.aspx?uid=<%# Container.DataItem("UserID") %>'
                                title="Log in as user" target="_blank">Login</a>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
    </Columns>    
                      
    <EditFormSettings CaptionDataField="UserId" EditFormType="Template"
        CaptionFormatString="Edit e-mail address for user: {0}.">
        <EditColumn UniqueName="EditCommandColumn1">
        </EditColumn>
        <FormTemplate>
  
            <div style="padding-top:10px"></div>
                      
            <table width="100%" align="center" cellspacing="5">
                <tr valign="top">
                    <td style="width:20%; font-weight:bold" align="right" nowrap>
                        *Email Address:
                    </td>
                    <td style="width:80%;" align="left">
                        <telerik:RadTextBox ID="RadTextBoxEmail" runat="server" MaxLength="50" SelectionOnFocus="SelectAll"></telerik:RadTextBox>
                        <asp:RequiredFieldValidator ID="ValidatorEmail" runat="server" ErrorMessage="Please enter the e-mail address"
                        Display="None" ControlToValidate="RadTextBoxEmail" Text="*" SetFocusOnError="true" />
                        <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutEmail"
                        TargetControlID="ValidatorEmail" HighlightCssClass="validatorCalloutHighlight" />
                    </td>
                </tr>
            </table>                      
                      
            <table style="width: 100%">
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="Button1" Text="Update" runat="server" CommandName="Update">
                        </asp:Button> 
                        <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel">
                        </asp:Button>
                    </td>
                </tr>
            </table>
                      
            <div style="padding-bottom:30px"></div>
                   
        </FormTemplate>
  
    </EditFormSettings>
                  
</MasterTableView>
  
<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
</ClientSettings>
  
<FilterMenu>
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</FilterMenu>
</telerik:RadGrid>

Code (which never fires):

Private Sub RadGridEmployees_UpdateCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles RadGridEmployees.UpdateCommand
    Dim lDataItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
    Dim lRadTextBoxEmail As RadTextBox = lDataItem.FindControl("RadTextBoxEmail")
    Dim lUserId As String = lDataItem.GetDataKeyValue("UserID")
    UserServiceHelper.UpdateUserEmail(lUserId, lRadTextBoxEmail.Text.Trim.ToLower)
    RadGridEmployees.EditIndexes.Clear()
End Sub


I don't get it...anyone?
Iana Tsolova
Telerik team
 answered on 25 Oct 2011
1 answer
171 views
Hello,

For the HeaderDateformat of the TimeLine view; can I change the value of this to be a non-date field?

For example - Instead of saying something like "October 2011 - November 2011", I would like for it to say something like "October N - 16" where N is a value of my choosing.  I have included some screenshots.

So, basically, can I problematically change this through code (client,server, or CSS)?
Plamen
Telerik team
 answered on 25 Oct 2011
3 answers
129 views
Hi
I think that I've found bug in RadGrid.
When I wrote such code:

var radGrid = $find("RadGrid1"));
radGrid.add_command(function (sender, args) {
                        alert("script command handler"); 
                    });

I never saw alert window.
But after I've added on the server side:
        <ClientSettings>
            <ClientEvents OnCommand="function() {  alert("script command handler 2");  }" />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>

I saw 2 alerts.
So, now I live on server side:
<ClientEvents OnCommand="function() { }" />
And client handler works

Iana Tsolova
Telerik team
 answered on 25 Oct 2011
3 answers
299 views
Hi
I'm using the radchart in my application.
I need to set the height and width for the chart based on resolution of screen.
I try to on window.onload or window.resize.
But I'm getting the radchart null.

below is my code:

function ResizeRadChart() {
          var width = screen.width;
          var height = screen.height;
          var chrtObject = $find("<%= trndChrt.ClientID %>");
  
          switch (height) {
              case 1024:
                   //here i need set the chart height and width
                  break;
  
              case 960:
                   
                  break;
  
              case 864:
                    
                  break;
              case 768:
                    
                  break;
              case 720:
                   
                  break;
              case 600:
                    
                  break;
          }
      }
I'm getting null if I use the $find.
but I If I do like var chrtObject = $get("<%= trndChrt.ClientID %>");
I'm getting the object but not able to see height and width properties.
pls help me in this
Ves
Telerik team
 answered on 25 Oct 2011
1 answer
224 views
hello,

i am working on email functionality and recently i  am using rad uploader to upload files and send to mails through smtp connection ,the problem is if i send notepad  files it is uploading and sending to specified mailid ,but if we upload .pdf or .doc means  pdf or wordformat files e.t.c it is not sending  we are getting an error that file cannot found at path specified .i am sending a code block please reply soon
void SendEMail()
   {
       if (Session["UserID"] != null) //from home.aspx
       {
           newmailuserid = Convert.ToInt32(Session["UserID"]);
       }
       DbLayer objDB = new DbLayer();
       System.Net.Mail.MailMessage Message = new System.Net.Mail.MailMessage();
       Message.To.Add(rdtxtTo.Text);
       if (rdtxtCC.Text != string.Empty)
       {
           Message.CC.Add(rdtxtCC.Text);
       }
       Message.Subject = rdtxtSubject.Text;
       Message.Body = rdtxtBody.Text;
        
        
       System.Net.Mail.SmtpClient SmtpClient = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
       SmtpClient.EnableSsl = true;
       SmtpClient.Credentials = new System.Net.NetworkCredential("abc.hits.com", "hits@123");
       System.Net.Mail.MailAddress FromEmail = new System.Net.Mail.MailAddress(TextBox1.Text);
       Message.From = FromEmail;
             try
       {
           System.Net.Mail.Attachment attachment;
           foreach (UploadedFile file in RadUpload1.UploadedFiles)
           {
               try
               {
                   string strFileName = null;
                   strFileName = System.IO.Path.GetFileName(file.FileName);
                   attachment = new System.Net.Mail.Attachment(Server.MapPath(strFileName));
                   Message.Attachments.Add(attachment);
               }
               catch 
               {
               }
           }
           SmtpClient.Send(Message);
Genady Sergeev
Telerik team
 answered on 25 Oct 2011
3 answers
258 views
Hello,

Could anyone shed some light on the 'SelectedToggleStateIndex' and 'SelectedToggleState' properties??

It does not do anything here. 'SelectedToggleStateIndex' is always zero.

<telerik:RadButton ID="rbt_1" ButtonType="LinkButton" GroupName="0001" AutoPostBack="false" UseSubmitBehavior="False" ToggleType="Radio" Text="0-7" runat="server" />
<telerik:RadButton ID="rbt_2" ButtonType="LinkButton" GroupName="0001" AutoPostBack="false" UseSubmitBehavior="False" ToggleType="Radio" Text="8-27" runat="server" />
<telerik:RadButton ID="rbt_3" ButtonType="LinkButton" GroupName="0001" AutoPostBack="false" UseSubmitBehavior="False" ToggleType="Radio" Text="28-82" runat="server" />
<telerik:RadButton ID="rbt_4" ButtonType="LinkButton" GroupName="0001" AutoPostBack="false" UseSubmitBehavior="False" ToggleType="Radio" Text="83-100" runat="server" />

Thanks,

Erik
Kevin
Top achievements
Rank 2
 answered on 25 Oct 2011
5 answers
196 views
This was working for me, but can't figure out why not now...

I have a radMenu in a MasterPage.. disabled embedded skins.. styling with css.  The menu automatically added the 'rmFocused' class.. when applicable.

Now, I can't see what's different.. or why.. but it's no longer adding the class to the active tab.  SiteMap is the same, urls the same.. same stylesheets/declarations.. same properties.

Any ideas as to why? 
What factors affect whether menu adds it?  Not adds it?
I thought it was just a matching href to raw url??

Thanks!  D
Kate
Telerik team
 answered on 25 Oct 2011
1 answer
131 views
I'm working with the Telerik RadTreeView;

One objective for the functionality of the RadTreeView is to allow a User to either click the plus (+) sign (next to Node Name), or click the actual Node Name, and expand the Node;

<telerik:RadTreeView ID="RadTreeView1" runat="server"  
              
         OnNodeExpand="RadTreeView1_NodeExpand" ForeColor="Black" 
            Font-Names="Microsoft Sans Serif" 
            onnodeclick="RadTreeView1_NodeClick" Height="600px" Width="300px" 
                    Font-Size="Medium" OnClientNodeClicked="ClientNodeClicked">
                              
        </telerik:RadTreeView>

<script type="text/javascript" language="javascript">
    function ClientNodeClicked(sender, eventArgs) {
        var node = eventArgs.get_node();
        //alert("You clicked " + node.get_text());
        if (node) {
            node.expand();
        }
          
    }
</script>

The above code works briefly, and expands a selected RadTreeView Node for a split second; However, because the RadTreeView is being built dynamically in the C# code-behind, a post back occurs, and the expanded node quickly returns to an un-expanded state;

Thanks in advance for any insight;  Best regards - Rob
Plamen
Telerik team
 answered on 25 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?