Solved

Very Urgent - MSFlexiGrid

Posted on 1999-01-18
2
155 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

820 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