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

URGENT: binding datagrid to XML in c#

hi

My sample XML file is
<root>
<header>
<elem>ee</elem>
</header>
<trailerlist>
<trailerrow>
<elem>1</elem>
</trailerrow>
<trailerrow>
<elem>2</elem>
</trailerrow>
....
<trailerlist>
</root>

Question:

I have bound the trailerlist to the datagrid by

datagrid.datasource = ds.Tables["trailerlist"].DefaultView
datagrid.DataBind()

In the above case, it displays 2 rows in my datagrid

Suppose I want to bind only the first 10 rows, then what is the solution ?

Thanks in advance - Arcot
Jul 21 '05 #1
0 1056

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

Similar topics

4
by: CGuy | last post by:
Hi, I have an ASPX page which has a datagrid and this datagrid is bound to a Custom Collection. sample code this.DataGrid1.DataSource = UserManager.Users; this.DataGrid1.DataBind();
0
by: Ann Morris | last post by:
INTRODUCTION One of the most powerful aspects of .NET and Windows Forms is data binding. Data binding is the process of associating user interface (UI) elements with a data source to generate a...
1
by: Deepa | last post by:
I am working on a web page which has a datagrid to be populated. The problem is I need to get the data from 2 different tables to bind the 2 columns of the datagrid. I am not sure of how to do...
1
by: reiks | last post by:
I have a dropdownlist control . I want to bind the data to it from an existing datagrid on my page i.e I wnat to specify the datagrid name instead of the datatable name. Is it possible? How...
0
by: Dheeraj Verma via DotNetMonster.com | last post by:
Hi all, I have a asp data grid under which i have another datagrid which is my user control and is autogenerated.Now I am not able to implement sorting in my inner datagrid eventhough I have...
0
by: Arcot | last post by:
hi My sample XML file is <root> <header> <elem>ee</elem> </header> <trailerlist> <trailerrow> <elem>1</elem>
0
by: settyv | last post by:
Hi, I am using DataGrid control and am binding to the Dataset that is returned from Business layer. Now the problem is that am using hyperlink column for CaseID which is displaying twice in the...
3
by: tirath | last post by:
hi, I have a DataView which has around 50 items(the page has scrollbars). there is a search box on top of the page. when user enters an Id, i do DataView.find("Id"). I get the row index but i...
3
by: PerumalSamy | last post by:
hi, i need details of how to bind two tables in a single datagrid for following example 1st row will be from 1st table next will be the rows from 2nd table in which the two table has...
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
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: 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
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...

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.