Results 1 to 14 of 14

Thread: [RESOLVED] DataGrid

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Resolved [RESOLVED] DataGrid

    I want to ask that is there any DataGrid control in C#. System.Windows.Forms.DataGrid????????????
    If yes,then where it is in the toolbox??? I have .Net Framework 2.0 installed. Is this control available in this Framework????????

    hey first of all tell me that .net Framework 2.0 means VS 2005 na??????

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: DataGrid

    Yes it's called the GridView control and 2.0 is VS 2005 and later versions can also target that framework

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: DataGrid

    Hey,

    It goes something like this:

    Visual Studio 2003 - .Net Framework 1.1
    Visual Studio 2005 - .Net Framework 2.0
    Visual Studio 2008 - .Net Framework 3.5, 3.0, 2.0
    Visual Studio 2010 - .Net Framework 4.0, 3.5, 3.0, 2.0

    And you might want to take a look at the following:

    http://msdn.microsoft.com/en-us/libr...yb(VS.80).aspx

    Hope that helps!!

    Gary

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Re: DataGrid

    hi brin351.Datagrid or GridView Control is not same. I m attaching the project see in this project dataGrid is used & DataGrid Properties is quite different from GridView Properties.
    Attached Files Attached Files

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: DataGrid

    Hey,

    A DataGrid is a Windows Forms Control, so the equivalent for an ASP.Net Application, in this case a GridView is not going to have exactly the same functionality, this they are two very different environments.

    What functionality are you looking for in particular?

    Gary

  6. #6

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Re: DataGrid

    hey i m developing a project in C#. I am not able to find DataGridControl in Windows Application. Can you tell me where it is in the toolbox
    Attached Images Attached Images  

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: DataGrid

    Hey,

    Ok, so now you have done a complete 360...

    Can you confirm exactly what you are developing? You have posted in the ASP.Net forum, but I suspect you are creating a Windows Form application.

    Gary

  8. #8

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Re: DataGrid

    Gep, I m creating windows Application. I thought DataGrid is part of web application.Because there is no such control in toolbox in windows application that is having these properties.

  9. #9
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: DataGrid

    Hey,

    Nope, DataGrid is very much part of the Windows World. You can see this from your screen shot,

    System.Windows.Forms.DataGrid

    When you say this:

    there is no such control in toolbox in windows application that is having these properties.
    What are you referring to? What properties do you mean?

    The DataGrid is still in the .Net Framework, but it's functionality has really been replaced by the DataGridView, which you should see in your toolbox.

    See here for more information:

    http://msdn.microsoft.com/en-us/libr....datagrid.aspx

    Gary

  10. #10

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Re: DataGrid

    Control means having the properties, see Post 6 (fig.). Can you please post the screenshot.where it is in the toolbox.

  11. #11
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: DataGrid

    Hey,

    See screen shots:

    Windows Application:

    Name:  VBWindowsApplication.png
Views: 181
Size:  11.3 KB

    Web Application:

    Name:  VBWebApplication.png
Views: 171
Size:  9.6 KB

    As I mentioned before, you won't find the DataGrid in the ToolBox, as it has been replaced, but you can still instantiate one through code:

    Code:
            Dim dataGrid As New DataGrid
            dataGrid.Location = New Point(0, 0)
            dataGrid.Size = New Size(100, 100)
    
            Me.Controls.Add(dataGrid)
    Gary

  12. #12

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Re: DataGrid

    ok Gep13,thx got it.

  13. #13
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] DataGrid

    Hey,

    Glad to hear that you got it working.

    Out of curiosity, what did you end up doing?

    Gary

  14. #14

    Thread Starter
    Member
    Join Date
    Aug 2009
    Posts
    43

    Re: [RESOLVED] DataGrid

    I just develop PhoneBuk,in which i store the employee records are stored ,with employee name in the dataGrid.When i click on Datagrid column,we have the employee information shown.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width