Bunch's Blog

One day I'll have a catchy subtitle, one day
posts - 87 , comments - 124 , trackbacks - 0

June 2011 Entries

Accessing Controls Within A Gridview
Sometimes you need to access a control within a GridView, but it isn’t quite as straight forward as just using FindControl to grab the control like you can in a FormView. Since the GridView builds multiple rows the key is to specify the row. In this example there is a GridView with a control for a player’s errors. If the errors is greater than 9 the GridView should display the control (lblErrors) in red so it stands out. Here is the GridView: <asp:GridView ID="gvFielding" runat="server" DataSourceID="sqlFielding" ......

Posted On Friday, June 17, 2011 9:44 AM | Comments (0) |

Powered by: