PC Review


Reply
Thread Tools Rate Thread

DataGrid problems I need to click twice

 
 
=?Utf-8?B?SmFyb2Q=?=
Guest
Posts: n/a
 
      14th Jun 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RWx0b24gVw==?=
Guest
Posts: n/a
 
      14th Jun 2005
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 Removed)



"Jarod" wrote:

> 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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
double-click in DataGrid ChrisJ Microsoft Dot NET 0 20th Dec 2007 01:35 AM
What happens when you Click in the DataGrid's new row fiaolle Microsoft VB .NET 1 2nd Aug 2006 01:04 PM
click on datagrid item, display new datagrid based on that click =?Utf-8?B?TmljaG9sYXNwMjc=?= Microsoft ADO .NET 1 22nd Oct 2004 08:40 PM
double click on datagrid Mike Microsoft ASP .NET 2 23rd Jun 2004 11:43 AM
Links in web datagrid - letting a user click on a datagrid cell VM Microsoft C# .NET 1 18th Aug 2003 02:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:05 AM.