473,324 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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?
Feb 7 '07 #1
1 1202
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" <Ma*******@discussions.microsoft.comwrote in message
news:69**********************************@microsof t.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?

Feb 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: aarif.shah | last post by:
Hi, i am Aarif, I Have a gridview.On clicking the edit link of gridview i want my edititem template(that i have defined ) to show either Texbox control or dropdown list depending on some...
0
by: Seok Bee | last post by:
Dear Experts, I would like to have a listing of my current table records based on certain search criterias to list out in the gridview control. However, I have tried to use the built-in...
3
by: VMI | last post by:
How can I select a row in a Web gridview? I added a ButtonField to my gridview, but I'm not certain what other properties I should change in order for the row to be highlighted. I also changed the...
1
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all...
1
by: Evan M. | last post by:
Here's my GridView and my SqlDataSource <asp:GridView ID="ContactHistoryGrid" runat="server" AutoGenerateColumns="False" DataSourceID="ContactHistoryDS" DataKeyNames="JobHistoryID"...
2
by: GISmatters | last post by:
I have unbound checkboxes in a nested gridview to allow multi-selection of "child" rows. For context, the parent gridview rows are for large "reports", the child rows are for various specific files...
6
by: Garima12 | last post by:
There is a update panel,gridview and update progress. fetching the data from database and filling in gridview. at the time of processing update progress is working and showing processing........ My...
2
by: Michael | last post by:
It seems that a gridview allows us to delete only a single row at a time. How to extend this functionality to select multiple rows and delete all of the selected rows in a single stroke? just like...
4
by: Peter | last post by:
I want to call a JavaScript on PageIndexChanged event, how do I do that? Thank You Peter
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.