N
Nick Gilbert
We have a Datagrid which contains a template column with a button in it,
as well as an actual button column. If either of the buttons are
clicked, the ItemCommand event does not fire.
If however, the ButtonType of the ButtonColumn is changed to
"LinkButton" instead of "PushButton", the event fires normally!
Why on earth is this happening? I presume this a bug in .NET? (We are
using 1.1 final).
<aspataGrid id="JobsDataGrid" runat="server"
AutoGenerateColumns="False"
DataKeyField="JobNumber" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button ID="RunJobButton" Runat="server"
CommandName="RunJob"
CommandArgument="1"
Text="Run Task 1" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:ButtonColumn ButtonType="PushButton" CommandName="RunJob"
Text="Run Task 2" />
</Columns>
</aspataGrid>
Any ideas how to fix this would be appeciated.
Nick...
as well as an actual button column. If either of the buttons are
clicked, the ItemCommand event does not fire.
If however, the ButtonType of the ButtonColumn is changed to
"LinkButton" instead of "PushButton", the event fires normally!
Why on earth is this happening? I presume this a bug in .NET? (We are
using 1.1 final).
<aspataGrid id="JobsDataGrid" runat="server"
AutoGenerateColumns="False"
DataKeyField="JobNumber" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button ID="RunJobButton" Runat="server"
CommandName="RunJob"
CommandArgument="1"
Text="Run Task 1" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:ButtonColumn ButtonType="PushButton" CommandName="RunJob"
Text="Run Task 2" />
</Columns>
</aspataGrid>
Any ideas how to fix this would be appeciated.
Nick...