buttons fail to appear in EditCommandColumn of DataGrid

M

Matt

hi,

I have a datagrid with an EditCommandColumn in it, but only one of the
buttons (Edit) is displayed. Does anyone know why this would be? It
seems like it would be a simple problem but I haven't seen any similar
postings. Pushing the button works, but the update button remains
missing. Link buttons produce similar behavior.

Here's the code:

<asp:datagrid id="discDataGrid" runat="server" Width="1000px"
Font-Names="Arial" OnEditCommand="rejectFile" DataKeyField="filename"
OnUpdateCommand="acceptFile" PageSize="5" AllowPaging="True"
OnPageIndexChanged="discDataGrid_Paging"
OnSortCommand="discDataGrid_Sorting" CellPadding="3"
HeaderStyle-BackColor="#cfcfcf"
AlternatingItemStyle-BackColor="#dddddd" BorderColor="Black"
AllowSorting="True" Font-size="8pt" AutoGenerateColumns="False">

<Columns>

(other columns)

<asp:EditCommandColumn ButtonType=PushButton EditText="Reject"
UpdateText="Accept"></asp:EditCommandColumn>

</Columns>
</asp:datagrid>

Thanks in advance,
matt
 
R

rmkhan

Hi Matt

In EditCommandColumn When the Edit button for an item is clicked, the
EditCommand event is raised and the Edit button is replaced with the
Update and Cancel command buttons. Edit and Update both cannot be
displayed together Instead of this use Two SelectCommandColumn for
your functionality,one for Accept and reject But definetly you cannot
use EditCommandcolumn for this

I hope this clears your doubt

Thanks
Rehan Mustafa Khan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top