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
5E4e.29491$. com...
> > 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.
> >
> >
>
>