GRIDVIEW: condition processing

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?
 
E

Eliyahu Goldin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top