Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 views
We are under telerik upgradation to the latest version available. On the way we faced an issue saying Radgrid.AsyncRedirect() is not in the new dll (getting "missing any reference" error). Does anyone know what would be the replacement for Radgrid.AsyncRedirect() method to achieve the same functionality in the latest telerik dll (telerik.web.ui)? kindly help. Thank you in advance.
Maria Ilieva
Telerik team
 answered on 24 Sep 2013
2 answers
129 views
Hi,
using combobox and want to stay at default text like select user type after page refresh and data save completed
 <telerik:RadComboBox ID="cmbusertype" runat="server" Width="280px" ExpandAnimation-Type="OutBounce"
                            Skin="WebBlue">
                            <DefaultItem Text="Please Select User Type" Value="-1" />
                        </telerik:RadComboBox>

Thanks
Swapnil
Top achievements
Rank 1
 answered on 24 Sep 2013
2 answers
63 views
I need to display the RadLoadingPanel for the Radgrid however I have a timer that every 3 seconds rebinds the grid. Is it possible to exclude the loading panel on certain events.
Maria Ilieva
Telerik team
 answered on 24 Sep 2013
6 answers
486 views
Hi,
I am using RadGrid which has 4 columns. column2 = GridTemplateColumn with ItemTemplate as textbox and column4 = GridTemplateColumn with ItemTemplate as checkbox.

I need to get the value of the textbox and do some calculation and assign the calculated value to column3 for that row.
I am trying to do it on client side and this is my .ascx code for onblur of the textbox :
function ConvertToUSD(index) {               
               var grid = $find("<%=AntiXss.JavaScriptEncode(rgdPOTypes.ClientID).Trim('\'')%>");
               var MasterTable = grid.get_masterTableView();
               var Row = MasterTable.get_dataItems()[index];                                
               var cell = MasterTable.getCellByColumnUniqueName(Row, "TextboxCurreny");              
               if (!cell) {
                       var nextcell = MasterTable.getCellByColumnUniqueName(Row, "InUSD");              
                       nextcell .InnerHTML = cell.InnerHTML * 50;
               }
           }

In the above code, the value of 'cell' is always coming as null.
file.ascx.cs
protected void rgdPOTypes_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                TextBox txtBox = (TextBox)item.FindControl("TextboxCurreny");
 
                txtBox.Attributes.Add("onblur", "ConvertToUSD('" + item.ItemIndex + "')");
             }
        }

Please help me understand what is going wrong in the code.

Thanks,
Preeti
Maria Ilieva
Telerik team
 answered on 24 Sep 2013
1 answer
204 views
Hi,

i have upgraded the teleric control library with the latest version.
Earlier i was using get_value() property to get the value from the rad numeric text box and it was working fine, now when i updated it this property(get_value) is not supporting to get the value from rad numeric textbox. 

i have written my code which i have used below.

function OnBlur() 

    var Input1 = $find("<%= RadNumericTextBox1.ClientID %>"); 

    var value1= Input1.get_value(); 

    var result = value1*2; 

    var Input3 = $find("<%= RadTextBox1.ClientID %>"); 

    Input3.set_value(result);    

function OnBlur1() 

    var Input2 = $find("<%= RadNumericTextBox2.ClientID %>"); 

    var value2= Input2.get_value(); 

    var result = value2*2; 

    var Input3 = $find("<%= RadTextBox1.ClientID %>"); 

    Input3.set_value(result); 



<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server"

        <ClientEvents OnBlur="OnBlur" /> 

</telerik:RadNumericTextBox> 

<telerik:RadNumericTextBox ID="RadNumericTextBox2" Runat="server"

        <ClientEvents OnBlur="OnBlur1" /> 

</telerik:RadNumericTextBox> 

<telerik:RadTextBox ID="RadTextBox1" runat="server"

</telerik:RadTextBox>


Can you please tell me which property will work with this so that i can get only value from the rad numeric textbox?

Kostadin
Telerik team
 answered on 24 Sep 2013
3 answers
126 views

Is it possible to set EmptyMessage in RadGrid1_ItemDataBound Edit Mode for a telerik:GridBoundColumn or GridDateTimeColumn?

Princy
Top achievements
Rank 2
 answered on 24 Sep 2013
1 answer
150 views
Hello,

I have RadCaptcha on my page with enabled "Refresh Captcha Image Functionality" but there is one thing if I type wrong captcha I receive error message that's correct then I click on 'Generate new image' and error message still visible but should not be visible because I generate new captcha Image. How can I hide error message when I click on Generate new image link?

Regards.
Princy
Top achievements
Rank 2
 answered on 24 Sep 2013
1 answer
100 views
I am using a raddatetimepicker. On clicking the time picker button, can I display all the time values in a horizontal fashion?
Thanks
Robert
Shinu
Top achievements
Rank 2
 answered on 24 Sep 2013
2 answers
72 views
Hi all,

I use a header context menu to group or ungroup my records in a grid
http://www.telerik.com/help/aspnet-ajax/grid-header-context-menu.html

and I use GroupByExpressions to order by my records.

When I click GroupBy menu at the first time, in event MyRadGrid_NeedDataSource, I get GroupByExpressions by doing the following codes:
MyRadGrid.MasterTableView.GroupByExpressions. But at this time, GroupByExpresssions is empty. I expected that this time there is a record
of GroupByExpresssions.

When I click GroupBy menu again, At this time, GroupByExpressions has one record.???

So my questions are
- Can I get GroupByExpressions when I click on GroupBy menu at the first time ? and How ?
- If Not, Is there any way to workaround this issue ?

Thanks.
Eyup
Telerik team
 answered on 24 Sep 2013
3 answers
262 views
Hi, 

I am trying to achive the below behaviour in RadTreeView at client side.

When uncheck the select All1, all the child nodes should collapse upto First Level which is "Contract1 and Contract2" in my case but presently it is collapsing upto root level "Select All 1" which is incorrect.

For your covenience, I have attached the snap shot and the piece of working code, please have a look and help me to find out the way to achieve this required behaviour.

PFA -  radreeview_desiredbehaviour.png

Hrml and Javascript Markup -
 
<script type="text/javascript">
 
        function OnClientNodeClicked(sender, eventArgs) {
            var tree = $find("<%=RadTreeView1.ClientID %>");
 
            var currentNode = eventArgs.get_node();
            var currentNodeText = currentNode.get_textElement().innerHTML;
            var allNodes = currentNode.get_allNodes();
            var allNodesCount = allNodes.length;
 
            if (currentNode.get_checked())
            {
                for (var i = 0; i < allNodes.length; i++)
                {
                    allNodes[i].set_checked(true);
                    currentNode.set_checked(true);
                    allNodes[i].expand();
                    currentNode.expand()
                }
            }
            else if (!currentNode.get_checked())
            {
                if (currentNodeText == "Select All 1")
                {
                    for (var i = 0; i < allNodesCount; i++)
                    {
                        if (allNodes[i].get_level() == 1)
                        {
                            allNodes[i].expand();
                            currentNode.expand()
                        }
                        else
                        {
                            allNodes[i].set_checked(false);
                            currentNode.set_checked(false);
                            allNodes[i].collapse();
                            currentNode.collapse();
                        }
                    }                                       
                }
            }
            else
            {
                for (var i = 0; i < allNodes.length; i++) {
                    allNodes[i].set_checked(true);
                    currentNode.set_checked(true);
                }
            }
        
 
    </script>
  <telerik:RadTreeView ID="RadTreeView1" runat="server" EnableEmbeddedBaseStylesheet="false"
        EnableEmbeddedSkins="false" CheckBoxes="true" OnClientNodeChecked="OnClientNodeClicked">
        
    </telerik:RadTreeView>
 
 
Server Side Code -
 
public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RenderNodes();
            }
        }
 
        protected void RenderNodes()
        {
            List<Contract> contracts = GetData();
            RadTreeNode selectAllContracts = new RadTreeNode("Select All 1");
            RadTreeView1.Nodes.Add(selectAllContracts);
            foreach (Contract contract in contracts)
            {
                RadTreeNode contracNode = new RadTreeNode(contract.Text);
                AddPlanNode(contract, contracNode);
                selectAllContracts.Nodes.Add(contracNode);
            }
            RadTreeView1.ExpandAllNodes();
            RadTreeView1.CheckAllNodes();
        }
 
        private static void AddPlanNode(Contract contract, RadTreeNode contracNode)
        {
            RadTreeNode selectAllPlans = new RadTreeNode("Select All 2");
            contracNode.Nodes.Add(selectAllPlans);
 
            foreach (Plan plan in contract.Plans)
            {
                RadTreeNode planNode = new RadTreeNode(plan.Text);
                selectAllPlans.Nodes.Add(planNode);
 
                AddAdapterNode(plan, planNode);
            }          
        }
 
        private static void AddAdapterNode(Plan plan, RadTreeNode planNode)
        {
            RadTreeNode selectAllAdapters = new RadTreeNode("Select All 3");
            planNode.Nodes.Add(selectAllAdapters);
 
            foreach (Adapter adapter in plan.Adapters)
            {
                RadTreeNode adapterNode = new RadTreeNode(adapter.Text);
                selectAllAdapters.Nodes.Add(adapterNode);
            }
            
        }
 
 
        #region Dummy Data
        private List<Contract> GetData()
        {
            Plan plan1 = new Plan { Text = "Plan1", Adapters = new List<Adapter> { new Adapter { Text = "Adapter1-1" }, new Adapter { Text = "Adapter1-2" } } };
            Plan plan2 = new Plan { Text = "Plan2", Adapters = new List<Adapter> { new Adapter { Text = "Adapter2-1" }, new Adapter { Text = "Adapter2-2" } } };
            Contract contract1 = new Contract { Text = "Contract1", Plans = new List<Plan> { plan1, plan2 } };
 
            Plan plan3 = new Plan { Text = "Plan3", Adapters = new List<Adapter> { new Adapter { Text = "Adapter3-1" }, new Adapter { Text = "Adapter3-2" } } };
            Plan plan4 = new Plan { Text = "Plan4", Adapters = new List<Adapter> { new Adapter { Text = "Adapter4-1" }, new Adapter { Text = "Adapter4-2" } } };
            Contract contract2 = new Contract { Text = "Contract2", Plans = new List<Plan> { plan3, plan4 } };
 
            List<Contract> contracts = new List<Contract> { contract1, contract2 };
            return contracts;
        }
 
        public class Contract
        {
            public string Text { get; set; }
            public List<Plan> Plans { get; set; }
        }
 
        public class Plan
        {
            public string Text { get; set; }
            public List<Adapter> Adapters { get; set; }
        }
 
        public class Adapter
        {
            public string Text { get; set; }
        }
        #endregion
    }
Boyan Dimitrov
Telerik team
 answered on 24 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?