?
Solved

Clearing reverse color on a selected row in MSFlexgrid

Posted on 2006-03-30
4
Medium Priority
?
262 Views
Last Modified: 2010-04-07
I cannot find a method for clearing the reverse colorization in a msflexgrid on a row that has been selected whenever I want to clear the grid.  I display information in the grid, click the desired row and transfer the information on the row to text boxes for editing.  When completed and the information is saved, I want to use the MSFLEXGRID.CLEAR statement.  This works fine but the last selected row continues to be displayed with the reversed color.  I want the entire row, not just a cell, set back to VBWHITE.

Any ideas?
0
Comment
Question by:jgarner43
4 Comments
 
LVL 2

Expert Comment

by:ExtremeFitness
ID: 16336508
Clear the selection first?
0
 

Author Comment

by:jgarner43
ID: 16336536
How!  I have not seen any methd for clearing a row or setting all cells in a row.
0
 
LVL 9

Expert Comment

by:pradapkumar
ID: 16340215
if u want to set or reset a content in a cell then u can use the following snippet.

To Reset the cells in a Row

For i = 0 to MSFlexGrid1.Cols - 1
    MSFlexGrid1.TextMatrix(.Row,i) = ""
Next i

To Set the cells in a Row

MSFlexGrid1.TextMatrix(.Row,0) = TextBox1.Text
MSFlexGrid1.TextMatrix(.Row,1 = TextBox2Text
and so on....
0
 
LVL 1

Accepted Solution

by:
lalitgada earned 2000 total points
ID: 16340253
When You use the MSFLEXGRID.CLEAR statement the backcolor of the cell automatically sets to the default cell backcolor but if it doesn't works for you, try out the following Code


Private Sub Command1_Click()
Dim totalRows
totalRows = MSFlexGrid1.Rows
    For j = 1 To totalRows
        For i = 1 To MSFlexGrid1.Cols - 1
            MSFlexGrid1.Col = i
            MSFlexGrid1.CellBackColor = vbWhite
        Next
    Next
End Sub

Thanks
Lalit

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

840 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