Re: MSHFlexgrid displayed value

From: Bob (anonymous_at_discussions.microsoft.com.invalid)
Date: 07/17/04

  • Next message: Bob: "Duplicating FlexGrid controls"
    Date: Fri, 16 Jul 2004 22:42:07 -0700
    
    

    Thanks Don. I was hoping to avoid this because then I would have duplicate
    data, one for my array, and one for the grid, which means using double the
    memory for nothing. I guess that is the way, and I have to stick to it.
    Thanks;

    Bob
    "Don Hanfland" <fakemail@no.spam> wrote in message
    news:O1lhdf3aEHA.3352@TK2MSFTNGP10.phx.gbl...
    > Hi Bob,
    >
    > Whatever formatting you apply to a column when loading the grid will be
    > that way, however when you are loading you flexgrid you can create a 2d
    > array and put the original value in the array by using the cordinates of
    the
    > grid(col,row) recall the original value from your array instead.
    >
    > Hope this help!
    > Don Hanfland [MVP - VB]
    >
    >
    > "Bob" <anonymous@discussions.microsoft.com.invalid> wrote in message
    > news:eVjZFj2aEHA.644@tk2msftngp13.phx.gbl...
    > > Hello all:
    > >
    > >
    > >
    > > I have an MSHFLEXGRID control in VB 6.0, and I am trying to implement a
    > > best-fit format for each cell. Therefore, depending on the cell
    content,
    > I
    > > have a routine, which returns the format string for me. However, I have
    a
    > > problem. The grid holds the contents of my values, meaning, I do not
    have
    > > an extra array holding the values. I want to be able, to read the value
    > of
    > > the cell using the TEXT or TEXTMATRIX properties, and then using my
    > routine,
    > > get the format string, and display the value to the user. Please note
    > that
    > > by doing displaying the value, I do not wish to use the TEXT or
    TEXTMATRIX
    > > because I may loose accuracy. For example, the inputted value may be
    > > 1234.123456789, and the format string may be "#,##0.000". So I want the
    > > grid to display 1,234.123, but if I access the grid value by the text or
    > > textmatrix to return the original number 1234.123456789.
    > >
    > >
    > >
    > > Does anyone know either through VB, or API, how to set and read the
    > display
    > > value of the grid without affecting its stored internal value?
    > >
    > >
    > >
    > > I appreciate your help very much.
    > >
    > >
    > >
    > > Bob
    > >
    > >
    > >
    > > PS. I have looked at the grid control from componentone, and that
    control
    > > has the same problem. It does not allow me to set the format for each
    > cell,
    > > it only lets me set it for the entire column.
    > >
    > >
    >
    >


  • Next message: Bob: "Duplicating FlexGrid controls"

    Relevant Pages

    • Re: Virtual grid
      ... just ditch the array & load the data directly to the grid. ... Populating the grid from a file will be somewhat slower than from an array (memory), ... > want to display it in a flexgrid control. ...
      (microsoft.public.vb.controls)
    • Re: Virtual grid
      ... do not display all the digits after the decimal point. ... Besides, if I have numbers of type double, each element of the array only ... to the grid. ...
      (microsoft.public.vb.controls)
    • Re: How do I use a parameter/variable/string literal as an identifier?
      ... Not an actual grid, just a bunch of text boxes ... corresponding member of a boolean array (there is one array for each ... but I would rather learn a new language ...
      (comp.lang.pascal.delphi.misc)
    • bind array to Infragistics Datagrid
      ... I am trying to bind an array to an Infragistics grid. ... to the array with no problem, but I cannot seem to get the columns to display ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Leere Spalten im Datagrid
      ... wenn ich die BaseCollection erbe das 2 dimensionale Array ... Thorsten Blawatt ... > Thorsten Blawatt wrote: ... die Spalten im Grid verschwinden. ...
      (microsoft.public.de.german.entwickler.dotnet.vb)