buttons fail to appear in EditCommandColumn of DataGrid

Discussion in 'ASP .Net Datagrid Control' started by Matt, Dec 5, 2003.

  1. Matt

    Matt Guest

    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
    Matt, Dec 5, 2003
    #1
    1. Advertising

  2. Matt

    rmkhan Guest

    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


    (Matt) wrote in message news:<>...
    > 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
    rmkhan, Dec 9, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick
    Replies:
    1
    Views:
    468
    Richard Ryerson
    Feb 2, 2004
  2. Richard Ryerson
    Replies:
    0
    Views:
    2,624
    Richard Ryerson
    Jan 28, 2004
  3. =?Utf-8?B?c2xlbWVu?=
    Replies:
    0
    Views:
    627
    =?Utf-8?B?c2xlbWVu?=
    Jun 20, 2006
  4. Wenjie

    if (f() != FAIL) or if (FAIL != f())?

    Wenjie, Jul 28, 2003, in forum: C Programming
    Replies:
    3
    Views:
    438
    E. Robert Tisdale
    Jul 31, 2003
  5. Jeremy Jones

    Datagrid Nav buttons and numeric buttons

    Jeremy Jones, Mar 21, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    614
    Masudur
    Mar 22, 2007
Loading...

Share This Page