Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 3 Jul 2009 21:54:41 +0800,    group: microsoft.public.dotnet.framework.aspnet        back       


DataList Edit Mode   
Hi

May I know whether I can do the same with DataList as in DetailsView programmatically ?

myDetailsView.ChangeMode(DetailsViewMode.Edit);

Thanks
Peter
date: Fri, 3 Jul 2009 21:54:41 +0800   author:   Peter

Re: DataList Edit Mode   
On 3 Jul., 15:54, "Peter"  wrote:
> Hi
>
> May I know whether I can do the same with DataList as in DetailsView programmatically ?
>
> myDetailsView.ChangeMode(DetailsViewMode.Edit);
>
> Thanks
> Peter

To show Edit mode DataList uses EditItemTemplate and EditItemIndex. By
default, the value of EditItemIndex is -1, meaning none of the items
in the list is being edited. When EditItemIndex is set to a particular
item, that item is displayed using the EditItemTemplate. Set
EditItemIndex to any item, bind the DataList again and your list will
be switched to Edit mode.

Also you can just add an edit button with CommandName="edit" and
specify OnEditCommand to switch DataList in to the Edit mode:
http://msdn.microsoft.com/en-us/library/90xwe9s3.aspx

Hope this helps
date: Sat, 4 Jul 2009 01:40:44 -0700 (PDT)   author:   Alexey Smirnov

Re: DataList Edit Mode   
"Alexey Smirnov"  wrote in message 
news:ae75bf8f-dbc3-42d4-9b5c-0baa240cbace@t13g2000yqt.googlegroups.com...
> On 3 Jul., 15:54, "Peter"  wrote:
>> Hi
>>
>> May I know whether I can do the same with DataList as in DetailsView programmatically ?
>>
>> myDetailsView.ChangeMode(DetailsViewMode.Edit);
>>
>> Thanks
>> Peter
>
> To show Edit mode DataList uses EditItemTemplate and EditItemIndex. By
> default, the value of EditItemIndex is -1, meaning none of the items
> in the list is being edited. When EditItemIndex is set to a particular
> item, that item is displayed using the EditItemTemplate. Set
> EditItemIndex to any item, bind the DataList again and your list will
> be switched to Edit mode.
>
> Also you can just add an edit button with CommandName="edit" and
> specify OnEditCommand to switch DataList in to the Edit mode:
> http://msdn.microsoft.com/en-us/library/90xwe9s3.aspx
>
> Hope this helps

Thanks Alexey..will give it a try.

Peter
date: Sat, 4 Jul 2009 23:07:51 +0800   author:   Peter

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us