Results 1 to 8 of 8

Thread: Flex Grid equivalent in .NET

  1. #1

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Post Flex Grid equivalent in .NET

    Hi Folks,

    We are using the Mh3DList control in our VB 6 application. Becubed hasn't come up with a .NET version so far. I need to replace this control and I was thinking of putting in a MSFLexGrid. What is the nearest equivalent for this control in Vb .NET?

    Cheers,
    Abhijit
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: Flex Grid equivalent in .NET

    I think the closest native control you'll get is the DataGrid.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Arrow Re: Flex Grid equivalent in .NET

    How do I add items to a datagrid? Datagrid appears to be a databound control. I need something where the data can be loaded from the code instead of the database.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: Flex Grid equivalent in .NET

    I've never actually had the need to use it myself, but if its databound, then you should be able to bind to just about anything that supports IEnumerable. An ArrayList for instance.

    Like I said, I've never used the WinForms Datagrid, so I don't really know how it works.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: Flex Grid equivalent in .NET

    Quote Originally Posted by abhijit
    How do I add items to a datagrid? Datagrid appears to be a databound control. I need something where the data can be loaded from the code instead of the database.
    This sample code creates a sample datatable with 3 collumns and 3 datarows...

    Code:
        Private m_DataTable As New DataTable("MyTableName")
    
        Private Sub AddRow(ByVal sCol0 As String, ByVal sCol1 As String, ByVal sCol2 As String)
    
            Dim NewRow As System.Data.DataRow = m_DataTable.NewRow()
    
            NewRow(0) = sCol0
            NewRow(1) = sCol1
            NewRow(2) = sCol2
    
            m_DataTable.Rows.Add(NewRow)
        End Sub
    
        Private Sub InitData()
    
            'Set up the DataTable
            m_DataTable = New DataTable("TableName")
    
            m_DataTable.Columns.Add(New System.Data.DataColumn("Column0"))
            m_DataTable.Columns.Add(New System.Data.DataColumn("Column1"))
            m_DataTable.Columns.Add(New System.Data.DataColumn("Column2"))
    
            'Set up the datagrid control
            DataGrid1.DataSource = m_DataTable
        End Sub
    
        Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
            InitData()
            AddRow("1", "2", "3")
            AddRow("4", "9", "12")
            AddRow("77", "192", "0")
            Me.DataGrid1.DataSource = m_DataTable
    
        End Sub
    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Flex Grid equivalent in .NET

    ComponentOne has a FlexGrid.NET and Infragistics has an UltraWinGrid control. Both are pretty good and very flexible.

    Although if you're not willing to shell out the money for it, the datagrid in .NET is a major improvement over the VB6 datagrid/flexgrid.

  7. #7

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Flex Grid equivalent in .NET

    Shelling out money is the client's prerogative. I can't do much in that aspect.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  8. #8
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604

    Re: Flex Grid equivalent in .NET

    Hey Mendhak,
    Keep bumping into you on the .NET forum.

    This is the second thread I've seen where you were talking about a flexgrid.net.

    It sounds like you've gotten used to the datagrid now. Is it the way to go? I would never bind a control if I had an alternative.
    Anyway, i usually don't use the grid for database stuff. But I am pretty comfortable with MSFlexgrid.
    Still, if you think it's better, do you mean for database work?
    I just started working on .NET today. and after taking in a mountain of new info, I'm hesitant to make any fast choices now.
    With flexgrid, I am usually feeding an array, or sets of arrays into rows and columns on the grid that I can reference by r,c according to their array group and index number.
    But what I've read in .NET help is that the data will have to be in a datatable, and bound to the datagrid anyway.
    Have you used the datagrid in this fashion? If so, do you still think it is better than MSFlexgrid? I've been reading more flexible, but so far it seems less flexible.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

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