473,382 Members | 1,396 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,382 software developers and data experts.

how to prevent my button from being clicked if no data is selected?

12
I have this "View" button as I click on the data in my datagridview, it'll show some reports. How do I prevent my "view" button from being clicked if no data is selected? Like locking it, it's commonly used, don't know how to express better hope my description is clear.
Jun 16 '10 #1
1 1367
Christian Binder
218 Expert 100+
@xinnie
You could handle the Data-selection-event, that if no data was selected, you set the button's Enabled=False or something like that.
Jun 16 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Krista | last post by:
Hi, this is my problem. I have two php files such as a.php, b.php a.php : <?php require("b.php"); if($_GET == "") { MainFrame(); } else if ($_GET == "Receiving")
1
by: monika | last post by:
I move from one form to another when I click to a radio button. I can identify which radio button I clicked by trapping its value. but my problem is that there are a set of radio buttons followed...
2
by: Bob Hynes | last post by:
Hi All, When a user(s) click on the 'Apply Filter' toolbar button I want to run some code before the 'apply filter' kicks off. That code is to check to be sure that the user has selected a value...
0
by: | last post by:
hi, selected items in check box disappears when submit button is clicked on aspx page. check box is pasted on .ascx page and which is pasted on aspx page any ideals cheers sam
3
by: Dave | last post by:
If you have multiple buttons on a web form, how can you detect which control was clicked in the Page_Load event Thanks, Dave
7
by: Amadelle | last post by:
Hi all and thanks in advance, I am stuck! I can't figure out how to identify which button was clicked on my ASP.NET page in the PostBack event? So what I am trying to do is to is to have an if...
2
by: chitrapu | last post by:
hiii everybody, i have a little code that inserts the data into the databse. but the problem is the insertion should be peroformed only when a button is clicked. i have problems in this because i...
3
by: AlecL | last post by:
Hi All, I am trying to capture the value of a textbox as a result of a button click event in a repeater, but it can't find the textbox. Here is what I am trying to do in the code for the click...
2
by: iwasjoeking | last post by:
Hi all, I am trying to make it so that the style "RowSelected" (embedded below) is applied to the table row from which the radio button is selected, and then removed when a different radio...
7
by: jambyl | last post by:
I have two JSP pages PageOne.jsp and PageTwo.jsp. On the PageOne.jsp I have TextBoxOne and TextBoxTwo. Next to each of these textboxes there is a "Wizard1" button and "Wizard2" button. When the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.