I have coded in Textbox_changed Event:
If CType(txtVouche rNo.Text, Long) = 0 Then
Me.DetailsView1 .ChangeMode(Det ailsViewMode.In sert)
Me.DetailsView1 .AutoGenerateIn sertButton = True
Me.DetailsView1 .AutoGenerateEd itButton = True
Exit Sub
End If
When page is loaded 1st time, and I type 0 (Zero) in Textbox and press
Enter, DetailView changes its mode to Insert Mode, which I require, however
if I press Cancel on DetailView without entering anything and then click on
textbox and press Enter again after typing 0 (Zero), nothing happens, any
idea please ?
It seems that DetailView Cancel Button has added some extra character in the
Textbox which is not visible to me.
Best Regards,
Luqman 2 1576
Why not set a breakpoint on the TextChanged event and see if the event is
even being fired? If the value of the textbox where being changed, you could
find out at the breakpoint also.
--
Thanks,
Page Brooks www.explosivedog.com
"Luqman" wrote:
I have coded in Textbox_changed Event:
If CType(txtVouche rNo.Text, Long) = 0 Then
Me.DetailsView1 .ChangeMode(Det ailsViewMode.In sert)
Me.DetailsView1 .AutoGenerateIn sertButton = True
Me.DetailsView1 .AutoGenerateEd itButton = True
Exit Sub
End If
When page is loaded 1st time, and I type 0 (Zero) in Textbox and press
Enter, DetailView changes its mode to Insert Mode, which I require, however
if I press Cancel on DetailView without entering anything and then click on
textbox and press Enter again after typing 0 (Zero), nothing happens, any
idea please ?
It seems that DetailView Cancel Button has added some extra character in the
Textbox which is not visible to me.
Best Regards,
Luqman
yes, the event was firing but 2nd time it did not find the value "0" in
textbox, it was "0" + Enter, so on ModeChanging Event of DetailView Control,
I set the textbox.text="" and it worked out.
Best Regards,
Luqman
"Page Brooks" <NO************ **@gmail.comwro te in message
news:3B******** *************** ***********@mic rosoft.com...
Why not set a breakpoint on the TextChanged event and see if the event is
even being fired? If the value of the textbox where being changed, you
could
find out at the breakpoint also.
--
Thanks,
Page Brooks www.explosivedog.com
"Luqman" wrote:
I have coded in Textbox_changed Event:
If CType(txtVouche rNo.Text, Long) = 0 Then
Me.DetailsView1 .ChangeMode(Det ailsViewMode.In sert)
Me.DetailsView1 .AutoGenerateIn sertButton = True
Me.DetailsView1 .AutoGenerateEd itButton = True
Exit Sub
End If
When page is loaded 1st time, and I type 0 (Zero) in Textbox and press
Enter, DetailView changes its mode to Insert Mode, which I require,
however
if I press Cancel on DetailView without entering anything and then click
on
textbox and press Enter again after typing 0 (Zero), nothing happens,
any
idea please ?
It seems that DetailView Cancel Button has added some extra character in
the
Textbox which is not visible to me.
Best Regards,
Luqman This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jonas L |
last post by:
Hi,
I need to create a textbox which acts as a normal textbox but with the
following extra requirements:
1) In-focus color, when the textbox gets focus the backcolor property
of the textbox should be set to a, selectable, in-focus color.
2) Out-of-focus color, when the textbox loses focus the backcolor
property of the textbox should be set to a, selectable, out-of-focus
color.
|
by: Rodrigo DeJuana |
last post by:
Howdy,
I'm new to this .net stuff and really have little to no training. Im trying
to create a new page for a web form, so i have been pretty much jsut coping
code. I having some issue with some textboxes not updating when i a hit
save.
for example I have this code in my aspx.cs file:
declared:
|
by: Newasps |
last post by:
Hi guys,
I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the first values for each control. Please help me. Thanks for any help. Bye
Ozer
And here's my code:
Imports System
Imports System.Data
Imports System.Data.OleDb
|
by: I am Sam |
last post by:
I have a DataGrid that is passing information to a stored procedure properly
but the parameters aren't being casted properly. I was woundering if anyone
can tell me how I should properly cast the following:
(TextBox)UserPrefix=(TextBox)e.Item.Cells.Controls;
string strUserPrefix=UserPrefix.Text;
I keep getting the following error and I don't know why because I have
declared the UserPrefix as a textbox using "protected...
|
by: Keith |
last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing opinion of how I want to handle the 'user experience' in the application I'm creating. While I know I could allow the user to enter in number and alpha text - in a text box - and then tell them when the execuate a command "This is not numeric data", I...
| |
by: Mamatha |
last post by:
Hi
I want to add an icon to the textbox's text.
I don't know how to display icon in textbox in VB.NET.
If any one knows please let me know.
Thanks in advance.
Mamatha
|
by: Brad Rogers |
last post by:
All,
Being immersed in vb.net and trying CSharp after almost a year I forgot the
differences. I like vb fixing the uppercase/lowercase names and seeming to
be more flexible to code entry.
But while trying to insert a text box to see when a method is used, and
putting a counter to bump some variable?
The textbox sits there unchanged. I put a breakpoint at the text write
|
by: Jacob Donajkowski |
last post by:
Once the user logs in I want to have the users switch from the Roster
View to the Profile View and enter their profile infomation and save
it. Then the next time they login and go to the Profile View I want
the form populated from there profile on the sql server. The code to
save the profile works fine. But when the user logs back in they data
doesn't load back to the form. The multiview is located inside the
LoginView's Logged-In View ....
|
by: Marco Pais |
last post by:
Hi there.
How can I change the background color of a textbox when it gets the focus?
I can handle the "Enter" event and do this
private void txtDummie_Enter(object sender, EventArgs e) {
txtDummie.BackColor=Color.Red;
}
|
by: Andy B |
last post by:
I have this code:
protected void EditEventsWizard_NextButtonClick(object sender,
WizardNavigationEventArgs e) {
//get the values from the DetailsView
TextBox StartTime = (TextBox)EditEventForm.Rows.Cells.Controls;
TextBox EndTime = (TextBox)EditEventForm.Rows.Cells.Controls;
|
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...
| |
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |