473,833 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

doubt on gridview textchanged event

hi friends,
this is balu.while i am working with gridview i am facing this problem.this code is running successfully in gridview edit event.but when i used the same code in textboxtext changed event.it is giving error.pls send me the solution.
Expand|Select|Wrap|Line Numbers
  1.  protected void TextBox2_TextChanged(object sender, EventArgs e)
  2.     {
  3.         foreach (GridViewRow row in GridView1.Rows)
  4.         {
  5.             string txtText = ((TextBox)((GridView)sender).Rows[row.RowIndex].FindControl("TextBox2")).Text;
  6.  
  7.         }
  8.     }
  9.  
Jul 27 '10 #1
1 1601
Frinavale
9,735 Recognized Expert Moderator Expert
It would help us to understand your problem better if you posted the error message that you are seeing.

-Frinny
Aug 3 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2939
by: Fabrício de Novaes Kucinskis | last post by:
Hi all, I have a combobox control, in wich I put an autocomplete code. This code is in the TextChanged event, but when this event fires, the Text property isn't updated yet. For example, if the Text property is "Foo" and I press the letter "d", the Text property when the TextChanged event runs is "Foo". Only after the TextChanged event be processed, the KeyDown, KeyUp and KeyPress events fires and update the Text property.
2
2200
by: jorge | last post by:
Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2. TextBox.TextChanged { WasButtonClickFired?
2
3981
by: Owin | last post by:
Hi all, I've created an User control. It's an extension of a textbox wich has some extra properties so that validation becomes a lot faster. The control wordks great if autopostback is on. When there's a value in the textbox, the (overridden) textchanged event fires and validation is performed. Now I want to turn off autopostback. So I want my contol only validate if the submit button is pressed. I've tried Page.Validate(), but It seems...
1
4565
by: Samuel Chan | last post by:
I used the textchanged event of textbox and set the autopostback property to true. The textchanged event should fire when the content of the textbox is changed and user tab out of the textbox control. However, textchanged event fires whenever there is a postback, even when I click a button that send postback. Can anybody tell we what change I should make so that textchanged event only fire when the content is changed?
2
3022
by: gaurav | last post by:
hi, I have a problem, How do i use TextChanged Event by clicking on Button. When i changed the text in text box and moving the focus from there then it is working but i have one calender popup button, what i want is when i click on that button and remove the focus from tht button by hitting Tab the TextChanged Event should work.
2
3105
by: Fabio Cannizzo | last post by:
Hi. The content of my textbox is "ABCD". If I select the letter 'C' and I press 'X', the content obviously changes to "ABXD". Thsi however generates two separate "TextChanged" events 1) "ABCD" ==> "ABD" 2) "ABD" ==> "ABXD"
1
1465
by: gonzosez | last post by:
I have an application that gets values from the registery and populates textboxes on a form. I have also created a sub using textchanged event. which prompts the user to save their changes. The problem is that when the form loads and the textboxes are filled it triggers the textchanged event. I want the boxes to fill with the stored data and the change event to fire only after the user has made a change. Thanks
2
2330
by: pvdg42 | last post by:
Working on a web project (academic example) for a beginning VB class where there are four text boxes, each to hold four characters. I want focus to shift automatically to the next text box when the user has entered the 4th character in a given text box. I'm trying to use the TextChanged event to make this happen, but it appears as if the TextChanged event never fires? I thought it would fire each time the user entered a new character so...
5
5249
by: S_K | last post by:
This is a weird problem.. I have a page with a textbox and a button (along with a bunch of other stuff). Both the textbox and the button have their SEPERATE events defined for the textchanged and click events. When I change the text in the textbox the textchanged event is called as expected. But the button click event is also called!? Whats with that?!
1
3484
by: md1006 | last post by:
I've used textbox in ItemTemplate of gridview. I need a confirm box on textChanged event of the respective text box. If user confirms as Ok/Yes then continue with some code else if user clicks on Cancel/No then do some other action. I've tried using: Page page = HttpContext.Current.Handler as Page; ScriptManager.RegisterClientScriptBlock(page, page.GetType(), "key2", "confirm('Do you want to update?');", true); But I...
0
9796
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10782
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10543
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10213
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9323
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3078
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.