w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
mix two toolbars in keno grid
Extend your template: <script type="text/x-kendo-template" id="toolbarIsExpire"> <div class="toolbar"> <label for="is_expired">Is Expired ?</label> <input type="search" id="is_expired" style="width: 75px;"/> </div> <a class="k-button k-button-icontext k-grid-add" href="#"><span class="k-icon k-add"> </span>Add new record</a> </script>

Categories : Kendo Ui

Get Rad Numeric Textbox value?
function OnClientValueChanged(sender, args) { logEvent(GetServerId(sender.get_id()) + ".OnClientValueChanged: Value is changed to " + args.get_newValue()); } check client side demo :http://demos.telerik.com/aspnet-ajax/input/examples/programming/clientside/apievents/defaultcs.aspx and : http://www.telerik.com/help/aspnet-ajax/introduction.html

Categories : C#

textbox only allow numeric and comma
Use this regular expression: /[^d,]/g As in: this.value=this.value.replace(/[^d,]/g,'') Of course this doesn't really mean the string will be a valid numeric value; e.g. 2,,0,1 would be considered fine. You really should be doing full server-side validation using decimal.TryParse or something similar

Categories : Javascript

How do you set text on Telerik Rad Numeric Textbox
I suggest you to use RadMaskedTextBox <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Mask=".###" Width="100%" PromptChar="_" /> Get your value using RadMaskedTextBox1.Text; , it will return RadMaskedTextBox's text (number only) without .(dot) . For example .001 => 001 .500 => 500 .999 => 999 So , you have to convert likes string yourPercentage = (Double.Parse(RadMaskedTextBox1.Text)/ 10).ToString() + "%"; Edit You can change and test this method , RadMaskedTextBox1.Text; RadMaskedTextBox1.TextWithLiterals; RadMaskedTextBox1.TextWithPrompt; RadMaskedTextBox1.TextWithPromptAndLiterals; Good Luck :)

Categories : C#

Kendo UI numeric textbox displays "g"
I'm not sure that g is a valid format for numbers. According KendoUI documentation here seems to be a format for dates g - General date/time pattern (short time) ("M/d/yyyy h:mm tt" for en-US) Check here for valid number formats.

Categories : Jquery

kendo-ui numeric textbox not working a step value of 0.001
You need to combine it with decimals option (specifies the number precision, if not set precision defined by current culture is used.) $('#inputNum').kendoNumericTextBox({ format : '#.000', step : 0.001, decimals: 3 });

Categories : Javascript

WPF Textbox bind with string data type property should accept only numeric value
If you need only numeric values then do following. Inside your property setter validate the new value if all chars are numbers. If so then set the new value If not so don't do anything. Binding uses getters and setters. Once binding updates setter of a property it calls its getter. When you enter text in TextBox and inside your setter you dont set the value. The text wont get entered. Alternative would be using the ValidationRules.

Categories : C#

Best way to import numeric and non-numeric data (string) from an excel file into MATLAB?
xlsread is the correct way to import data from Excel spreadsheets,both numeric and non-numeric data. Check the documentation: [num,txt,raw] = xlsread(___) additionally returns the text fields in cell array txt, and the unprocessed data (numbers and text) in cell array raw using any of the input arguments in the previous syntaxes. If xlRange is specified, leading blank rows and columns in the worksheet that precede rows and columns with data are returned in raw.

Categories : Excel

SQL server 2008 R2 Arithmetic overflow error converting numeric to data type numeric
The NUMERIC_ROUNDABORT option is ON When SET NUMERIC_ROUNDABORT is ON, an error is generated after a loss of precision occurs in an expression. When OFF, losses of precision do not generate error messages and the result is rounded to the precision of the column or variable storing the result. Normally this is OFF because when ON indexed views etc can fail. I've never changed this, ever. SET NOCOUNT ON; GO PRINT 'ON' set NUMERIC_ROUNDABORT ON; select cast(cast(1.260 as numeric(13,3)) as numeric(10,2)); GO PRINT 'OFF' set NUMERIC_ROUNDABORT OFF; select cast(cast(1.260 as numeric(13,3)) as numeric(10,2)); GO gives ON --------------------------------------- Msg 8115, Level 16, State 7, Line 3 Arithmetic overflow error converting numeric to data type numeric. OFF -----------------

Categories : Sql Server

R convert imported Excel numeric back from R factors to numeric
Direct conversion of a factor to numeric yields the factor levels, and nothing to do with the values themselves. You need to convert to character first: results[,3] <- as.numeric(as.character(results$Successes)) Equivalently (see ?factor), you can convert the levels to numeric, and index by the (implicit) numeric conversion of the factor. as.numeric(levels(results$Successes))[results$Successes]

Categories : R

ORA-01858: a non-numeric character was found where a numeric was expected
The answer is really simple here: In your command, build the following string TO_DATE(:1, 'yyyy-mm-dd') . Then, just make sure that string that goes into :1 has accurate format. Your command text should be this: SELECT * FROM (SELECT DocumentId FROM idx1_AuthLetters a INNER JOIN Documents b ON a.DocumentId = b.Id WHERE Status in ('L','S','V') AND letter_date <= TO_DATE(:1, 'yyyy-mm-dd') ORDER BY DOCUMENTID ) WHERE RowNum <= 14

Categories : C#

R claims that data is non-numeric, but after writing to file is numeric
If you provide the actual data or a sample of it, help will be much easier. In this case I assume R has the column in question saved as a string and writes it without any parantheses into the CSV file. Once there, it reads it again and does not bother to interpret a value without any characters as anything else than a number. In other words, by writing and reading a CSV file you converted a string containing only numbers into a proper integer (or float). But without the actual data or the rest of the code this is mere conjecture.

Categories : R

When do we get "'NaN' is not a valid numeric or approximate numeric value" in SQLException?
You could modify your javascript to use Jquery $('.validateWeight').click(function(event) { var id = event.target.id; $("#saveValue").val(""); if (id == "saveAndContinue") $("#saveValue").val(1); else if (id == "saveAndClose") $("#saveValue").val(2); } You have to take into account that if id isn't "saveAndContinue" or "saveAndClose", the value of the input with ID "saveValue" will be "", which is not numeric and will produce your NaN error. In the other hand, you should check if in the server side you receive a String or a Integer, because you should pass to your Hibernate function an Integer.

Categories : Java

Having error, Arithmetic overflow error converting numeric to data type numeric
Am column defined as decimal(n,m) holds n decimal digits, m of which are the fraction part. So decimal(2,2) is 2 digits long, both of which are the fraction part. This will only be able to take values in the range -0.99 to 0.99.

Categories : Sql Server

Restricting Android NumberPicker to Numeric Keyboard for Numeric Input (not Alpha keyboard)
I have successfully achieved this, borrowing heavily from @LuksProg's helpful answer to another question. The basic idea is to search for the EditText component of the NumberPicker and then to assign the input type as numeric. First add this method (thanks again to @LuksProg): private EditText findInput(ViewGroup np) { int count = np.getChildCount(); for (int i = 0; i < count; i++) { final View child = np.getChildAt(i); if (child instanceof ViewGroup) { findInput((ViewGroup) child); } else if (child instanceof EditText) { return (EditText) child; } } return null; } Then, in my Activity's onCreate() method I call this and set the input type: np.setMinValue(0); np.setMaxValue(intensityStrings.length-1); EditText

Categories : Android

Argument "" isn't numeric in numeric eq (==)
If 0 is not a valid ID, use a grep syntaxt like this: grep { $_ and ($id == $_) } @delete; or, match if $_ has only digits: grep { /d+/ and ($id == $_) } @delete;

Categories : Perl

jQuery textbox change event doesn't fire until textbox loses focus?
Try this: $("#textbox").bind('paste',function() {alert("Change detected!");}); [FIDDLE DEMO] -- > http://jsfiddle.net/K682b/3/

Categories : Jquery

How to populate records to textbox & display part of that record in textbox using autocompleteextender.
Here is a great article on the subject http://www.codeproject.com/KB/ajax/autosuggestextender.aspx A follow-up article explaining how to call an asynchronous server side auto post back event on a user's selection: http://www.codeproject.com/KB/webforms/PostbackAutoCompleteExten.aspx

Categories : C#

How to create method like Html.TextBox that adds attributes to textbox rendered?
Add the attribute data_abc to the optional parameters and it will add it as data-abc. @Html.TextBox("Name", "Default Value", new { data_abc = "data" }); Good luck!

Categories : Asp Net Mvc

call textbox[i] from textbox array created by hand before
This is expected behavior. Dynamically added controls are lost after postback. Normally you will keep those control's information in Session or viewstate and rebuild those controls after postback. Page_Load is a good place to rebuild them. You will find many articles on how to persist the controls as well as their data, just search with "asp.net dynamically added controls are lost at postback". Here's an example you can look at:How to retain values of dynamically created controls in asp.net. Here's another exmple: Re: Dynamic Controls in Placeholder lossed after postback. Hope it helps!

Categories : C#

Why TextBox property MaxLength is not working for a customised TextBox?
You can specify input scope only for TextBox. The reason behind the not availability of this feature for passwordbox is that The input scope gives the clear idea about the character type. Hence hacker can easily identify that your password consist of only numeric and that makes him to know your password easily.

Categories : Misc

Transfer the Winform Textbox data to Html Textbox
Just paste the all the code I just add function SendTextToActiveElementWithSubmitOptionSet(bool btnSubmit) I solve my issue below my code private void SendTextToActiveElementWithSubmitOptionSet(bool btnSubmit) { mshtml.IHTMLDocument2 document = null; document = TargetIE.Document as mshtml.IHTMLDocument2; if (!document.activeElement.isTextEdit) { MessageBox.Show("Active element is not a text-input system"); } else { HTMLInputElement HTMLI; HTMLI = document.activeElement as HTMLInputElement; var tag = HTMLI.document as mshtml.HTMLDocumentClass; mshtml.IHTMLElementCollection hTMLElementCollection = tag.getElementsByT

Categories : C#

copy first three letters of some textbox and paste to another textbox
This should do the job : Private Sub textbox2_GotFocus() Dim length As Integer length = Len(textbox1.Text) If length > 3 Then length = 3 textbox2.Text = Left$(textbox1.Text, length) End Sub The GotFocus event will trigger if you click on the textbox or if you use tab key.

Categories : Misc

Onfocus of textbox clear other textbox in the same row in razor
Working Demo http://jsfiddle.net/cse_tushar/7NLa8/1 $('table tr td input[type="text"]').focus(function () { $(this).parent().parent().find('input[type="text"]').not(this).val(''); });

Categories : Jquery

how to clear textbox value on other textbox focus in jquery?
if(!checkDate($("#txtDate").val())) { $("#txtDate").val(""); $('#txtDate').focus(); } you forgot # on this $("txtDate").val()

Categories : Jquery

KnockoutJS check if on textbox is greater than another textbox
An extender wraps an observable. Are you setting the value of model.tbLow to the result of the observable.extend() function? Your code should look like this: self.model.tbLow = self.model.tbLow.extend({ ... }); Or if you extend it from within your model... this.tbLow = ko.observable(...).extend({ ... }); Did you write that validation extender yourself or are you using something you found? Can you post or link to the code for that? Otherwise we don't know if you're using it properly, we can't know what the 'greaterThan' function is being sent.

Categories : Knockout Js

how to take out an existing textbox value and add it with other value and display the output in the same textbox
I think you have a variable out of scope, but hard to tell exactly without all of your code. Where is the variable bill declared? You also need to parse the mbill variable so it doesn't get treated as text. Is this what you're after? <input class=cal type=text /><br /> <input class=cal type=text /><br /> <br /><br /> <input id=numtoadd type=text value=10 /><br /> var mbill = parseFloat($("#numtoadd").val()); $(".cal").keyup(function(){ var bill = 0; $(".cal").each(function(){ if (!isNaN($(this).val()) && $(this).val().length != 0) { bill += parseFloat($(this).val()); } }); $("#numtoadd").val(mbill + bill); }); Updated fiddle: http://jsfiddle.net/MTgpN/2/

Categories : Jquery

how to change value of textbox based on another textbox in wpf datagrid
I'm not really getting the question but as I see it you either want: a. To assign a default value to the readonly textbox which is simple, you just assign a 'Name' in xaml and then use it in code or b. You want to use the data that is stored in the readonly textbox which is done again by assigning a 'Name' in xaml and then use it in code.

Categories : C#

Textbox value in other textbox by clicking button not correct
As pointed out in the comments, the Text property of the TextBox needed to be used: txt_FinishLink.Text = txt_Site.Text + "utm_source=" + txt_Website.Text + "_" + txt_Page.Text + "_de&utm_medium=banner&utm_campaign=" + txt_Campaign.Text + "&utm_content=" + txt_Format.Text Text will return the string of characters in the specified TextBox.

Categories : C#

Inserting a textbox (percentage sign) in the gridview that allow user to enter a percentage in the textbox, then populating the cells at the botton
What will you do with 3 rows of percentage textboxes?What does each row of percentage textbox take the percentage of?Is it the percentage of the sum of all the numbers above?Then why do you need 2 more rows filled with percentage textboxes? I understand you want to add dynamic code because the number of rows from stored procedure may change everytime.I have simplified your code: private void AssignCellCoordinatesIndividual(GridView gv) { // Create IDs for Grid for (int i = 0; i < gv.Rows.Count; i++) { gv.Rows[i].ID = "r" + i; // Row ID for (int ii = 0; ii < gv.Rows[i].Cells.Count; ii++) { gv.Rows[i].Cells[ii].ID = "c" + ii; // Cell ID int RowCount=gv.Rows.Count; if ((in

Categories : Asp Net

Textbox value to php variable on textbox value change
You need to make AJAX call. Following is the explained code ajax_call.php <html> <head> <script type="text/javascript"> //function which is called as soon as a user types a single character function update() { //Step 1:create XMLHttpRequest object to make AJAX call. try{ //for firefox,chrome and opera. xmlHttp=new XMLHttpRequest(); }catch(e){ try{ //for IE xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch(e2){ //Otherwise, notify browser doesn't support ajax. alert('Sorry ! AJAX not supported'); } } //create a handler function to handle the response xmlHttp.onreadystatechange=function(){ //execute the code only when response is successfull //readyState

Categories : PHP

Update a textbox whenever another textbox is Updated
This should work for you private void Form() { txtFirstName.TextChanged += TextBoxChanged; txtLastName.TextChanged += TextBoxChanged; } private void TextBoxChanged(object sender, EventArgs e) { txtFullName.Text = txtFirstName.Text + " " + txtLastName.Text; }

Categories : C#

How to get value from one textbox and assign to next coming textbox
I would recommend creating an ID for each of the textboxes and then creating the code onkeyup to update the next field. I assume myvar is part of a while loop. I would create an int that goes up for each cycle through the loop and then create an ID based on that number. Example: <div class="entry-edit"> <div class="entry-edit-head"> <h4 class="icon-head"><?php echo Mage::helper('mymodule')->__($value['label']." (".$std['name'].")") ?></h4> </div> <div> <div id="addanswer_form" class="fieldset"> <?php $results = $read->fetchAll("select * from mytable where standards_id =".$std['standards_id']); $looped = 0; foreach($results as $mykey=>$myvar) { ?> <div class="hor-scroll" style=" margin-bottom: 2px; ">

Categories : Javascript

Copy Textbox Contents to Other Textbox
Couple of things; your Fiddle wasn't running the jQuery because it wasn't queued - just add it in the Frameworks & Extensions section to the left. Wrapped in a $(document).ready(function() { }), your jQuery will now run. I believe I understood your question correctly; when the TOTAL_SET_OF_VALUES Scale is set to 3, you want the monitor that row's Source and set the other fields with the same class to the new value on.change(). Fiddle with my solution here.

Categories : Jquery

How to use @Html.TextBox as autocomplete textbox?
Use jQuery autocomplete plugin described http://jqueryui.com/autocomplete/ This sample gets the autocomplete suggestions via JSON from serer. Implement Controller and Action to return JSON and query the database for suggestions. Usually i have UtilitiesController for this kind of Actions, i also recommend writing an extension method for creating AutoCompleteBox, then you can use it @Html.AutoCompleteboxFor(...

Categories : HTML

dynamic textbox are not store in the textbox
createTextbox is not explicitly available. You'll have to get it by using document.getElementById. Like this... var createTextbox = document.getElementById("createTextbox"); createTextbox.innerHTML = createTextbox.innerHTML +"<br><input type='text' name='mytext' >";

Categories : PHP

How to make Search hint textbox background same as textbox background
Well for what you're trying you can bind the Width of the control in the VisualBrush to your actual target's ActualWidth something like: <VisualBrush x:Key="SearchHint" Stretch="None"> <VisualBrush.Visual> <TextBox Background="White" FontStyle="Italic" Foreground="Gray" Width="{Binding ElementName=tb, Path=ActualWidth}" Height="{Binding ElementName=tb, Path=ActualHeight}" Text="Enter search text…" /> </VisualBrush.Visual> </VisualBrush> ... <TextBox Grid.Column="4" Height="22" TextChanged="textboxsearch_TextChanged" x:Name="tb" Margin="0,0,10,10"> <TextBox.Style> <Style TargetType="TextBox"> <

Categories : Wpf

I have two windows forms and when i pressed TAB, the cursor in the form 1 textbox should be placed in form2 textbox.Form1 and form 2 are side by side
Here is a solution: //This form contains textBox1 public class Form1 : Form { public Form1(){ InitializeComponent(); } protected override bool ProcessTabKey(bool forward){ if(textBox1.Focused) form2.FocusText(); base.ProcessTabKey(forward); } Form2 form2 = new Form2(); } //This form contains textBox2 public class Form2 : Form { public Form2(){ InitializeComponent(); } public void FocusText(){ textBox2.Focus(); } } It's not a complete solution but can help you understand the basic mechanism to change the code meeting your requirement.

Categories : C#

how to Clear the values of Telerik Masked TextBox Via Jquery when users clicks on that Telerik Masked TextBox
Please try with the below code snippet. JS function myclick() { var txt = $find("<%= RadMaskedTextBox1.ClientID %>"); txt.set_value(''); return false; } ASPX <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Mask="(###) ###-####-####"> </telerik:RadMaskedTextBox> <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return myclick();" /> Please use "set_value()" to clear/set the value.

Categories : Jquery

WPF - Change Textbox value according to another Textbox value
The basic idea is to connect Name and Age through a Person Property. In Name's setter, you search the person based on the name, if the result is not null, then assign it to Person. In Person's setter, set Age and notify UI. Code is like: private Person _selectedPerson; public Person SelectedPerson { get { return _selectedPerson; } set { if (value == null) return; _selectedPerson = value; PersonAge = _selectedPerson.Age; OnPropertyChanged("Person"); } } private string _personName; public string PersonName { get { return _personName; } set { _personName = value; var person = Persons.FirstOrDefault(item => item.Name

Categories : Wpf



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.