472,789 Members | 1,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

How to let user delete multi rows from the BindingSource

How to let user delete multi rows from the BindingSource
I have in my program datagridview bound it to sql table
Throw Bindingsource

To fill it:

MyTableTableAdaptor.fill(MyDataset.Mytable);
MyTableBindingSource.datasource = MyDataset;
MyTableBindingSource.datamember = MyDataset;
Datagridview.datasource = MyTableBindingSource;
To delete from it:

MyTableBindingSource. Removecurrent();

This only removes one item at the time so how I can let the user delete
multi selected rows

Thank you in advance

Mar 16 '08 #1
2 3258

"MMSJED" <MM****@discussions.microsoft.comwrote in message
news:75**********************************@microsof t.com...
How to let user delete multi rows from the BindingSource
I have in my program datagridview bound it to sql table
Throw Bindingsource

To fill it:

MyTableTableAdaptor.fill(MyDataset.Mytable);
MyTableBindingSource.datasource = MyDataset;
MyTableBindingSource.datamember = MyDataset;
Datagridview.datasource = MyTableBindingSource;
To delete from it:

MyTableBindingSource. Removecurrent();

This only removes one item at the time so how I can let the user delete
multi selected rows
You'll figure it out.

<http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1 &q=how+to+delete+multiple+rows+in+a+datagrid+.net& spell=1>

Mar 16 '08 #2
Thank you
Sorry for wasting your time
"Mr. Arnold" wrote:
>
"MMSJED" <MM****@discussions.microsoft.comwrote in message
news:75**********************************@microsof t.com...
How to let user delete multi rows from the BindingSource
I have in my program datagridview bound it to sql table
Throw Bindingsource

To fill it:

MyTableTableAdaptor.fill(MyDataset.Mytable);
MyTableBindingSource.datasource = MyDataset;
MyTableBindingSource.datamember = MyDataset;
Datagridview.datasource = MyTableBindingSource;
To delete from it:

MyTableBindingSource. Removecurrent();

This only removes one item at the time so how I can let the user delete
multi selected rows

You'll figure it out.

<http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1 &q=how+to+delete+multiple+rows+in+a+datagrid+.net& spell=1>

Mar 17 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gordon | last post by:
I have 2 tables t and t1. In this case, t1 is a copy of t. I want to delete rows from t1 based on criteria on the t table and a relationship between t ad t1 (in this case the id column). In the...
0
by: Vic | last post by:
Hi all, When I test the Delete multi table function in MySQL, DELETE table_name ...] FROM table-references I accidentally delete all data in one table. All data in that table are gone...
5
by: teddysnips | last post by:
I have to write an application to do some data cleansing. It's a Contact database, but over a number of years there are multiple companies which are all essentially the same entity. For each...
6
by: phonl | last post by:
In ADO2, how would I find the position of "x" in: myDataSet.Tables("myTable").Rows(x).Item("myField") = "NewValue" I want to manipulate some data in the current row in my dataset, but it seems...
4
by: Andy_Khosravi | last post by:
I'm trying to build a search utility for users to find 'inquiries' in my database that involves several tables. This is normally easy to do with the query builder, but I have a unique situation...
11
by: John J. Hughes II | last post by:
I have a DataGridView displaying data from a DataSet. To the right of that I have a custom user control which displays one of the data set fields. The custom user control is bound to the data set...
8
by: prosad | last post by:
Hi! Have been hitting my head on the wall for two weeks now. am a php newbie. have a form that on submitting to a MySQL DB instantly generates a HTML table on the same page. what i need now is way...
2
by: Michael | last post by:
It seems that a gridview allows us to delete only a single row at a time. How to extend this functionality to select multiple rows and delete all of the selected rows in a single stroke? just like...
3
by: =?Utf-8?B?VG9yZW4gVmFsb25l?= | last post by:
I have a simple datatable in a dataset and cannot figure out how to delete the current row in the dataset/table. I have been able to hard code the current row value to a 1, and that works deleting...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.