473,804 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid copy

Hi, I have a datagrid with multiple columns and would like to copy the
contents of one column to another datagrid object that only has the
one column. I don't think copy can do this. Is there a method
available to do a copy of one column?

Thanks!

Nov 1 '07 #1
1 2906
Soulless,

No, there isn't. If you knew the type/structure of the underlying data
sources directly, then I would say to work with those. If you don't, then
the only way to do this would be to access all the rows in the column you
want to access, and then assign the values to the column in the destination
data grid (through the grid itself, through the Item property, which will
return the DataGridViewCel l instance you can get/set the Value property of).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Soulless" <dg*******@gmai l.comwrote in message
news:11******** **************@ e34g2000pro.goo glegroups.com.. .
Hi, I have a datagrid with multiple columns and would like to copy the
contents of one column to another datagrid object that only has the
one column. I don't think copy can do this. Is there a method
available to do a copy of one column?

Thanks!
Nov 2 '07 #2

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

Similar topics

2
9931
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell (multi-select without modifier keys). I got that working fine, but I also wanted to keep rows selected after a sort, which I do by storing the row's id in an arraylist. The idea was to do the sort and then go back and re-select the rows with that...
0
473
by: Steve | last post by:
I have a datagrid that is created at run time DataGrid dgG = new DataGrid(); BoundColumn bcB; dgG.CellPadding = 5; dgG.CellSpacing = 0; dgG.GridLines = GridLines.Both; dgG.CssClass = "SectionTableLines"; dgG.DataKeyField = "PlanWorkOrderID";
5
2042
by: junglist | last post by:
Hi guys, I've been trying to implement an editable datagrid and i have been succesful up to the point where i can update my datagrid row by row. However what used to happen was that once i updated one row, all of them were updated so i immediatelly figured out that i have to include the id of every entry in the update statement. This is where the problem is raised. My database is an Access database. The table i am updating contains a Date...
0
973
by: Gh0st | last post by:
Hi i have a Webapplication with different Pages and on each Page I have a Datagrid(Paged) and a Print-Button. When clicking on the Button a new Window PopsUp and a 1:1 Copy of my aktually seen Datagrid(without paging, the whole data) should be displayed there. This works fine with if i store my dataset in a Session Variable and on my Print-Page I assign the Sessionvariable to the DataGrid1.DataSource and then i DataGrid1.DataBind() it.
6
1816
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP fills the temp table again and returns rows 10-19. The temp table is dropped after each call to the SP, so it has to be created and filled every time the user changes page in the datagrid. My question is this: Would it be more efficient to...
13
2677
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value. My probelm.... when I have the user press the update button (which does a post back that loops through the datagrid and updates a database) the field/cell that is filled by the javascript appears to be blank in my update code, even though I can...
0
1607
by: simchajoy2000 | last post by:
Hi, I am having a strange problem. I have a window's form with a datagrid and for some reason I am not able to copy data in the datagrid cells by pressing Ctrl-C on the keyboard. I am able to copy data by right-clicking and then selecting "Copy" from the drop-down menu and I am able to paste data by pressing Ctrl-V. I just can't get Ctrl-C to work. I originally had the datagrid in a user control and I thought that
2
10728
by: Kevin Hodgson | last post by:
I have a standard .NET Datagrid (Databound to a SQL Dataset), and I need to select all rows of the datagrid when a button is clicked, to allow a user to copy the data, and then paste it into Excel or another application. They need to be able to do this because the application is running on a Terminal Server in Application Server Mode, and they need to copy the data to an Excel worksheet on their local computer. I can do this manually by...
6
3531
by: Bill nguyen | last post by:
I use DatagridTableStyle to display data from table WF_Carrier_FreightChart. USers than can add/delete/edit rows in the Datagrid. Since the Datagrid's datasource "dCarrierFreight" is just a copy/view of the table (dataset dFreight.tables(0) ), I need to update the original table to reflect multiple changes in the Datagrid. Your help is greatly appreciated. Bill
2
2226
by: jock1up | last post by:
I am working with editing within a DataGrid control cell and am confused about which events occur after the editing is completed. I see that 5 events can occur total, including the ones below and AfterColEdit, AfterUpdate. 1. BeforeColUpdate/ 2. AfterColUpdate/ 3. BeforeUpdate or all of these occur? 1. BeforeColUpdate says after editing is completed in a cell, but before dates is moved from the cell to the DataGrid control's copy...
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6866
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.