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

Table to Grid

SK
How to bind a grid using table?
I've a table and I want to see that data in a grid for sorting and
pagination. Please provide an example.

Thanks,
XD
Jul 24 '06 #1
3 893
i think you are talking about the datatable,

you must fill a dataset first, then call this,

Datagrid1.Datasource = ds.Tables(0)
Datagrid1.Databind();

This will show the data in your datagrid, also make sure that you turn on
the check in autogenerate columns in Datagrid Property Builder

"SK" wrote:
How to bind a grid using table?
I've a table and I want to see that data in a grid for sorting and
pagination. Please provide an example.

Thanks,
XD
Jul 24 '06 #2
XD
No it is not datatable. It is normal web.UI.webcontrols.Table
I want to view the data in gridview1 than a table.

- Thanks

"Murtaza" <Mu*****@discussions.microsoft.comwrote in message
news:9C**********************************@microsof t.com...
>i think you are talking about the datatable,

you must fill a dataset first, then call this,

Datagrid1.Datasource = ds.Tables(0)
Datagrid1.Databind();

This will show the data in your datagrid, also make sure that you turn on
the check in autogenerate columns in Datagrid Property Builder

"SK" wrote:
>How to bind a grid using table?
I've a table and I want to see that data in a grid for sorting and
pagination. Please provide an example.

Thanks,
XD

Jul 24 '06 #3
Then again you have to follow same approach, construct a datatable, Iterate
through every row of ur HTML table n fill that Datatable then bind that
Datatable to ur gridview....

"XD" wrote:
No it is not datatable. It is normal web.UI.webcontrols.Table
I want to view the data in gridview1 than a table.

- Thanks

"Murtaza" <Mu*****@discussions.microsoft.comwrote in message
news:9C**********************************@microsof t.com...
i think you are talking about the datatable,

you must fill a dataset first, then call this,

Datagrid1.Datasource = ds.Tables(0)
Datagrid1.Databind();

This will show the data in your datagrid, also make sure that you turn on
the check in autogenerate columns in Datagrid Property Builder

"SK" wrote:
How to bind a grid using table?
I've a table and I want to see that data in a grid for sorting and
pagination. Please provide an example.

Thanks,
XD


Jul 24 '06 #4

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

Similar topics

1
by: dschectman | last post by:
I have an interesting issue. I need to implement a dynamic table to mimic a select list. Each time you double click from the master list, a row is added to the list of selected items. The list...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
2
by: VM | last post by:
When I display data to a Windows datagrid I usually fill the underlying table (in another class) and then, once it contains all the data, I attach it to the grid. But there are some processes that...
1
by: VM | last post by:
Initially, I had created my Windows application so that my datagrid's source would be updated once the method that filled the table was finished: private void btn_run_Click(object sender,...
7
by: Chris | last post by:
I'm using ASP.NET and SQL Server and this might be an obviuos question for most, but if I have a table that contains several fields that I need to relate to just one field in another table, how do...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
2
by: dschectman | last post by:
This appears to be a feature of IE JavaScript. I am running IE 6.0 with the latest patches from Microsoft. Are there any workarounds other than re-coding the source HTML to place all the...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
6
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data,...
2
by: shapper | last post by:
Hello, I have a table and I am styling its cells: table.Grid td {background-color: red;} Inside this table I will have some other tables but I don't want their cells to have the styles...
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: 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
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
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...
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.