Itemcommand event uses wrong comand

D

Daisy

Hi All.

I have a simple web application with a single webpage. it contains a
single datagrid control which loads data via a Microsoft CRM proxy
without any problems. It also contains the two default linkbutton
colums for Edit and Delete.

I have created the Item command event handler which handles the
datagrid's itemcommand event. When I click the edit link it receives
'Edit' as its commandname. Now the datagrid correctly displays its
edit mode with the two update and cancel buttons. But when I click the
update link the itemcommand handler receives 'Edit' as its commandname
again and when clicking the Cancel link it receives 'Delete' as its
commandname. Any ideas anyone?

The strange thing is the same application runs correctly (correct
commands received) running on a different machine ( a win XP with
visual studio .net installed running .net framework version 1.1).

The machine which gives me problems is a Win server 2003 running as a
Virtual PC with Microsoft CRM and Framework 1.1 installed.

Any help appreciated!
 
D

Daisy

Hi All,

is my question too stupid or too difficult to answer?

I need any clues I can get! Should I install the .Net framework again
or is there a different problem?

thanx in advance

Daisy
 
R

Rick Spiewak

Check the properties of the buttons to make sure that they have the correct
command associated with them. But, why use the ItemCommand event at all for
these? There are specific Edit, Update, Delete eventhandlers.
 
D

Daisy

Thanx for your reaction Rick

They do have the right commandnames and using the specific
eventhandlers doesnt make any difference.
It is like the datagrid is going into update mode but doesnt update
the commandnames associated with the two link buttons.
Like I said when running the exact same project on a different system
it is working correctly.

Daisy
 
K

Ken McAndrew

Did anyone come up with a solution for this? I'm having a similar problem.
I'm creating my datagrid dynamically, and used an EditCommandColumn to get
the Edit/Update/Cancel links. I also set up the appropriate subs with the
Handles property for each command. It does edit mode fine, but when I click
Update, it fires the EditCommand again (with the command name still set as
"Edit"), and when I click Cancel, it removes the row from the datagrid. This
is on WinXP Pro, VS.Net 2003 Enterprise, Framework 1.1.

Thanks.
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top