Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   GRIDVIEW: condition processing (http://www.velocityreviews.com/forums/t386375-gridview-condition-processing.html)

=?Utf-8?B?TWFya0F1cml0?= 02-07-2007 10:47 PM

GRIDVIEW: condition processing
 
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?

Eliyahu Goldin 02-07-2007 11:39 PM

Re: GRIDVIEW: condition processing
 
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" <MarkAurit@discussions.microsoft.com> wrote in message
news:69A901FA-B314-461D-991F-EB1CE0A0399C@microsoft.com...
> 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?





All times are GMT. The time now is 12:47 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.