Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

Problem deleting rows from datagrid....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Prashant Kumar - 18 Dec 2004 05:55 GMT
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.
GreggTB - 19 Dec 2004 18:41 GMT
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...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.