Don't tell anyone, but I do sometimes answer Datagrid questions sent by private email. (Note: I don't have time to answer ALL the questions I receive, so I apologize if your question didn't receive a response). So I thought I would share here some of the answers that I give.
Today's emailer wants to know: How do I change the CssClass of a Datagrid row after the user has clicked on a HyperLink control in that row?
Well, I worked up a sample on how to do this using a Javascript function (and if anyone has a better way, please let me know). Let's say the relevant Datagrid column looks like this:
<asp:TemplateColumn>
<ItemTemplate>
<asp:Hyperlink id="docURL" runat="server" NavigateUrl=<%#"Javascript:ShowDoc(" & Container.ItemIndex & ");"%>>Doc Name</asp:Hyperlink>
</ItemTemplate>
</asp:TemplateColumn>
The Javascript I came up with (using the current row index in the grid):
function ShowDoc(obj) {
window.open('newpage.aspx', 'name')
tabs = document.getElementsByTagName("table");
tabs[0].rows[obj+1].className='ClickedClass';
}