Search Results

Search found 3025 results on 121 pages for 'textbox'.

Page 12/121 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • strange Problem with WPF Textbox stringformat - Cursor moves back

    - by Emad
    I am using WPF 4.0 TextBox and binding. I am using StringFormat to format the number as currency. the XAML looks like this: <TextBox Text="{Binding Path=ValueProperty, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat={}{0:C}, UpdateSourceTrigger=PropertyChanged}"> </TextBox> Everything seems to work correctly except for a strange behavior: When for example a user types in 12: right after typing 1, the value in the textbox becomes $1.00 and the weird thing is the the cursor is moved to be between the $ and the 1. So when a user simply types in 12, the result becomes $21.00. How can I fix this strange behavior?

    Read the article

  • How create processing events for array of TextBox [closed]

    - by ScarX
    I create array: TextBox[] textarray = new TextBox[100]; Then in cycle set this params, all items array situated in uniformGrid1 textarray[i] = new TextBox(); textarray[i].Height = 30; textarray[i].Width = 50; uniformGrid1.Children.Add(textarray[i]); How create events Click or DoubleClick that all items array? Sorry my English.

    Read the article

  • ASP.NET-C#: Inserting const into TextBox in Gridview

    - by dash
    I have some problems inserting a const "1" into a textbox which is gridviw. the gridview code: <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" EnableViewState="False"> <Columns> <asp:BoundField DataField="Price" HeaderText="Price" ItemStyle-CssClass="price" > <ItemStyle CssClass="price"></ItemStyle> </asp:BoundField> <asp:TemplateField HeaderText="ProductID"> <ItemTemplate> <asp:Label ID="lblID" runat="server" Text='<%# Eval("ProductID") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="ProductName"> <ItemTemplate> <asp:Label ID="lblName" runat="server" Text='<%# Eval("ProductName") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Summary"> <ItemTemplate> <asp:Label ID="lblSum" runat="server" Text='<%# Eval("Summary") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="picPath"> <ItemTemplate> <asp:Label ID="lblPic" runat="server" Text='<%# Eval("picPath") %>' ></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "quantity"> <ItemTemplate> <asp:TextBox ID="lblquantity" runat="server" ></asp:TextBox> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText = "Total"> <ItemTemplate> <asp:Label ID="lblTotal" runat="server" ></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> All the information is populated from the session of the privious page, beside this textbox which doesnt comes from anywhere, its a quantity textbox which the user should enter. and i want it to have a defalt value of "1". I dont actually know how to insert into a textbox which is in the gridview. please help me. thanx

    Read the article

  • How create processing events for array of TextBox

    - by ScarX
    I create array: TextBox[] textarray = new TextBox[100]; Then in cycle set this params, all items array situated in uniformGrid1 textarray[i] = new TextBox(); textarray[i].Height = 30; textarray[i].Width = 50; uniformGrid1.Children.Add(textarray[i]); How create events Click or DoubleClick that all items array? Sorry my English.

    Read the article

  • wpf datagrid textbox + combobox

    - by Muhammad Adnan
    I have wpf datagrid with number of template columns. some of them have textbox in them in edit mode and some combobox. i need to give cut/copy/paste facility to user from main menu (ribbon) buttons of my application. when i select some text from textbox and press copy button from main menu. copy button becomes active control so i loose textbox as active control by which i could get selected text. (any solution for this) and second thing i wanted to ask... is there any event get fired when we select textbox's contents? or solution would be appreciated. Thanks in advance...

    Read the article

  • why doesn't IE8 refresh textbox right away?(Jquery)

    - by AndrewSmith
    I have 3 radio buttons and one textbox in my page. These 3 radio controls represent corresponding choice and among them, the third one enables textbox that is disabled by default. If user clicks any one from the first twos after clicking the third, the textbox will be emptied(if user input any) and disabled again. The problem is, in IE, the textbox isn't emptied not until I click back once again on the said textbox. I've used jquery val methods as well as attr but nothing seems to work. You can see my code as follows. The very same code works just fine in Mozilla. I'm not sure why IE is having problem. m.bind_eventform = function(){ $('input[name=poster]').change(function(){ if($('input[name=poster]:checked').val()==2) $('#poster_other').removeAttr('disabled'); else if(!($('#poster_other').is(':disabled'))) { $('#poster_other').attr('disabled','disabled'); $('#poster_other').attr('value',''); //this one doesn't work $('#poster_other').val(''); //as well as this one } }); }; $(document).ready(m.bind_eventform);

    Read the article

  • Selecting the contents of an ASP.NET TextBox in an UpdatePanel after a partial page postback

    - by Scott Mitchell
    I am having problems selecting the text within a TextBox in an UpdatePanel. Consider a very simple page that contains a single UpdatePanel. Within that UpdatePanel there are two Web controls: A DropDownList with three statically-defined list items, whose AutoPostBack property is set to True, and A TextBox Web control The DropDownList has a server-side event handler for its SelectedIndexChanged event, and in that event handler there's two lines of code: TextBox1.Text = "Whatever"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Select-" + TextBox1.ClientID, string.Format("document.getElementById('{0}').select();", TextBox1.ClientID), true); The idea is that whenever a user chooses and item from the DropDownList there is a partial page postback, at which point the TextBox's Text property is set and selected (via the injected JavaScript). Unfortunately, this doesn't work as-is. (I have also tried putting the script in the pageLoad function with no luck, as in: ScriptManager.RegisterStartupScript(..., "function pageLoad() { ... my script ... }");) What happens is the code runs, but something else on the page receives focus at the conclusion of the partial page postback, causing the TextBox's text to be unselected. I can "fix" this by using JavaScript's setTimeout to delay the execution of my JavaScript code. For instance, if I update the emitted JavaScript to the following: setTimeout("document.getElementById('{0}').select();", 111); It "works." I put works in quotes because it works for this simple page on my computer. In a more complex page on a slower computer with more markup getting passed between the client and server on the partial page postback, I have to up the timeout to over a second to get it to work. I would hope that there is a more foolproof way to achieve this. Rather than saying, "Delay for X milliseconds," it would be ideal to say, "Run this when you're not going to steal the focus." What's perplexing is that the .Focus() method works beautifully. That is, if I scrap my JavaScript and replace it with a call to TextBox1.Focus(); then the TextBox receives focus (although the text is not selected). I've examined the contents of MicrosoftAjaxWebForms.js and see that the focus is set after the registered scripts run, but I'm my JavaScript skills are not strong enough to decode what all is happening here and why the selected text is unselected between the time it is selected and the end of the partial page postback. I've also tried using Firebug's JavaScript debugger and see that when my script runs the TextBox's text is selected. As I continue to step through it the text remains selected, but then after stepping off the last line of script (apparently) it all of the sudden gets unselected. Any ideas? I am pulling my hair out. Thanks in advance...

    Read the article

  • Asp.Net Mvc - Html.TextBox - Set Autofocus property

    - by Melursus
    In Html 5, there is an new attribute on textbox call autofocus. The problem is it is a boolean value (there or not there) It should look something like : <input name="a" value="" autofocus> I try : <%= Html.TextBox( "a", null, new { autofocus } ) %> But, it's give me an error because I'm not setting a value to autofocus... I know I can do it manually, but can I do it with Html.TextBox ?

    Read the article

  • Can't write text into textbox in ASP.NET web app

    - by dotnetdev
    Hi, I have an ASP.NET web application. In the codebehind for the .ascx page (which I embed as below), I attempt to write a string to a textbox in a method like this: Code for embedding control: Control ctrl = Page.LoadControl("/RackRecable.ascx"); PlaceHolder1.Controls.Add(ctrl); Method to make string for inserting into textbox: string AppendDetails() { StringBuilder sb = new StringBuilder(); sb.Append("msg" + " " + textbox1.Text etc etc ); return sb.ToString(); } Called as (in codebehind event handler for button click): this.TextBox4.Text = AppendDetails(); I call it by using ATextBox.Text = AppendDetails (in the button click event handler). The textbox TextBox4 is in the designer file so I am confused why the text does not get written into this textbox (it is readonly and enabled). When stepping through, the textbox4 control will successfully show the text I want it to display in quick watch but not in the actual page, it won't. Any ideas? Thanks

    Read the article

  • TextBox is not showing new value in code-behind

    - by coure06
    I have created a asp:TextBox. its disabled. but its values is changed via javascript. When i click a button to get the updated value in that textbox it always show me empty (""). In my Page_Load i am doing everything in if(!Page.IsPostBack) so there is no chance of updating TextBox value on postback in Page_Load. Where i could be wrong? how can i get updated value?

    Read the article

  • asp.net textbox with java script problem

    - by Eyla
    I'm trying to check if asp.net textbox is empty or not using java script. my code working ok but if I enter only numbers will conder it empty so I have either enter letters and numbers or only letters. Please advice. here is my code <script type="text/javascript"> function check(){ var txt = document.getElementById('<%=txt.ClientID%>').value; //(isNaN(cmbStateHome) == false if (isNaN(txt) == false) { alert("Please enter some thing."); } else {alert("ok");} } } </script> <asp:TextBox ID="txt" runat="server"></asp:TextBox> <asp:TextBox ID="txtZipCodeHome" runat="server" Style="top: 361px; left: 88px; position: absolute; <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="check()">LinkButton</asp:LinkButton>

    Read the article

  • drag drop div in textbox

    - by user329755
    Hi all I have a repeater in the right side of my page and a textbox at the left of the page. have created the items in repeater in a div so that i can move them into the textbox. on drag drop of the same, the value in the div shall be copied over in the textbox. Kindly share code if any

    Read the article

  • Javascript not reading value from hidden textBox - JQuery C#

    - by Paul van Valkenburgh
    I'm a non-specialist with JavaScript / JQuery and I'm having trouble figuring out why my script doesn't work. When my C# page loads, I have a hidden textBox txtHiddenKeywordArray which gets dynamically filled with comma separated values like... horse, buggy, track I'm trying to use the highlight functionality in jquery.highlight-3.js where I have a label text field that will contain and highlight the words in the keywords list. I'm using the script <script language="javascript" type="text/javascript"> var myString = document.getElementById('<%=txtHiddenKeywordArray.ClientID%>').val() myArray = myString.split(" "); $(document).ready(function () { for (i = 0; i < myArray.length; i++) $("p").highlight(myArray[i]) }); </script> Here is the textBox declaration : <asp:TextBox ID="txtHiddenKeywordArray" ClientIDMode="Static" runat="server" Visible="false"></asp:TextBox> It worked great when I hard coded the values of var myString. I've tried researching it and keep seeing the same example of the way I have it done. The page does use a MasterPage. Could this affect it? Any idea how I can get the script to see the values from the textbox? Do I need a RegisterStartUpScript or something? Thanks for any help you can provide.

    Read the article

  • Robust Way of Selecting All Text in Textbox

    - by Emil
    I'm trying to have the content of the an HTML textbox be selected fully onFocus. I know the simple solution of putting a onfocus="this.select()" on the component but this is not a good solution because if a user double clicks into the area the selection is lost and in browsers like chrome it is rarely working like it should and just reverts into input form. I have searched on Google for a little while and can't find a good solution, most suggestions are of this simple solution. What I would like it is that the selection inside the textbox not change once selected and if possible the user should not be able to edit the content of the textbox, for example if you have used AdSense when you grab code from AdSense the selection never changes and your unable to alter the code in the textbox. Any solutions would be appreciated.

    Read the article

  • textbox issue regarding shrinking first time input text

    - by picnic4u
    i have a problem regarding the textbox. i have done the textbox auto expandable but when i insert the text first time then the textbox shrink in size from their original size.but my requirement is that when my text is exceeding the text box length then it auto expand. my code is <script type="text/javascript"> $(document).ready(function() { $('.txtStyle').autogrow(); }); </script> pls somebody suggest how ot is possible

    Read the article

  • WPF TextBox - don't hide the selection

    - by Justin R
    WPF's TextBox (System.Windows.Controls.TextBox) appears to highlight selected text only when it has the focus. I need to make a TextBox continue to show the selection when focus is lost. In a standard Win32 EDIT control I could achieve this with ES_NOHIDESEL. How can I get the equivalent in WPF?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >