|
-
Jan 17th, 2005, 07:17 AM
#1
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
-
Jan 17th, 2005, 07:27 AM
#2
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
-
Jan 17th, 2005, 07:33 AM
#3
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
-
Jan 17th, 2005, 07:40 AM
#4
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
-
Jan 17th, 2005, 10:41 AM
#5
Re: Flex Grid equivalent in .NET
 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."
-
Jan 17th, 2005, 10:44 AM
#6
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.
-
Jan 17th, 2005, 10:51 PM
#7
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
-
May 2nd, 2005, 09:39 AM
#8
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|