Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > GRIDVIEW: condition processing

Reply
Thread Tools

GRIDVIEW: condition processing

 
 
=?Utf-8?B?TWFya0F1cml0?=
Guest
Posts: n/a
 
      02-07-2007
am displaying data in a gridview. I have an "edit" link in a
asp:ButtonField; when the link is clicked an edit page comes up with the key
(from a datafield). Its all good.

However, I need to do some conditional processing, and don’t know how. In
one of the columns, either numbers of blanks are displayed. If blanks, I
want to disable
or not show the edit link, rather than have it go to the edit page. Is that
possible?
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      02-07-2007
Handle RowDataBound event. The event fires for every row after it gets
populated with the data from the datasource. You have access to both row
cells and the datasource fields. You can check the required conditions and
set the content of any cells accordingly.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"MarkAurit" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> am displaying data in a gridview. I have an "edit" link in a
> asp:ButtonField; when the link is clicked an edit page comes up with the

key
> (from a datafield). Its all good.
>
> However, I need to do some conditional processing, and don't know how. In
> one of the columns, either numbers of blanks are displayed. If blanks, I
> want to disable
> or not show the edit link, rather than have it go to the edit page. Is

that
> possible?



 
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
Help with while condition OR condition Bill W. Ruby 13 05-09-2011 09:42 PM
Silly newbie question: Stop all processing on condition philbo30 C Programming 12 06-07-2007 12:21 AM
Condition outside loop or separate loop for different condition? - Java 12 06-15-2005 08:50 AM
Post-Processing RAW vs Post-Processing TIFF Mike Henley Digital Photography 42 01-30-2005 08:26 AM
Question: processing HTML, re-write default processing action of many tags Hubert Hung-Hsien Chang Python 2 09-17-2004 03:10 PM



Advertisments