I have coded in Textbox_changed Event:
If CType(txtVoucherNo.Text, Long) = 0 Then
Me.DetailsView1.ChangeMode(DetailsViewMode.Insert)
Me.DetailsView1.AutoGenerateInsertButton = True
Me.DetailsView1.AutoGenerateEditButton = 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 1554
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(txtVoucherNo.Text, Long) = 0 Then
Me.DetailsView1.ChangeMode(DetailsViewMode.Insert)
Me.DetailsView1.AutoGenerateInsertButton = True
Me.DetailsView1.AutoGenerateEditButton = 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.comwrote in message
news:3B**********************************@microsof t.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(txtVoucherNo.Text, Long) = 0 Then
Me.DetailsView1.ChangeMode(DetailsViewMode.Insert)
Me.DetailsView1.AutoGenerateInsertButton = True
Me.DetailsView1.AutoGenerateEditButton = 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...
|
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...
|
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...
|
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...
|
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...
|
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.
...
|
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...
|
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) {
...
|
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 =...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |