DataGrid problems I need to click twice

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey
I have edit / update / cancel column. And templated column in a template
column there is edittemplate. But I always need to click in Edit twice to
invoke "edit-mode". In OnEdit event I set dgMy.EditItem = e.item.itemindex,
and I checked it's invoked on each click. I also checked ItemCreate invent
after I click Edit it doesn't have EditItem type :( So I got the same
datagrid but after second click it suddenly changes it also has EditItem in
ItemCreate... but UpdateEvent is invoked... To be honest the editEvent is
invoked and updateEvent is invoked. Can you tell me how to fix it ?
Jarod
 
Hi Jarod,

In EditCommand event, you need to assign EditItem and rebind datagrid's data
source:

dgMy.EditItem = e.item.itemindex;
dgMy.DataSource = Data_Object;
dgMy.DataBind();

HTH

Elton Wang
(e-mail address removed)
 

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

Back
Top