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

GridView vs DataGrid

I liked the DataGrid because I was familiar in walking through it to do
custom filling and retrieval of data in cases where standard binding
wouldn't do the job.

I read somewhere that the object model is the same for the datagrid and the
gridview. But as I begin to try to manually load a gridview I notice that
there is no such thing as a GridViewItem as there was a DataGridItem. So,
it's not the same.

Are there any articles or tutorials on how to walk through, and build
Gridviews in code?

--
Regards,
Gary Blakely
Jun 25 '06 #1
6 2301
You will find some articles here that do some custom formatting etc. on
gridview items. See if any of these help.

http://www.netomatix.com/DataGridSeries.aspx

"GaryDean" <Ga******@newsgroups.nospam> wrote in message
news:uS**************@TK2MSFTNGP03.phx.gbl...
I liked the DataGrid because I was familiar in walking through it to do
custom filling and retrieval of data in cases where standard binding
wouldn't do the job.

I read somewhere that the object model is the same for the datagrid and
the gridview. But as I begin to try to manually load a gridview I notice
that there is no such thing as a GridViewItem as there was a DataGridItem.
So, it's not the same.

Are there any articles or tutorials on how to walk through, and build
Gridviews in code?

--
Regards,
Gary Blakely

Jun 25 '06 #2
Those are some interesting things but I'm looking for help on manually
loading and retrieving data from cells and controls inside the cells. It
seems to be a whole different object model than the datagrid was.
--
Regards,
Gary Blakely
"Winista" <wi*****@gmail.com> wrote in message
news:ei**************@TK2MSFTNGP04.phx.gbl...
You will find some articles here that do some custom formatting etc. on
gridview items. See if any of these help.

http://www.netomatix.com/DataGridSeries.aspx

"GaryDean" <Ga******@newsgroups.nospam> wrote in message
news:uS**************@TK2MSFTNGP03.phx.gbl...
I liked the DataGrid because I was familiar in walking through it to do
custom filling and retrieval of data in cases where standard binding
wouldn't do the job.

I read somewhere that the object model is the same for the datagrid and
the gridview. But as I begin to try to manually load a gridview I notice
that there is no such thing as a GridViewItem as there was a
DataGridItem. So, it's not the same.

Are there any articles or tutorials on how to walk through, and build
Gridviews in code?

--
Regards,
Gary Blakely


Jun 26 '06 #3
Hi Gary,

Thank you for your post.

To understand why we introduce the new GridView control while DataGrid is
doing pretty good, we need to address two points:
1) While DataGrid is one of the most powerful controls in ASP.NET 1.x, it
requires too much work for mundane tasks such as sorting, paging, sorting,
and deleting data.
2) ASP.NET 2.0 enhances the data-binding architecture, introducing a new
family of components--the data source objects, which act as a bridge
between data-bound controls and ADO.NET objects. The familiar DataGrid
control is still supported, but it doesn't take full advantage of the
specific capabilities of data source components.

You can find more information at here:

#GridView: Move Over DataGrid, There's a New Grid in Town!
http://msdn.microsoft.com/msdnmag/is...4/08/GridView/

In my opinion, if your purpose is to manually load and retrieve data from
cells and controls inside the cells, I would recommend you still use the
DataGrid control, it's still supported in ASP.NET 2.0. If you want to try
the new and powerful data-binding feature of data source objects (such as
SqlDataSource, ObjectDataSource), I would recommend you use the GridView
control.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 26 '06 #4
DataGridItem in the DataGrid is analogous to the GridViewRow in the
GridView, accessed like this:
foreach (GridViewRow gvr in GridView1.Rows) {
// Do whatever
}

Hope that helps.

James

GaryDean wrote:
I liked the DataGrid because I was familiar in walking through it to
do custom filling and retrieval of data in cases where standard
binding wouldn't do the job.

I read somewhere that the object model is the same for the datagrid
and the gridview. But as I begin to try to manually load a gridview
I notice that there is no such thing as a GridViewItem as there was a
DataGridItem. So, it's not the same.

Are there any articles or tutorials on how to walk through, and build
Gridviews in code?


Jun 26 '06 #5
Walter, (I know it's been a while since your post :)

I'm interested in why you recco still using the datagrid for manual walking
through. Does it somehow have advantages over the gridview?

I'm thinking of basing some new components using this functionality and if I
base them on the DataGrid I would hate to see support dropped for it in the
reasonable future.
--
Regards,
Gary Blakely
"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:Dx**************@TK2MSFTNGXA01.phx.gbl...
Hi Gary,

Thank you for your post.

To understand why we introduce the new GridView control while DataGrid is
doing pretty good, we need to address two points:
1) While DataGrid is one of the most powerful controls in ASP.NET 1.x, it
requires too much work for mundane tasks such as sorting, paging, sorting,
and deleting data.
2) ASP.NET 2.0 enhances the data-binding architecture, introducing a new
family of components--the data source objects, which act as a bridge
between data-bound controls and ADO.NET objects. The familiar DataGrid
control is still supported, but it doesn't take full advantage of the
specific capabilities of data source components.

You can find more information at here:

#GridView: Move Over DataGrid, There's a New Grid in Town!
http://msdn.microsoft.com/msdnmag/is...4/08/GridView/

In my opinion, if your purpose is to manually load and retrieve data from
cells and controls inside the cells, I would recommend you still use the
DataGrid control, it's still supported in ASP.NET 2.0. If you want to try
the new and powerful data-binding feature of data source objects (such as
SqlDataSource, ObjectDataSource), I would recommend you use the GridView
control.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 25 '06 #6
Hi Gary,

I'm sorry if I've misled you in my last post. I recommended you still use
the DataGrid for the manually loading data into cell because you've said
that you're already familiar with it, :)

Of course I will recommend you use GridView if you're writing new project,
especially using features such as sorting, paging, etc.

Have a nice day!
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 25 '06 #7

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

Similar topics

3
by: Seagull Ng | last post by:
Hello all, I am doing my web-based reporting tool in ASP.Net 2.0 using Visual Web Developer 2005. I try to export my populated gridview to Excel spreadsheet but what I got is just a blank...
1
by: euan | last post by:
HI Guys, I have bee using conditional formatting in the datagrid recently and I am moving over to framework 2.0 and noticed the datagrid has been replaced by the gridview. So, I would like to do...
0
by: kieran | last post by:
Hi, I was using the datagrid and am now starting to use the gridview in asp.net 2.0. I used to use the first below sub for when i would mouseover a row - this highlighted the row but did not...
7
by: GaryDean | last post by:
I'm trying to load a GridView up with data manually, in code. I'm not using any datasource. Using this code.... ArrayList myRowArrayList; GridViewRow myGVR = new...
2
by: Chris Davoli | last post by:
How do you enable a check box in the GridView. I selected Checkbox Field in the Columns of the GridView, and the check box shows up in the Grid view, but it is disabled. How do I enable it so I can...
1
by: rn5a | last post by:
I was using a DataView to bind records from a DB table to a DataGrid using the following code: Dim sqlDapter As SqlDataAdapter Dim dSet As DataSet Dim dView As DataView sqlDapter = New...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work...
2
by: Blasting Cap | last post by:
I've got a gridview (that I converted over from a datagrid, which had been working properly), that is doubling up the number of rows returned. When it was running as a datagrid, the same code sent...
5
by: brian | last post by:
I have a gridview that will contain 5000 + rows that is initially loaded into a dataset and bound to a gridview. On the form I have textboxes and dropdown list's I use to let the user fill in and...
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:
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?
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
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,...

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.