Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataGrid must be Bound before Editing

Reply
Thread Tools

DataGrid must be Bound before Editing

 
 
=?Utf-8?B?TXJNaWtl?=
Guest
Posts: n/a
 
      03-10-2005
I have a sub named Bind("") which binds my a datagrid on my webform. In
order to enter edit mode and edit records on this datagrid, I must make a
call to Bind("") either before or after I place the DataGrid into edit mode.
For example, DataGrid.EditCommand looks like this ...

DataGrid1.EditItemIndex = e.Item.ItemIndex
Bind("")

Without having the Bind("") call within the EditCommand, an exception occurs
saying something to the extent of..."Failed to enable viewstate...".

The problem with including a call to Bind("") within the EditCommand is that
if there is a sort applied to my datagrid at the time the user enters 'Edit'
mode, the datagrid removes the sort, applying the original sort that it
possesses at load time, and the incorrect record is placed in EDIT mode. How
can I work around this?

Thanks.
 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      03-10-2005
Hi Mr. Mike,

Yesterday, somebody asked similar question in group
dotnet.framework.aspnet.datagrid, Subject: DataGrid sort
when Editing, you can read the Q & A. If you think the
answer is not you want, please let us know.

HTH

Elton Wang
http://www.velocityreviews.com/forums/(E-Mail Removed)


>-----Original Message-----
>I have a sub named Bind("") which binds my a datagrid on

my webform. In
>order to enter edit mode and edit records on this

datagrid, I must make a
>call to Bind("") either before or after I place the

DataGrid into edit mode.
>For example, DataGrid.EditCommand looks like this ...
>
>DataGrid1.EditItemIndex = e.Item.ItemIndex
>Bind("")
>
>Without having the Bind("") call within the EditCommand,

an exception occurs
>saying something to the extent of..."Failed to enable

viewstate...".
>
>The problem with including a call to Bind("") within the

EditCommand is that
>if there is a sort applied to my datagrid at the time the

user enters 'Edit'
>mode, the datagrid removes the sort, applying the

original sort that it
>possesses at load time, and the incorrect record is

placed in EDIT mode. How
>can I work around this?
>
>Thanks.
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Lower bound & Upper bound sunil panda Java 9 10-07-2008 08:32 PM
Array rotate : "Range bound must be a constant" in synthesis Pasacco VHDL 0 10-29-2006 11:19 AM
Passing Bound Object value to another Bound Object Phillip Vong ASP .Net 0 07-27-2006 10:54 PM
How to represent the data in a not bound control via bound control Mario Krsnic ASP .Net 0 06-23-2006 07:38 AM
Getting lower-bound and upper-bound of strings input Rhiner Dan C++ 1 03-27-2005 02:03 AM



Advertisments