473,473 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ItemCommand gets always triggered?

I have a grid with a SHOW Column taht is used to show details and a
TextBox. The user can either enter a reference in the TextBox or
choose one from the list.

But when a user clicks in the grid to view details, goes back and then
enters a number in the TextBox the ItemCommand gets triggered. How can
I avoid this?

I tried with putting this condition on top of the ItemCommand event

if (TextBox1.Text.Length == 0)

but the previous record in the DataGrid still gets selected.
--
Kind regards,

Stijn Verrept.
Nov 18 '05 #1
1 960
Stijn Verrept wrote:
I have a grid with a SHOW Column taht is used to show details and a
TextBox. The user can either enter a reference in the TextBox or
choose one from the list.

But when a user clicks in the grid to view details, goes back and then
enters a number in the TextBox the ItemCommand gets triggered. How
can I avoid this?

I tried with putting this condition on top of the ItemCommand event

if (TextBox1.Text.Length == 0)

but the previous record in the DataGrid still gets selected.


Nobody else has this problem or a solution for it?

--
Kind regards,

Stijn Verrept.
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steven | last post by:
Hi there, I am having a weird problem. I have a datagrid with both an ItemCommand and a SortCommand. It was working fine until a day ago. Now, whenever I click a column to fire the...
1
by: Ed Chiu | last post by:
Hi, In a Datagrid ItemCommand Handler, I can use e.item.cells(0).text to get the value of the second column of the current row. Is there something similar in DataList? Say I have 1 databound...
2
by: Deepesh | last post by:
Good day, I have a specific case of the DataGrid in my solution which is causing the ItemCommand Event Not Firing. So I'm creating a "Skinnable" set of controls. I seperate the actual ASCX file...
2
by: Curt_C [MVP] | last post by:
I've got a Repeater and within it a LinkButton. The LinkButton has an CommandName="Test" In the Repeater's ItemCommand event I want to check for this command name but the problem I'm having is...
4
by: EvelynAnd Ethan | last post by:
Hi, ItemCommand event not firing from a dynamic user control ,WHERE A DATAGRID HAS BUTTON,when i click on the linkbutton first time the itemcommand event doesnt fire,second time event fires up ...
3
by: danc | last post by:
I have a datagrid with a checkbox and dropdown list in each row. Both set AutoPostBack to true and ItemCommand and OnSelectedIndexChanged events for these controls works fine when DataGrid is not...
1
by: orangedesk | last post by:
Please let me know what all options can I try to make the itemcommand get called when a image button gets clicked? I tried some of the options like checking the autopost back before binding the...
0
by: Nathan Sokalski | last post by:
I am using a DataList with Event Bubbling. When I bubble an event, the ItemCommand event is always called before the bubble event specified in the CommandName property. Is this ASP.NET's way of...
0
by: jigsawcube1 | last post by:
I am trying to accept two input strings and concatinate and display the result in a datagrid. Following is the HTML and code. ItemCommand does not get fired what is that I am missing? <body...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
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...
1
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...
0
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.