Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > buttons fail to appear in EditCommandColumn of DataGrid

Reply
Thread Tools

buttons fail to appear in EditCommandColumn of DataGrid

 
 
Matt
Guest
Posts: n/a
 
      12-05-2003
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
 
Reply With Quote
 
 
 
 
rmkhan
Guest
Posts: n/a
 
      12-09-2003
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


http://www.velocityreviews.com/forums/(E-Mail Removed) (Matt) wrote in message news:<(E-Mail Removed). com>...
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid Nav buttons and numeric buttons Jeremy Jones ASP .Net 1 03-22-2007 08:00 AM
DataGrid: asp:EditCommandColumn buttons does not call the _edit su =?Utf-8?B?c2xlbWVu?= ASP .Net 0 06-20-2006 02:04 PM
ButtonColumn and EditCommandColumn don't work together as expected in DataGrid Piotr ASP .Net 0 01-06-2006 02:21 PM
DataGrid EditCommandColumn not firing events properly. Rick ASP .Net 1 02-02-2004 05:03 AM
DataGrid EditCommandColumn not firing events properly. Richard Ryerson ASP .Net 0 01-28-2004 06:50 PM



Advertisments