Solved

Very Urgent - MSFlexiGrid

Posted on 1999-01-18
2
151 Views
Last Modified: 2010-05-03
I am using an MSFlexiGrid in my application.

I have the following problem with it and i am not in the position to purchase or use a different grid.

I am using the grid as a booking system viewer so that the user can see which rooms are booked and for what periods i.e AM, PM, FD (full day). The problem is that the user needs to be able to click on the booking and be able to view the appropriate booking record. Since i can only store the period in each cell it makes it difficult to find their record e.g. find all recs where period = AM (this would find many records). I have found a rowdata and coldata property but this only allows me to assign a booking code to a group of cells and not a single cell. If i could also assign the booking code to each single cell i could then simply search for the record using the booking code.

Does anybody know a way around this or any information on the subject?

Thanks in advance.
0
Comment
Question by:BobX
2 Comments
 
LVL 2

Accepted Solution

by:
dabellei earned 100 total points
ID: 1469150
msflexgrid1.row=0
msflexgrid1.col=0

text$ = msflexgrid1.text

This will give you the content of this particular cell.

to assign you do the reverse
msflexgrid1.text = text$


that's it..
0
 
LVL 18

Expert Comment

by:mdougan
ID: 1469151
If one row = one booking code then:

It sounds like you want to store the record key in the grid, but do not want the user to necessarily see the key?  What I do is to put the key in either the first (fixed) column (column 0) or I put it in the last column (MyGrid.Cols - 1).  If I put the key in the last column, then I usually set that column's width to zero so that the user will not see it.  Then, whenever your user clicks on a row, you can get the key using:

Dim sKey as string

    sKey = MyGrid.TextMatrix(MyGrid.Row, (MyGrid.Cols - 1))
or
    sKey = MyGrid.TextMatrix(MyGrid.Row, 0)

if you put the key in the first column.

Else if one Cell = one booking code, then one thought is that you could actually double up the number of columns in your grid, and make every even column number's width = 0.  In this cell, you could store your booking code for the cell to it's left.  Awkward, but it would work.

MD
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question