Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 20th, 2004, 10:53 AM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to remove row from datagrid

I have a datagrid in my application and what i want to do is after user selects any one of the rows(i.e double click) then it should be removed from the list.

please help.

__________________
------------------------
http://www.indrajal.com
  #2 (permalink)  
Old October 29th, 2004, 11:19 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The typical way of removing a row from a datagrid is to remove the row/item from the grid's datasource and re-bind the datagrid.
  #3 (permalink)  
Old November 9th, 2004, 12:36 PM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by planoie
 The typical way of removing a row from a datagrid is to remove the row/item from the grid's datasource and re-bind the datagrid.
can you please eloborate.
thanks for the reply.

  #4 (permalink)  
Old November 10th, 2004, 09:28 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It's conceptual. How you remove the source data is dependant on the type of the source.

DataTable: remove row(s)
Array/collection: remove item(s)

Of course, if your datasource is being driven off a database then perhaps you need to also delete the database row(s).

Once you have removed a row/item you rebind the datagrid.


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove duplicate row from sheet ketannsharma Excel VBA 1 February 18th, 2007 03:32 AM
Manage data row by row in datagrid Dragonist Classic ASP Databases 5 July 29th, 2004 04:17 AM
Re : How to remove Row handles lolo Pro VB Databases 0 May 7th, 2004 08:06 PM
open and remove the first row of Excel in DTS AyatKh SQL Server DTS 5 March 17th, 2004 03:41 AM
Remove JTable row and column in one event rpalanivelu J2EE 0 October 30th, 2003 08:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.