Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
126 views
Do I need to get special permission from the Publisher (meaning Telerik) to print out a copy of the Step by Step tutorial for each of my developers? We currently have 15 separate licenses for the RadControls and I would like to print them out and put them into a binder for my developers to reference. I do not want to violate your copyrights on the documentation.


Ivo
Telerik team
 answered on 28 Oct 2009
2 answers
162 views
How to confirm on radwindow close from server side code
kollam2003
Top achievements
Rank 1
 answered on 28 Oct 2009
1 answer
114 views
Hi,

On a grid with hyper link column, client event is not firing when clicking the hyper link. It is firing when you click any other column.


With Regards,
Babul

Princy
Top achievements
Rank 2
 answered on 28 Oct 2009
1 answer
131 views
Hi,
 As you know, when saving html content to a 'multi lines of text' field type within a list, in either the rich or enhanced mode, SharePoint strips out certain markup, for instance: quotes on attributes.

This behavior doesn't happen when a 'multi lines of text' field type is set to plain text, however the RAD editor doesn't override the default text box in this scenario. 

From what i can tell, it looks as if your RAD editor is doing a check on the mode, and if it's plain text, it isn't being rendered. Is there a way to work around this?

Tom.
Stanimir
Telerik team
 answered on 28 Oct 2009
1 answer
98 views
Hi,

How to dyanamically add and delete rows to a RadGrid without causing a postback.
Grid contains text box to entry data.

With Regards,
Babul

Shinu
Top achievements
Rank 2
 answered on 28 Oct 2009
1 answer
275 views
I am trying to add a button to the RadFileExplorer's Toolbar that will allow a user to rename a file (but will run custom programming in the code-behind), and I added the button to the Toolbar as follows:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        AddHandler rfeDocuments.ToolBar.ButtonClick, AddressOf toolBar_ButtonClick 
        Dim customButton As New RadToolBarButton() 
        customButton.CssClass = "test_button" 
        customButton.CommandName = "Rename" 
        customButton.Value = "TEST" 
        customButton.Text = "Rename" 
        rfeDocuments.ToolBar.Items.Add(customButton) 
End Sub 

This makes the button display in the toolbar properly.  I then try to capture the Click event using the following code:
    Protected Sub toolBar_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) 
        Label1.Text = e.Item.Value
    End Sub 

When I click my Rename button, the Label says "Delete".  When I click the Refresh or Open buttons, the label displays the correct Value.  I have also tried capturing the Text of e.Item and that has not worked either, it comes back as  .  Do you have any examples of a fully functioning custom button working on the RadFileExplorer.Toolbar with the Click event being handled?  My goal is to prompt the user for the new filename then create a copy of the selected file with the new name.
Fiko
Telerik team
 answered on 28 Oct 2009
1 answer
270 views
Hi All,

How to find the "ImageButton" in the code block below from code behind page ? Code block below is part of rad grid html code in aspx file.

<rad:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="../Images/editItem.gif">
                                        <HeaderStyle Font-Bold="True" Wrap="False" />
                                        <ItemStyle Wrap="true" />
                                    </rad:GridEditCommandColumn> 

Also after finding this button, i need to write some code on click event of this button in GridEditCommandColumn . So which event i should use for this ?


Thanks in advance
Rahul
Princy
Top achievements
Rank 2
 answered on 28 Oct 2009
1 answer
137 views
Hi telerik,

I have an ASP Table with collection of RadNumericTextBoxes inside it. like this:
<asp:Table ID="tblMatrix" runat="server" CellSpacing="3" CellPadding="3">
         <asp:TableRow runat="server" ID="tblBodyRow_1">
                   <asp:TableCell runat="server" ID="tblBodyCell_R1_C2" Width="75px">
                            <telerik:RadNumericTextBox ID="txtQty_R1_C2" runat="server" Skin="AsiSkin" EnableEmbeddedSkins="False"
                                                                      Width="75px" Value="0">
                                <NumberFormat AllowRounding="false" KeepNotRoundedValue="true" DecimalDigits="0" />
                            </telerik:RadNumericTextBox>
                        </asp:TableCell>
                          .................. other cells
         </asp:TableRow >
         ................ other rows
</asp:Table >

on blur event of each text box I need to calculate total of all values in all text boxes. How do I do it in javascript?
Currently I have an OnBlure event where I traverse all textboxes inside table trying to calc. the sum... however it looks like the rendered
RadNumericTextBox consists of more then one html input control and the value of the visible control is not numeric...  Here is my code:
       ///////////////////////// =========== OnBlur Events =========== ////////////////////////////////// 
        function QtyTxt_OnBlur()  
        {             
            var cntrlMtrxTable = $get('<%= tblMatrix.ClientID %>');             
            if (cntrlMtrxTable)  
            { 
                CalculateMatrixTotals(cntrlMtrxTable); 
            } 
        } 
 
        /////////////////////////////////// UTILITIES //////////////////////////////////////// 
         
        ////////////////////////////////////////////////////////////////////////////////////// 
        /// Name: CalculateMatrixTotals() 
        /// Function Type: Event 
        /// Parameters:          
        ///////////////////////////////////////////////////////////////////////////////////// 
        function CalculateMatrixTotals(cntrlMtrxTable)  
        {             
            var cntrlTotalUsed = $get('<%= txtTotalUsed.ClientID %>'); 
            var cntrlTotalLeft = $get('<%= txtTotalLeft.ClientID %>'); 
            var cntrlCurrentLITotalQty = $get('<%= hdnCurrentLITotalQty.ClientID %>'); 
            var sumOfMatrixQty = 0; 
 
            var myInputArray = cntrlMtrxTable.getElementsByTagName("INPUT"); 
            for (var i = 0; i < myInputArray.length; i++)  
            { 
                var currInput = myInputArray[i]; 
                if (currInput.type == "text" && currInput.style.visibility != 'hidden' && currInput.id.indexOf('txtQty_') >= 0)  
                { 
                    sumOfMatrixQty += currInput.value; 
                }               
            } 
 
            if (cntrlTotalUsed && cntrlTotalLeft && cntrlCurrentLITotalQty)  
            { 
                var LITotalQty = cntrlCurrentLITotalQty.value; 
                cntrlTotalUsed.value = sumOfMatrixQty; 
                cntrlTotalLeft.value = LITotalQty - sumOfMatrixQty; 
                alert('cntrlTotalUsed.value = ' + cntrlTotalUsed.value); 
                alert('cntrlTotalLeft.value = ' + cntrlTotalLeft.value) 
                alert('sumOfMatrixQty = ' + sumOfMatrixQty); 
            } 
        } 
         
    </script> 
 
</telerik:RadScriptBlock> 




Yavor
Telerik team
 answered on 28 Oct 2009
5 answers
119 views

Hello ,
i am using a radRotator emedded in webpart the rotator works fine in asp web application , but when i use my web part the rotator didn't works fine . it didn't rotate to all item it just display the item no 2 then the rotator rotate to an empty item .and stop and nothing else occures ,

here is rotator

<%

@ Control Language="C#" AutoEventWireup="true" Inherits="SACMSharePointWebPart.uc_FastTickerNews" %>

 

<%

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2009.1.402.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

 

        <telerik:RadRotator ID="NewsRotator" RotatorType="AutomaticAdvance" ScrollDirection="Up" 
            SlideShowAnimation-Type="Fade" ScrollDuration="200" runat="server" Width="100%" 
            FrameDuration="6000" ItemHeight="30px" ItemWidth="100%" Height="30px" InitialItemIndex="0" 
            Skin="Vista">  
            <ItemTemplate> 
                <table style="text-align: right;">  
                    <tr style="height: 30px;">  
                        <td> 
                            <div style="width: 100%; filter: alpha(opacity=90); font-weight: bold; font-family: Tahoma;  
                                background-color: #fff"> 
                                <%# Eval("Location") %> 
                                &nbsp; :&nbsp;</div> 
                        </td> 
                        <td style="padding-left: 10px">  
                            <div style="width: 100%; filter: alpha(opacity=90); font-family: Tahoma;  
                                background-color: #fff"> 
                                <telerik:RadTicker ID="RadTicker1" runat="server">  
                                    <Items> 
                                        <telerik:RadTickerItem Text='<%# Eval("Title") %>' /> 
                                    </Items> 
                                </telerik:RadTicker> 
                            </div> 
                        </td> 
                    </tr> 
                </table> 
            </ItemTemplate> 
        </telerik:RadRotator> 

and the rotator code behind
    public class uc_FastTickerNews : UserControl  
    {  
        public RadRotator NewsRotator  
        {  
            get 
            {  
                return this.FindControl("NewsRotator"as RadRotator;  
            }  
        }  
 
        /// <summary>  
        /// Handles the Load event of the Page control.  
        /// </summary>  
        /// <param name="sender">The source of the event.</param>  
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            List<TickerNewsContainer> lst = new List<TickerNewsContainer>();  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 1" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 2 " });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "3 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION4 " });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "5 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "6 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION7 " });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "8 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "9 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "10 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 11" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 12 " });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "13 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION14 " });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "15 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "16 LOCATION" });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION17 " });  
            lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "18 LOCATION" });  
            this.NewsRotator.DataSource = lst;  
            this.NewsRotator.DataBind();  
        }  
    } 


alse here is the web part code

   [

Guid("d879501c-6386-4646-bd57-cd012ca9f6e6")]

 

 

   public class SACMFastTickerNews : System.Web.UI.WebControls.WebParts.WebPart

 

   {

 

       public uc_FastTickerNews FastTickerNews { get; set; }

 

 

       
       public
SACMFastTickerNews()

 

       {

       }

       protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
            this.FastTickerNews = (uc_FastTickerNews)Page.LoadControl("~/_controltemplates/uc_FastTickerNews.ascx");  
            this.Controls.Add(this.FastTickerNews);  
        }
        #region Events & Fixers  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
         ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);  
            if (scriptManager == null)  
            {  
                scriptManager = new ScriptManager();  
                if (this.Page.Form.FindControl("ScriptManager1") == null)  
                {  
                    scriptManager.ID = "ScriptManager1";  
                    this.Page.Form.Controls.AddAt(0, scriptManager);  
                }  
            }  
            return scriptManager;  
        }
        #endregion 
   }

please help me :)
Fiko
Telerik team
 answered on 28 Oct 2009
4 answers
430 views

I have columns with defined CssClass, like this one, for instance:

<telerik:GridBoundColumn HeaderStyle-CssClass='GridHeaderGreen ca' ItemStyle-CssClass='ca' HeaderText='Status' SortExpression='Wizard.AlertStatus.Name' DataField='Status.Name' />

In some cases I want to override the look of row cells for every column, i.e. i need to take ItemStyle.CssClass for the column and complement it with some additional class:

protected void rgAlertConfigView_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if ((e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) && e.Item.DataItem != null)
{

....
for (var i = 0; i < item.Cells.Count; i++)
{
item.Cells[i].CssClass = String.Format("{0} {1}", item.OwnerTableView.Columns[i].ItemStyle.CssClass, [some class depending on data in the row]); 
}
}

rgView_ItemCreated(sender, e);
}

This stuff does not work, because there is some mess: item.Cells.Count = 12, item.OwnerTableView.Columns.Count = 10 (this is correct value) and there is no straight correspondence between Cell and Column and I cannot see how to establish it (?)

Every cell should be able to 'know' what is its column style.

p.s. Thanks to myself! At last I found solution:

for (var i = 0; i < item.OwnerTableView.Columns.Count; i++)
{
item[item.OwnerTableView.Columns[i]].CssClass = String.Format("{0} {1}{2}", item.OwnerTableView.Columns[i].ItemStyle.CssClass, item[item.OwnerTableView.Columns[i]].CssClass, dimmed);
}

Alexander
Top achievements
Rank 1
 answered on 28 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?