Advertisement

04.24.2008 at 04:09PM PDT, ID: 23352247
[x]
Attachment Details

Programmatically click a button on a gridview footer

Asked by wsturdev in Microsoft Visual Basic.Net

Tags: Gridview, VB.net, Footer, Button

I have a grid view with multiple data rows, a footer and a pager.

In GridView_RowCommand, I detect I am responding to a "Page" command.  Because of various tests, I determine the user should have clicked 1 of 2 buttons in the footer before trying to page.  I do not want to hide the pager, to force the user to click one of the buttons.  Rather,  I want to put up an "Are you sure" type dialog and depending on the result, programmatically "click" one of the footer buttons for him.

I have tried:
GridView.Footer.FindControl("button1").click()  with no success.

What is the correct syntax?Start Free Trial
[+][-]04.24.2008 at 04:14PM PDT, ID: 21435973

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 04:17PM PDT, ID: 21435985

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 05:46PM PDT, ID: 21436351

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.25.2008 at 07:29AM PDT, ID: 21439914

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: Gridview, VB.net, Footer, Button
Sign Up Now!
Solution Provided By: robbhill
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906