473,386 Members | 1,969 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,386 software developers and data experts.

DataGrid and DataSet

Hi,

I have dataGrid which at first it's empty. i have another dataGrid which
contains checkbox column, what i want to do is, that everytime a checkbox is
checked, my dataGrid will be filled with data. So my question is, Is it
possiable to add a data to dataSet without erasing the data that exists
already?

I take the data from my dataBase, so if there is a better way to add data to
my dataGrid everytime a checkbox is check, i will happu to hear and learn.

Thanks,
Gidi.
Nov 23 '05 #1
1 1235
Hi,

What youi have is a Master/Detail scenario, you can find several examples
in msdn.microsoft.com

Using DataAdapter.Fill you can add the new rows to your dataset, there are a
couple of details regarding PKs , etc that you can check in the help of the
Fill method.
after that you just do a
datagrid1.DataSource = theDataSet ;
datagrid1.Bind

to refresh the datagrid
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Gidi" <sh*****@hotmail.com.dontspam> wrote in message
news:4F**********************************@microsof t.com...
Hi,

I have dataGrid which at first it's empty. i have another dataGrid which
contains checkbox column, what i want to do is, that everytime a checkbox
is
checked, my dataGrid will be filled with data. So my question is, Is it
possiable to add a data to dataSet without erasing the data that exists
already?

I take the data from my dataBase, so if there is a better way to add data
to
my dataGrid everytime a checkbox is check, i will happu to hear and learn.

Thanks,
Gidi.

Nov 23 '05 #2

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

Similar topics

0
by: Frosty | last post by:
Hi I am using the VS xsd designer to create a strongly typed dataset. The dataset is apparently successfully created, with no warnings or errors given. Is it not then to be expected that this...
3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: CVerma | last post by:
Hi, I have an embedded datagrid within a datalist. I am not able to perfrom paging in the datagrid. Any ideas? Here is my code: Here is my Simplegrid.cs file: using System; using...
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.