Re: Manipulating a bound datagridview
- From: "VJ" <vijaybalki@xxxxxxxxx>
- Date: Fri, 28 Apr 2006 09:21:22 -0500
Either way you do it, it is going to delete at the source.. because it is by
reference
Vijay
"korey99" <koreyatterberry@xxxxxxxxx> wrote in message
news:1146232165.070015.240130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi-
I'm working on an application that has a datagridview bound to a
datatable, backed by an Access database, through a bindingsource. I
have buttons to add and remove rows, and handlers for those buttons.
My question is, what is the proper/commonly accepted way to (for
example) remove the currently selected row from this
datatable/datagrid? Should I go through the datagridview, the
bindingSource, or the datatable itself? I've gotten the following to
work:
DataRowView drv = (DataRowView)bindingSource.Current;
drv.Delete;
and
DataRowView drv = (DataRowView)dgvAttachments.CurrentRow.DataBoundItem;
drv.Delete;
Thanks,
Korey
.
- References:
- Manipulating a bound datagridview
- From: korey99
- Manipulating a bound datagridview
- Prev by Date: Re: App.config file
- Next by Date: Re: Error Installing Windows Service- Please Help
- Previous by thread: Manipulating a bound datagridview
- Next by thread: Re: Expose class members (how to)
- Index(es):