Following up on my own question.. I see there is a showselectcommand
that does work, but I'm trying to do several things here. I need to
select and highlight the row when select by another button that does
stuff, and I've had to place that button under a TemplateField because
I need evalutate bound data to determine whether to enable or not..
could not figure out how to do that under a buttonfield since it has
no enabled property nor does it allow bind or eval..
<asp:GridView SkinID="gridview" ID="rungridview" runat="server"
AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False"
SelectedRowStyle-BackColor="yellow"
DataSourceID="gridviewdatasource" DataKeyNames="Jobname">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Run" SkinID="Button" Text="Run"
CommandArgument='<%#Eval("Jobname") %>'
Enabled='<%# Eval("Enabled")%>'
CommandName="Run" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Schedule" HeaderText="Schedule"
SortExpression="Schedule" />
Also, wondering .. in the codebehind, under the rowcommand event, is
there any way that I get the index of the row for which the command
was selected? If so, i could then simply
Protected Sub PendingGridView_RowCommand(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs ) Handles
rungridview.RowCommand
....
rungridview.SelectedIndex = whaterver
Thanks again.