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

Loading datarows into datagrid?

hi all,

I need to insert a datarows collection from a datatable into a
datagrid?can anyone tell me how to do???
Thanx in advance..

Nov 17 '05 #1
3 1388
You need to bind the datatable to the datagrid.
First assign the table to the datasource roperty of the grid and then
call the bind method.

Junnys, Caesar Group

Will you be my new colleague? Visit www.caesar.nl

Prince schreef:
hi all,

I need to insert a datarows collection from a datatable into a
datagrid?can anyone tell me how to do???
Thanx in advance..


Nov 17 '05 #2
In c# how can I bind???

Nov 17 '05 #3
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here

DataTable myTable;

///load data
///
DataGrid1.DataSource=myTable;
DataGrid1.DataBind();
}

Nov 17 '05 #4

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

Similar topics

0
by: David S | last post by:
I would like to be able to select one or more datarows of a windows datagrid to be able to delete if desired. How would I accomplish this? Thank you, David
1
by: Dominik Luyten | last post by:
Hi, I would like to format certain DataRows in a Windows.Forms.DataGrid. I know how to do that for the columns, but I cannot find a way to assign a specific font, color etc. to a specific kind...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
5
by: Nathan Sokalski | last post by:
I am writing an ASP.NET application in which I need to copy DataRows from one DataTable to another. When I use code such as the following: temprows = nodes.Select("state='PA'")...
9
by: Brad | last post by:
I have written some code to manipulate data/records in a MASTER (order header) and DETAIL (order details) tables. What I have written is too extensive to post but essentially trying to: 1....
1
by: Bala | last post by:
Hi, Currently i am loading the file names into datagrid (unbound) from a folder(sub folders too). so for this i am using this below code. but its too slow to loading all the file names. is it...
2
by: gl | last post by:
What is the quickest way to get an array of datarows (from a typed dataset) into a dataview (for the purpose of sorting to bind to a datagrid)? Like i have a function that returns...
6
by: A.Weinman | last post by:
Hello all, I have an application that has multiple forms, only 3 of which matter for this issue. There is a main form that starts invisible and does nothing more than start other forms and link...
8
by: jehugaleahsa | last post by:
Hello: We wrote an entire application where we add our DataRows to our DataTables immediately. However, we have to shut off our constraints to do this. We would like to use detached DataRows to...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.