G
Guest
Hi,
I have form with datagrid. This is what my form tag looks like,
<form runat="server">
<asp:label runat="server" id="lblMessage" />
<aspataGrid runat="server" id="articleList"
DataKeyField="FullName"
OnItemDataBound="articleList_ItemDataBound"
OnEditCommand = "articleList_Edit"
OnCancelCommand = "articleList_Cancel"
OnUpdateCommand = "articleList_Update"
OnDeleteCommand="articleList_DeleteFile"
OnItemCommand="articleList_DownloadFile">
<Columns>
<asp:EditCommandColumn
ButtonType="PushButton"
HeaderText = ""
EditText = "Rename"
CancelText = "Cancel"
UpdateText = "Update" />
<asp:ButtonColumn Text="Delete" ButtonType="PushButton" HeaderText=""
CommandName="Delete" />
<asp:ButtonColumn Text="Download" ButtonType="PushButton" HeaderText=""
CommandName="Download" />
<asp:BoundColumn DataField="Name" HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" DataFormatString="{0:d}"
HeaderText="Last Write Time" ReadOnly="true"
runat="server" />
<asp:BoundColumn DataField="Length" DataFormatString="{0:#,### bytes}"
HeaderText="File Size" ReadOnly="true"
runat="server" />
</Columns>
</aspataGrid>
</form>
The Edit and Delete buttons work the moment I take out the following two
lines,
OnItemCommand="articleList_DownloadFile"
And
<asp:ButtonColumn Text="Download" ButtonType="PushButton" HeaderText=""
CommandName="Download" />
It appears that when the above lines are part of the form, when I click the
Edit button, the control doesn't even go in the event handler
articleList_Edit.
Can someone give me some idea as what could be wrong here? Is somthing wrong
with my form tag? Is it beacsue OnItemDataBound, OnEditCommand,
OnCancelCommand, OnUpdateCommand, OnDeleteCommand and OnItemCommand don't
work if together?
Thanks in advance for your time and help.
Green
I have form with datagrid. This is what my form tag looks like,
<form runat="server">
<asp:label runat="server" id="lblMessage" />
<aspataGrid runat="server" id="articleList"
DataKeyField="FullName"
OnItemDataBound="articleList_ItemDataBound"
OnEditCommand = "articleList_Edit"
OnCancelCommand = "articleList_Cancel"
OnUpdateCommand = "articleList_Update"
OnDeleteCommand="articleList_DeleteFile"
OnItemCommand="articleList_DownloadFile">
<Columns>
<asp:EditCommandColumn
ButtonType="PushButton"
HeaderText = ""
EditText = "Rename"
CancelText = "Cancel"
UpdateText = "Update" />
<asp:ButtonColumn Text="Delete" ButtonType="PushButton" HeaderText=""
CommandName="Delete" />
<asp:ButtonColumn Text="Download" ButtonType="PushButton" HeaderText=""
CommandName="Download" />
<asp:BoundColumn DataField="Name" HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" DataFormatString="{0:d}"
HeaderText="Last Write Time" ReadOnly="true"
runat="server" />
<asp:BoundColumn DataField="Length" DataFormatString="{0:#,### bytes}"
HeaderText="File Size" ReadOnly="true"
runat="server" />
</Columns>
</aspataGrid>
</form>
The Edit and Delete buttons work the moment I take out the following two
lines,
OnItemCommand="articleList_DownloadFile"
And
<asp:ButtonColumn Text="Download" ButtonType="PushButton" HeaderText=""
CommandName="Download" />
It appears that when the above lines are part of the form, when I click the
Edit button, the control doesn't even go in the event handler
articleList_Edit.
Can someone give me some idea as what could be wrong here? Is somthing wrong
with my form tag? Is it beacsue OnItemDataBound, OnEditCommand,
OnCancelCommand, OnUpdateCommand, OnDeleteCommand and OnItemCommand don't
work if together?
Thanks in advance for your time and help.
Green