ItemCommand gets always triggered?

S

Stijn Verrept

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.
 
S

Stijn Verrept

Stijn said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top