PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET How to alert to GridView

Reply

How to alert to GridView

 
Thread Tools Rate Thread
Old 05-04-2006, 07:38 AM   #1
ad
Guest
 
Posts: n/a
Default How to alert to GridView


I use a GridView to connection to a TableAdapter by a ObjectDataSource

and I add a partial calss to the TableAdapter, and add a new update method
like:

-----------------------------------------------------------------------
public virtual int Update2(int Pred, ..)
{
if (Some Conndition)
return 0;
else
return Update(...)

}
----------------------------------------------------------------------------

In some condition, it will update no row. How can I alert to the gridview
that no row updated?
I have try
protected void gvSt_RowUpdated(object sender, GridViewUpdatedEventArgs
e)
{
if (e.AffectedRows < 1)
Label1.Text="®æ¦¡¿ù»~!!";
}
But the e.AffectedRows always return -1 whether the row updated or not


  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off