|
-
Jun 27th, 2000, 02:59 PM
#1
Thread Starter
Hyperactive Member
How Do I Clear MSFlexGrid?
I am updating an older program that used the Grid control. I am using the MSFlexGrid that ships with VB6 to replace it since it is for the most part code compatable with the old grid and can be used as a drop in replacement for the most part. However, I have to comment out the original code below in order to get the program to work. If I do this, all the cells are loaded but some of the cells do not show the data properly (looks almost a formating problem or as if some of the cells are being padded with spaces.) It looked fine with the original grid and if viewing in Access. It looks as if the code below is supposed to clear all the cells in the Grid with exception of the top row which serves as the header with the column names.
Can anyone tell me how to imulate this?
' Clear text from the nonfixed cells
grdSermons.SelStartCol = 0
grdSermons.SelStartRow = 1
grdSermons.SelEndCol = grdSermons.Cols - 1
grdSermons.SelEndRow = grdSermons.Rows - 1
grdSermons.FillStyle = 1
grdSermons.Text = ""
grdSermons.FillStyle = 0
grdSermons.SelEndCol = 0
grdSermons.SelEndRow = 1
Also, I have two somewhat related questions. At least they have to do with the MSFlexGrid. 1) How can I sort by clicking on the header of a column and 2) Is it possible to show different background colors on the MSFlexGrid so that it would look something like greenbar paper, with odd rows white and even rows a light green.
Any help in this area would be most appreciated.
Rev. Michael L. Burns
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|