Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
213 views
<telerik:RadNumericTextBox ID="txtStuAdds" Width="70px" Value="0" DbValue='<%# Bind("StudentAdds") %>'
                                                      runat="server" Type="Number" NumberFormat-DecimalDigits="0" Onkeyup="txtStudAddValueChanged()" >
                                                  </telerik:RadNumericTextBox>
                                                                                             <asp:DropDownList runat="server" ID="ddlStuAddStatus" />
I have RadNumericTextBox how can I disable/enable dropdown based on a value entered? if textbox is empty or 0 enable drop down else disable.
<script type="text/javascript">
    function txtStudAddValueChanged(sender, eArgs) {
        var numericTextBox = $find(sender.id);
        var value = numericTextBox.get_value();
        alert(value);
    }
I have the following script but it failed on var numericTextBox = $find(sender.id);
Shinu
Top achievements
Rank 2
 answered on 27 Dec 2013
4 answers
165 views
I have a combobox on a form that is loaded server side. When I type the name of a person in the combobox, it highlights the name in the dropdown and also completes the name in the text area. But, when I hit the enter key it isn't selecting the item. I have an OnClientKeyPressing event set to handle the keystrokes and check for the enter key. But, the get_value() is blank. But, If I actually click on the item in the dropdown, then the get_value() returns a value.

If the items is found in the dropdown, and is highlighted in the dropdown list and autocompletes the text field, why isn't it selecting that item and allowing me to get the value for it with the get_value() method?

<telerik:RadComboBox ID="CustomerSearch" runat="server" Width="180" Height="160"
        MarkFirstMatch="true" AllowCustomText="true" CssClass="CustomerSearch" AutoPostBack="true"
       
EnableVirtualScrolling="true" ShowMoreResultsBox="true" OnTextChanged="CustomerSearch_TextChanged"
        OnSelectedIndexChanged="CustomerSearch_SelectedIndexChanged" OnClientKeyPressing="HandleKeyPress"
        EmptyMessage="Enter last, first to search..." BackColor="White" Skin="Forest" />
 
 
<script type="text/javascript">
      function HandleKeyPress(sender, args) {
              if (args.get_domEvent().keyCode == 13) {
                        //this alert message is not null. it is an empty string.
                        alert(sender.get_value());
              }
      }
</script>
Steve
Top achievements
Rank 1
 answered on 26 Dec 2013
2 answers
151 views
In my RadTreeList I have two data columns displayed. The first column is a number and the second column is a percent. On the client side I wish to update the percent value when the number changes; and when the percent changes I wish to update the number. Both columns are defined as TreeListNumericColumns and are configured to use a RadNumericTextBox. I have attached OnValueChanged events to both columns.

Using JavaScript if the number changes I can determine the new number, but I do not know how to get a reference to the percent column so I can update the percent. I know how to get a reference to the item containing the numeric column updated and I can get a reference to the table cell containing the percent RadNumericTextBox but I need a reference to the RadNumericTextBox which is in the innerHTML so that I can update the Percent..

Here is my Javascript code for the OnValueChangedEvent when the number changes. This all works but I cannot figure out how to get a reference to the RadNumericTextBox containing the percent so I can update the value displayed on the client.
function NumberValueChanged(sender, eventArgs) {
    var treelist = $find('<%=rtvProducts.ClientID %>');
    var numericTextBox = sender.get_element();                    
    var item = treelist.getContainerItem(numericTextBox);   
    var index = item.get_displayIndex();                                     
    var column = treelist.getColumnByUniqueName('Percent');
    var colname = column.get_uniqueName();
    var cell = treelist.getCellByColumnUniqueName(item, colname); 
    alert(cell.innerHTML);
    return;
    }
I am using Telerik version 2013.1.417.40

Any help would be appreciated. 

Thanks,
Chris J.


.
Christopher
Top achievements
Rank 1
 answered on 26 Dec 2013
5 answers
599 views
Hi,

 am using old Rad control. "RadAjax.Net2" of "Telerik.WebControls"

i have a button inside RadAjaxPanel to download a text file from server.

ASPX Code :
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="radA" %>
<radA:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Width="100%" >
         <table>
              <tr>
                   <td>
                        <asp:Button ID="btnBillingFile" runat="server"  Text="Generate billing file"   OnClick="btnBillingFile_Click" />
                   </td>
              </tr>
         </table>
</radA:RadAjaxPanel>

C# Code :
protected void btnBillingFile_Click(object sender, EventArgs e)
{
                    string fileTabDelimited = ConfigurationManager.AppSettings["KEY_DOCUMENT_FOLDER"] + @"\Billing Files\BillFile.txt";
                    FileInfo fileInfo = new FileInfo(fileTabDelimited);
                    if (fileInfo.Exists)
                    {
                        Response.Clear();
                        Response.AddHeader("Content-Disposition", "attachment; filename=" + fileTabDelimited);
                        Response.AddHeader("Content-Length", fInfo.Length.ToString());
                        Response.ContentType = "application/octet-stream";

                        Response.WriteFile(fileTabDelimited);
                        //Response.End();
                    }
}

but not working. This code can not prompt to Open/Save dialog.

please help.
Chandan
Rakesh
Top achievements
Rank 1
 answered on 26 Dec 2013
1 answer
90 views
Hi all, 
How to change the color,  I mean background color ok the row,  after accessing the row. 

Please provide a solution... 
Princy
Top achievements
Rank 2
 answered on 26 Dec 2013
1 answer
107 views
Hi ,
i have two columns, based on first column values i want second column some rows to be a radcombobox or textbox etc. How to do this?
Shinu
Top achievements
Rank 2
 answered on 26 Dec 2013
0 answers
66 views
fixed issue...
Rayne
Top achievements
Rank 1
 asked on 26 Dec 2013
6 answers
189 views
This control very good. But DropDownTree support check box on Tree and support multis value?
Santhosh
Top achievements
Rank 1
 answered on 26 Dec 2013
1 answer
253 views
Hi,
          we do Fortify scan for our application. we are getting issue under category  "JavaScript Hijacking: Vulnerable Framework" where ever we use Rad Script Manager. Do i need to do anything to avoind this or i can ignore this issue? Please suggest me.

Thanks,
Vidya.
Peter Filipov
Telerik team
 answered on 26 Dec 2013
2 answers
132 views
i have a radgrid with columns:  "x" and "Total" 
what i need is to display accumulated value in each row , e.i. :
first row contains x : 90 and total should be = 90+0;
second row contains : x= 15 and total should be : 15+ 90(previous value)= 105

etc ...


how can achieve that, by using itemDataBound event to set total value ,

thanks in advance
Princy
Top achievements
Rank 2
 answered on 26 Dec 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?