Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How about a little help on a item template issue… 1

Status
Not open for further replies.

koolage

IS-IT--Management
Jan 3, 2005
60
0
0
I’m having difficulty finding a straight-forward solution to the following…



Asp.net – Web Page (aspx)

I have a grid on a page…

GridView1.row(0) has a button

I want the button enabled if a certail criteria exists in the data row/record…



For example…



Let’s say this is my grid:row0 (States)

Let’s assume they’re link controls in the grid column



Illinois

Missouri

Texas





Maybe because this salesman has no access to Missouri or better yet… Missouri’s state flag data field is blank… so, I want to turn row(0).enabled to false… I know I can do this somehow in the Item Template (I think).,.. but I can’t seem to resolve how. Maybe you can help? Reminder: Grid on a web page… (gridview)

 
Use the RowDataBound event, apply any logic you need, get a reference to the Button using FindControl and then toggle it's Visible property.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top