I am having difficulty finding out why the onitemcommand doesn't call the RetrieveFile sub when the button is clicked, but does when the onsortcommand is fired. Here is the code.
Sub SortGrid(source As Object, e As DataGridSortCommandEventArgs)
RunQueryAndBind(e.SortExpression)
End Sub
Sub RetrieveFile(sender As Object, e As DataGridCommandEventArgs)
if e.CommandName = "Retrieve" then
...
end if
end sub
<asp
ataGrid id="grdFiles" runat="server"
....
onSortCommand="SortGrid" OnItemCommand="RetrieveFile">
<columns>
...
<asp:ButtonColumn HeaderText="Download"
ButtonType="PushButton"
Text="Download"
CommandName="Retrieve"
/>
</columns>
</asp
ataGrid>
Sub SortGrid(source As Object, e As DataGridSortCommandEventArgs)
RunQueryAndBind(e.SortExpression)
End Sub
Sub RetrieveFile(sender As Object, e As DataGridCommandEventArgs)
if e.CommandName = "Retrieve" then
...
end if
end sub
<asp
....
onSortCommand="SortGrid" OnItemCommand="RetrieveFile">
<columns>
...
<asp:ButtonColumn HeaderText="Download"
ButtonType="PushButton"
Text="Download"
CommandName="Retrieve"
/>
</columns>
</asp