Where are the Update/Cancel buttons?

Discussion in 'ASP .Net Datagrid Control' started by David Hallaran, Apr 5, 2005.

  1. Hi all!

    I have a treeview. (Irrelevant).

    In the target page I have a DataGrid populated with several data Items (a
    SQL SP resultset as a DataTable.) and columns with Edit and Delete html
    buttons.

    There is a button outside of the grid labeled Add.

    The Add button's purpose is to Clear() the DataTable which is the grid's
    DataSource. After the clear() the Add function then adds a row to the
    DataTable using DataTable.NewRow() followed by DataTable.InsertAt(). Then a
    DataGrid.DataBind().

    Sure enough the grid is cleared, the added DataGrid Item appears. The intent
    is to allow the user fill in the new row and continue to add as necessary.

    The problem: There is no Edit button, only Delete.

    What am I doing wrong?

    Thanks.
     
    David Hallaran, Apr 5, 2005
    #1
    1. Advertising

  2. David Hallaran

    Uri Guest

    Hi David,

    Maybe you need to set the grid's EditItemIndex to point to the Item to be
    edited?

    Regards,
    urig

    "David Hallaran" <> wrote in message
    news:p5E4e.29491$...
    > Hi all!
    >
    > I have a treeview. (Irrelevant).
    >
    > In the target page I have a DataGrid populated with several data Items (a
    > SQL SP resultset as a DataTable.) and columns with Edit and Delete html
    > buttons.
    >
    > There is a button outside of the grid labeled Add.
    >
    > The Add button's purpose is to Clear() the DataTable which is the grid's
    > DataSource. After the clear() the Add function then adds a row to the
    > DataTable using DataTable.NewRow() followed by DataTable.InsertAt(). Then

    a
    > DataGrid.DataBind().
    >
    > Sure enough the grid is cleared, the added DataGrid Item appears. The

    intent
    > is to allow the user fill in the new row and continue to add as necessary.
    >
    > The problem: There is no Edit button, only Delete.
    >
    > What am I doing wrong?
    >
    > Thanks.
    >
    >
     
    Uri, Apr 6, 2005
    #2
    1. Advertising

  3. urig,

    Thank you. I left that out of my post. I did. The record is added at the top
    of the DataTable and EditemIndex was set. The grid would come up in Edit
    mode. Just no Edit button in the EditCommndColumn.

    But I fixed it today: new project, new DataGrid. Pasted in the relevant code
    behind as described below. Voila!!!

    I've heard of all sorts of 'bugs' with the DataGrid.

    "Uri" <> wrote in message
    news:4253ef4e$...
    > Hi David,
    >
    > Maybe you need to set the grid's EditItemIndex to point to the Item to be
    > edited?
    >
    > Regards,
    > urig
    >
    > "David Hallaran" <> wrote in message
    > news:p5E4e.29491$...
    > > Hi all!
    > >
    > > I have a treeview. (Irrelevant).
    > >
    > > In the target page I have a DataGrid populated with several data Items

    (a
    > > SQL SP resultset as a DataTable.) and columns with Edit and Delete html
    > > buttons.
    > >
    > > There is a button outside of the grid labeled Add.
    > >
    > > The Add button's purpose is to Clear() the DataTable which is the grid's
    > > DataSource. After the clear() the Add function then adds a row to the
    > > DataTable using DataTable.NewRow() followed by DataTable.InsertAt().

    Then
    > a
    > > DataGrid.DataBind().
    > >
    > > Sure enough the grid is cleared, the added DataGrid Item appears. The

    > intent
    > > is to allow the user fill in the new row and continue to add as

    necessary.
    > >
    > > The problem: There is no Edit button, only Delete.
    > >
    > > What am I doing wrong?
    > >
    > > Thanks.
    > >
    > >

    >
    >
     
    David Hallaran, Apr 6, 2005
    #3
    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. =?Utf-8?B?U3RldmUgS2FsbGFs?=

    CssClass on DataGrid Edit, Update & Cancel buttons

    =?Utf-8?B?U3RldmUgS2FsbGFs?=, Jul 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    731
    =?Utf-8?B?U3RldmUgS2FsbGFs?=
    Jul 6, 2004
  2. =?Utf-8?B?SmFjcXVlcyBMZWNsZXJj?=

    RE: Setting CssClass on Edit, Update & Cancel buttons

    =?Utf-8?B?SmFjcXVlcyBMZWNsZXJj?=, Jul 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    502
    =?Utf-8?B?SmFjcXVlcyBMZWNsZXJj?=
    Jul 6, 2004
  3. =?Utf-8?B?cG11ZA==?=

    CANT see EDIT UPDATE CANCEL Buttons for DATAGRID

    =?Utf-8?B?cG11ZA==?=, Dec 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,403
    =?Utf-8?B?cG11ZA==?=
    Dec 28, 2004
  4. nib

    Problem with Update & Cancel buttons not showing up

    nib, Nov 19, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    147
    Aneesh
    Nov 25, 2003
  5. LouV

    Column Update Cancel buttons disappear on databinding

    LouV, Sep 29, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    122
Loading...

Share This Page