FlexGrid Usage in .Net Program

F

fripper

I have replaced an older machine with a new one and have moved a VB .Net
program that I worte on the old machine to the new one. The program uses a
FlexGrid control for displaying some stuff in a tabular manner. After
transferring the program to the new machine it doesn't run because it cannot
find some references; specifically AxMSComCtl2, AxMSFlexGridLib, MSComCtl2
and MSFlexGridLib. These do not appear in the Projects > Add References
(.Net or COM tabs). Now in an earlier post to this group when I mentioned
this problem the response I got was (essentially) to use the DataGrid
control instead of the (VB 6) FlexGrid control. I am under a time crunch
and do not have time to learn the DataGrid control and would l;ike to
continue using the FlexGrid version of my program oin the new machine ... to
buy time so I can then learn the DataGrid control. Can someone tell me how I
can get hold of these controls/libraries so that I can run the program? Is
there some place where I can download them?

Thanks
 
C

Cor Ligthert [MVP]

Fripper,

Be aware that you are consuming every time more time to by trying to use the
FlexFrid etc. and getting problem after proglem. The advices you got as you
wrote where not for nothing.

You are not the first one so most don't know anymore the problem, like me.
They switched to the datagrid.

Just my thought,

Cor
 
H

Herfried K. Wagner [MVP]

fripper said:
I have replaced an older machine with a new one and have moved a VB .Net
program that I worte on the old machine to the new one. The program uses a
FlexGrid control for displaying some stuff in a tabular manner. After
transferring the program to the new machine it doesn't run because it
cannot find some references; specifically AxMSComCtl2, AxMSFlexGridLib,
MSComCtl2 and MSFlexGridLib. These do not appear in the Projects > Add
References (.Net or COM tabs).
[...]
Can someone tell me how I can get hold of these controls/libraries so that
I can run the program? Is there some place where I can download them?

You could install VB6 to get the components onto your machine.
 
F

fripper

OK ... I got your message ... forget about using the VB 6 FlexGrid control
in .Net! I have spent the past couple of hours trying to get a handle on
the DataGrid control ... every now and then I see some stuff that makes me
think the DataGrid control is indeed better than the FlecGrid control but,
boy, getting my arms around this control is not easy. have set up a dataset
(DS), a datatable (DT) and a datagrid (DG) ... then I setup the (7) columns
in the datatable; eg.

DT.Add(New DataColumn("Entry", GetType(Integer)))

Then I add DT to the dataset ... i.e.

DS.Tables.Add(DT)

Then I put values into a datarow (DR); eg.

DR(0) = CStr(intTotal)

and add the row to the table:

DT.Rows.Add(DR)

Finally, I bind the datatable (DT) to the datagrid (DG):

DG.SetDataBinding(DS,"DataTable Name")

Whew! At last I have the datagrid established and populated ... and, by
gosh, it displays pretty well on my form. Two things I cannot figure out
how to do: (1) As I am adding rows there are certain criteria I use to
determine the color I want to use to display the row ... I cannot figure out
how to do this. (2) I don't want all of the columns of the grid to be the
same width. I found somehting called TableStyles that looks promising and
set up the column widths I want in the GridColumnStyles collection within
the TableStyles collection but I don't understand how to make them
effective.

I think that the DataGrid is an extremely flexible and useful control but it
so blasted complicated I fear I won't ever really unbderstand it.

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top