Hi

After the Delete Operation. Set the SelectedIndex property of DataGrid to -1


HTH
Prasad

"Luis Rivera" <sabio04@yahoo.com> wrote in message
news:J7D_a.95679$cF.29279@rwcrnsc53...
> Hello, I have a strange problem with my datagrid control. I am binding
the
> control to a sqlserver database table and I have set the
AutoGenerateColumns
> to False since I am using item templates. When I load the datagrid in the
> browser everything is displayed properly and I can add, delete, cancel,
edit
> and update rows.
>
> Now the weird problem is that when I delete a row, say in the middle of
the
> datagrid, when I go to add a new one, it adds it to the same position
where
> I deleted the previous row instead of adding it to the bottom of the
> datagrid. I tried forcing it to add the row to the bottom of the datagrid
> but to no avail.
>
> If anyone can help I would greatly appreciate it.
>
> Thanks,
>
> L
>
>