Solved

Disable Button in Gridview Footer is Criteria Is Met

Posted on 2009-05-17
4
319 Views
Last Modified: 2012-05-07
Gurus
I am trying to disable a button in the footer of my gridview depending if the user has exceeded his number of requests.

Example, If UserRequests >= UserRequestAllotted then
    me.btn_Create_Requests.enabled = False
End if
0
Comment
Question by:acancel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:cdaly33
ID: 24407746
In the gridview's databound event check the rowtype and when it is footer then find the button in the footer and modify it as needed.
0
 
LVL 9

Accepted Solution

by:
cdaly33 earned 250 total points
ID: 24407748
0
 
LVL 11

Assisted Solution

by:Muhammad Ousama Ghazali
Muhammad Ousama Ghazali earned 250 total points
ID: 24407803
Use the code in snippet below in the RowDataBound event of GridView if the code on the above provided link confuses you:
if (e.Row.RowType == DataControlRowType.Footer)
{
	((Button)e.Row.Cells(0).FindControl("btnDoSomething")).Enabled = false;
}

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question