Datagrid vs datagridview
-
I was using Visual studio 2003 to develop windows applications in c#. Now I have moved to Visual studio 2005. I wanted to use Datagrid in my application but the only thing I see is what is called datagridview. Are these two the same, if yea can I use the same code to populate a datagridview?:rolleyes:
phokojoe
-
I was using Visual studio 2003 to develop windows applications in c#. Now I have moved to Visual studio 2005. I wanted to use Datagrid in my application but the only thing I see is what is called datagridview. Are these two the same, if yea can I use the same code to populate a datagridview?:rolleyes:
phokojoe
phokojoe wrote:
Now I have moved to Visual studio 2005. I wanted to use Datagrid in my application but the only thing I see is what is called datagridview.
Yes because GridView has replaced Datagrid the GridView control is the successor to the DataGrid control. Yes try it out http://msdn2.microsoft.com/en-us/library/ms972948.aspx[^] http://gridviewguy.com/CategoryDetails.aspx?categoryID=7[^]
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
phokojoe wrote:
Now I have moved to Visual studio 2005. I wanted to use Datagrid in my application but the only thing I see is what is called datagridview.
Yes because GridView has replaced Datagrid the GridView control is the successor to the DataGrid control. Yes try it out http://msdn2.microsoft.com/en-us/library/ms972948.aspx[^] http://gridviewguy.com/CategoryDetails.aspx?categoryID=7[^]
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
They are not exactly the same. DataGridView replaced DataGrid in Dot net 2.0. Although DataGrid is still available for use. It is apparently not available through the IDE but you can still create a DataGrid in your code should you wish but you should considder using DataGridView instead. [Modify] You can add it to the IDE if you right-click on toolbox and select choose items.
-
I was using Visual studio 2003 to develop windows applications in c#. Now I have moved to Visual studio 2005. I wanted to use Datagrid in my application but the only thing I see is what is called datagridview. Are these two the same, if yea can I use the same code to populate a datagridview?:rolleyes:
phokojoe
DataGridView is the replacement for DataGrid, but they are not the same. The DataGridView doesn't support displaying data in a hierarchical manner. The code you used to populate the DataGrid should work just fine to populate the DataGridView.
----------------------------- In just two days, tomorrow will be yesterday.