I have a button which adds new row in grid view at button click event. A row contains two text boxes and two drop down lists. But before adding new row I want to check if all controls in the first rows are filled or not. so for that I want to call java script on button click event. So how can I call java script on button which already handles an event new row in grid view?
Share
The solution is to chain the calls. There are two ways to do this:
You can use the
onclickproperty of the button in your function definition:Note that I’ve found that unreliable if there is no
onclickinstalled; for some reason, the pattern doesn’t work with the browser’s default “onclick” handler.You can move the code that handles the click into a function (which you probably already have). Now you write a validation function and install this new click handler: