|
-
Dec 12th, 2007, 09:15 PM
#1
Thread Starter
Fanatic Member
Help with DataGridView
Hi guys! Help please...I have 2 DataGridView, DataGridView1 and DataGirdView2. What I want is, when i double click an item on DataGridView1 I want that item to be copied to DataGridView2..How is this posible? by the way, the 2DataGridView are initially dont have columns defined but when my windows form is load DataGridView1 is filled up by the result of my sql query so the columns in DataGridView1 is defined. Help please..Thanks in advance!
-
Dec 12th, 2007, 09:48 PM
#2
Re: Help with DataGridView
You get the bound DataRowView from the Current property of your BindingSource. You then call the AddNew method of the second BindingSource and set the fields of the new DataRowView.
-
Dec 12th, 2007, 10:04 PM
#3
Thread Starter
Fanatic Member
Re: Help with DataGridView
Whoowwww...Thanks for that John..but, im just new to DataGrid and honestly, i cant understand the terms...Can you please explain it further, if you can still..or if posible can you please give an example, it may not be exact to what im asking but it could be something that has relevant to my problem...Thanks in advance!
-
Dec 12th, 2007, 10:18 PM
#4
Re: Help with DataGridView
This has very little to do with the DataGridView (and nothing to do with the DataGrid). You should be binding your DataTables to BindingSource objects, which in turn should be bound to the grids. Everything I said relates to the BindingSource and DataRowView classes. If you want to know about the BindingSource class, its Current property or its AddNew method (you know what I'm going to say don't you) you should read the documentation.
-
Dec 12th, 2007, 10:26 PM
#5
Thread Starter
Fanatic Member
Re: Help with DataGridView
This has very little to do with the DataGridView (and nothing to do with the DataGrid).
Thats the proof for this
(you know what I'm going to say don't you)
Yah.... read the MSDN...
Thanks for that John...I'll give it a try..
-
Dec 12th, 2007, 10:30 PM
#6
Re: Help with DataGridView
 Originally Posted by daimous
Thanks for that John...I'll give it a try..
When you have, if you still can't get it then post what you've done and I'll be glad to help. I'm always keen to see people have a shot themselves first though.
-
Dec 13th, 2007, 03:17 AM
#7
Thread Starter
Fanatic Member
Re: Help with DataGridView
No prob..
I'm always keen to see people have a shot themselves first though.
INDEED! ..Infact everytime i post a questions/problem its always expected that you have always the answer, it may not be the exact answer/solution but still it really helps a lot and really appreciate it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|