SolarCoasters
01-24-2004, 03:44 PM
I added the msflexgrid control to the project but the code that i used to use with it in v6.0 doesn't seem to work and i can't figure out how to place text at a certain cell. I also don't know how to use the datagrid control, Is there a tutorial somewhere that tells how to use the datagrid and msflexgrid controls in VB.NET?
Thank you
VBJoe
01-24-2004, 10:12 PM
Drop the control that you need help with on your Form, then select it and hit F1 to bring up the Visual Studio .NET help. I've found it to be very easy to use and comprehensive, with a ton of code samples.
SolarCoasters
01-24-2004, 11:21 PM
I figured out how to add text but now i can't find any property to set the width of each column. I tried cellwidth but it says thats a readonly property. What can I use to set the width of each column for the MSFlexGrid control?
VBJoe
01-24-2004, 11:39 PM
I haven't used the MSFlexGrid that comes with .NET, and in fact I don't even have it in my ToolBox. The DataGrid exposes a PreferredColumnWidth property, but that appears to apply to all columns. Instead, you need to add a custom Table Style object. Here's something I whipped up (I can't guarantee that it will work, but you should be able to get a starting point):
Dim t As New System.Windows.Forms.DataGridTableStyle
t.GridColumnStyles(0).Width = 25
dGrid.TableStyles.Add(t)
reboot
01-25-2004, 07:05 AM
There is no MSFlexGrid for .NET
SolarCoasters
01-25-2004, 06:00 PM
I know there is no MSFlexGrid for .NET but I used the 6.0 version. Since the msflexgrid control doesn't seem to work what can I use in place of it so i can display data in 4 different columns?