473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Copying GridView Data from One Gridview to another(Urgent)

Hi,

I am having 2 grids in my form.I am binding the records through object Data Source.main grid is with checkboxes .So I want to copy the checked items into another Gridview?
Can anyone give me the code?Its very urgent

Thanking u

Rupa.
Nov 21 '07 #1
3 1705
mzmishra
390 Expert 256MB
I can suggest you the approach.Try this and let me know if you face any problem
1.int cnt=this.Grid.Items.Count;

for (int i=0; i<cnt; i++)
{
CheckBox chkBox = this.Grid.Items[i].Cells[0].Controls[1] as CheckBox;
if (chkBox.Checked)
{
Create a Datatabel here with all the columns u want in second grid }
}

2.Bind the second grid with the datatable
Nov 21 '07 #2
can u give the clear code?
Nov 21 '07 #3
mzmishra
390 Expert 256MB
I do not know what columns you have in your Datagrid1.
So I cannot Create the Datatable for you .
If you want to know how to create a DataTable then let me know
Nov 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: monika | last post by:
hi ... I have an asp page which has 3 buttons. <p align="center"><input class="button" type="button" onClick="location='welStudent.asp';" value="Click to write a new story"></p> <p...
2
by: Paul | last post by:
Hi: I am not sure whether somebody can sort it out for me. I am doing data transfer from one oracle database to another. Both of them has the same structure (like same tables etc).the only...
1
by: sandy | last post by:
Dear all, i am using the following code to get data from Oracle Database. My query returns say 400 records. Sometime the datase dows not return any records, but if i reduce the number of columns...
2
by: Vishal | last post by:
Hello, I am posting some credit card info to the payment server via a similar code. My code is written in VB.NET but uses the same approach. At the end however I do a...
2
by: Anantha | last post by:
Dear all, We are facing problem with our production server. We have IBM DB2 7.2 running on Windows 2000 Server. Day before OS is crashed and the NT admin has re-installed the whole OS again on...
7
by: vbnetdev | last post by:
My boss wants this done in a day. I would be happy with a week! Anyway, I have a dataset filled with data and need to populate an MS word chart with it when writing a report. Any tutorials or...
13
by: AG | last post by:
I have a gridview that I bind to a List(of Type) at runtime. Not using a datasource control. The gridview has a template column with an imagebutton whose commandname is set to 'Delete'. The...
0
by: snowrupa | last post by:
My class file: public class CaseTransaction : BaseTransaction { /// <summary> /// </summary> private int _transactionSequenceNumber; public int...
1
by: iswar | last post by:
Hi friends.. Im trying to bind a value from dropdownlist placed in gird view to another cell. i want to update a database field with the selected value from dropdownlist and which must be bind to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.