Re: MSHFlexgrid displayed value

From: Don Hanfland (fakemail_at_no.spam)
Date: 07/16/04


Date: Fri, 16 Jul 2004 17:00:13 -0400

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.
>
>



Relevant Pages

  • Re: Displaying a tooltip in a datagrid cell - can it be done?
    ... >datagrid cell. ... I basically want to display the first 50 characters in the grid cell ... >tooltip with the string value for only that cell. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: what method to use to get "space after" a table
    ... Yes Brian Table Grid uses Table Normal Style that is a default system style- ... any new tables you create will follow the format you set with that. ... the exact same table layout (borders being one of them)- tables can be very ... It looks the contents of each individual table cell also get to be ...
    (microsoft.public.word.newusers)
  • RE: Formatting a Column in a Datagrid
    ... I have a datagrid which is filled from a SQL stored procedure. ... Currently a value is displayed in the grid as '10.0000'. ... I format this column to display only 2 decimal places ie '10.00' ...
    (microsoft.public.vsnet.general)
  • Re: Line position
    ... Using Format | AutoShape ... > I have to reproduce a series of line with a precise thickness and spacing. ... These lines tend to snap to a particular invisible grid. ... > Since all my paragraphs are formatted the same I had hope the lines would ...
    (microsoft.public.word.drawing.graphics)
  • Formatting a Column in a Datagrid
    ... trying to format the grid and have managed to sort the column headers out and ... Currently a value is displayed in the grid as '10.0000'. ... I format this column to display only 2 decimal places ie '10.00' ...
    (microsoft.public.vsnet.general)