FlexGrid Usage in .Net Program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fripper

    #1

    FlexGrid Usage in .Net Program

    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



  • Cor Ligthert [MVP]

    #2
    Re: FlexGrid Usage in .Net Program

    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


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: FlexGrid Usage in .Net Program

      "fripper" <young@indiana. edu> schrieb:[color=blue]
      >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?[/color]

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

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • fripper

        #4
        Re: FlexGrid Usage in .Net Program


        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("Ent ry", GetType(Integer )))

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

        DS.Tables.Add(D T)

        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.SetDataBindi ng(DS,"DataTabl e 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 GridColumnStyle s 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.


        Comment

        • Cor Ligthert [MVP]

          #5
          Re: FlexGrid Usage in .Net Program

          Fripper,

          That was my first thought, have a look at our website and than the datagrid
          part. Take some simple samples form that, than you see how extemeley simple
          it is to use.



          I hope this helps,

          Cor


          Comment

          Working...