Problem deleting rows from datagrid....

  • Thread starter Prashant Kumar via DotNetMonster.com
  • Start date
P

Prashant Kumar via DotNetMonster.com

Hi All,
I have a datagrid with a datatable as the underlying datasource.
I need to select multiple rows in the datagrid & delete(not remove) them in the datatable. In other words, I need to set the corresponding rowstates as deleted.
Iam able to do this and the respective rows are not shown thereafter in the datagrid. But if i try to do a subsequent delete, the indexes in datagrid & datatable do not match.
Is there some way of solving this without adding an additional column (like an identity col) to the datatable?

Thanks & regards,
Pras.
 
G

GreggTB

Without seeing the code, it's difficult to tell but if I'm
understanding you, you're...
---> deleting the rows from the DataTable,
---> clearing the DataGrid and uncoupling it from its DataSource,
---> then refreshing the DataGrid's DataSource

....and the rows are still appearing? That doesn't make sense to me as
I'd think the rows shouldn't be appearing. Post the code you're using...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top