GRIDVIEW: condition processing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
Back
Top