473,327 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

MSflexgrid question

I need to clear the grid between updates without clearing the header row.
What is the speediest way to do this?
Thanks for your time.

--
Dink - There are 10 kinds of people in the world... those that know binary
and those that don't.
Jul 17 '05 #1
6 7386
> I need to clear the grid between updates without clearing
the header row. What is the speediest way to do this?


What about a subroutine along these lines?

Sub ClearAllExceptHeaderRow()
Dim CurrentRow As Long
Dim CurrentCol As Long
Dim CurrentRepeatStyle As Long
With MSFlexGrid1
CurrentRow = .Row
CurrentCol = .Col
CurrentRepeatStyle = .FillStyle
.FillStyle = flexFillRepeat
.Row = 1
.Col = 0
.RowSel = .Rows - 1
.ColSel = .Cols - 1
.Text = ""
.Row = CurrentRow
.Col = CurrentCol
.FillStyle = CurrentRepeatStyle
.SetFocus
End With
End Sub

Rick - MVP
Jul 17 '05 #2
If you need to refill the grid with the Grid1.AddItem method, just set the
grid1.rows = 1

greets John

"rv daffin" <di**@daffin.net> schreef in bericht
news:gN*****************@newsread1.news.pas.earthl ink.net...
I need to clear the grid between updates without clearing the header row.
What is the speediest way to do this?
Thanks for your time.

--
Dink - There are 10 kinds of people in the world... those that know binary and those that don't.

Jul 17 '05 #3
Rick - thanks this clears the text fine, however I have 2 cols that also
include a picture. What method will clear the pics as well.
thanks once again.

--
Dink - There are 10 kinds of people in the world... those that know binary
and those that don't.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:3p********************@comcast.com...
I need to clear the grid between updates without clearing
the header row. What is the speediest way to do this?


What about a subroutine along these lines?

Sub ClearAllExceptHeaderRow()
Dim CurrentRow As Long
Dim CurrentCol As Long
Dim CurrentRepeatStyle As Long
With MSFlexGrid1
CurrentRow = .Row
CurrentCol = .Col
CurrentRepeatStyle = .FillStyle
.FillStyle = flexFillRepeat
.Row = 1
.Col = 0
.RowSel = .Rows - 1
.ColSel = .Cols - 1
.Text = ""
.Row = CurrentRow
.Col = CurrentCol
.FillStyle = CurrentRepeatStyle
.SetFocus
End With
End Sub

Rick - MVP

Jul 17 '05 #4
Interesting question... I don't use the MSFlexGrid myself, so I don't
know off the top of my head. How did you put the pictures into the
cells?

Rick - MVP
"rv daffin" <di**@daffin.net> wrote in message
news:DD******************@newsread1.news.pas.earth link.net...
Rick - thanks this clears the text fine, however I have 2 cols that also include a picture. What method will clear the pics as well.
thanks once again.

--
Dink - There are 10 kinds of people in the world... those that know binary and those that don't.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:3p********************@comcast.com...
I need to clear the grid between updates without clearing
the header row. What is the speediest way to do this?


What about a subroutine along these lines?

Sub ClearAllExceptHeaderRow()
Dim CurrentRow As Long
Dim CurrentCol As Long
Dim CurrentRepeatStyle As Long
With MSFlexGrid1
CurrentRow = .Row
CurrentCol = .Col
CurrentRepeatStyle = .FillStyle
.FillStyle = flexFillRepeat
.Row = 1
.Col = 0
.RowSel = .Rows - 1
.ColSel = .Cols - 1
.Text = ""
.Row = CurrentRow
.Col = CurrentCol
.FillStyle = CurrentRepeatStyle
.SetFocus
End With
End Sub

Rick - MVP



Jul 17 '05 #5
I used "set grid1.cellpicture = img1.picture
I've found the fastest way to clear the grid totally is by using -
grid1.clear and then re-doing the header routine.
thanks again
--
Dink - There are 10 kinds of people in the world... those that know binary
and those that don't.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:1K********************@comcast.com...
Interesting question... I don't use the MSFlexGrid myself, so I don't
know off the top of my head. How did you put the pictures into the
cells?

Rick - MVP
"rv daffin" <di**@daffin.net> wrote in message
news:DD******************@newsread1.news.pas.earth link.net...
Rick - thanks this clears the text fine, however I have 2 cols that

also
include a picture. What method will clear the pics as well.
thanks once again.

--
Dink - There are 10 kinds of people in the world... those that know

binary
and those that don't.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:3p********************@comcast.com...
> I need to clear the grid between updates without clearing
> the header row. What is the speediest way to do this?

What about a subroutine along these lines?

Sub ClearAllExceptHeaderRow()
Dim CurrentRow As Long
Dim CurrentCol As Long
Dim CurrentRepeatStyle As Long
With MSFlexGrid1
CurrentRow = .Row
CurrentCol = .Col
CurrentRepeatStyle = .FillStyle
.FillStyle = flexFillRepeat
.Row = 1
.Col = 0
.RowSel = .Rows - 1
.ColSel = .Cols - 1
.Text = ""
.Row = CurrentRow
.Col = CurrentCol
.FillStyle = CurrentRepeatStyle
.SetFocus
End With
End Sub

Rick - MVP


Jul 17 '05 #6
set grid1.cellpicture = nothing

greets John

"rv daffin" <di**@daffin.net> schreef in bericht
news:yj*****************@newsread3.news.pas.earthl ink.net...
I used "set grid1.cellpicture = img1.picture
I've found the fastest way to clear the grid totally is by using -
grid1.clear and then re-doing the header routine.
thanks again
--
Dink - There are 10 kinds of people in the world... those that know binary and those that don't.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:1K********************@comcast.com...
Interesting question... I don't use the MSFlexGrid myself, so I don't
know off the top of my head. How did you put the pictures into the
cells?

Rick - MVP
"rv daffin" <di**@daffin.net> wrote in message
news:DD******************@newsread1.news.pas.earth link.net...
Rick - thanks this clears the text fine, however I have 2 cols that

also
include a picture. What method will clear the pics as well.
thanks once again.

--
Dink - There are 10 kinds of people in the world... those that know

binary
and those that don't.
"Rick Rothstein" <ri************@NOSPAMcomcast.net> wrote in message
news:3p********************@comcast.com...
> > I need to clear the grid between updates without clearing
> > the header row. What is the speediest way to do this?
>
> What about a subroutine along these lines?
>
> Sub ClearAllExceptHeaderRow()
> Dim CurrentRow As Long
> Dim CurrentCol As Long
> Dim CurrentRepeatStyle As Long
> With MSFlexGrid1
> CurrentRow = .Row
> CurrentCol = .Col
> CurrentRepeatStyle = .FillStyle
> .FillStyle = flexFillRepeat
> .Row = 1
> .Col = 0
> .RowSel = .Rows - 1
> .ColSel = .Cols - 1
> .Text = ""
> .Row = CurrentRow
> .Col = CurrentCol
> .FillStyle = CurrentRepeatStyle
> .SetFocus
> End With
> End Sub
>
> Rick - MVP


Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ed | last post by:
Hi, I am using an MSflexgrid in my c# code. I have a strange problem. My MSflexgrid has only 1 column. Now the data in that column can be long. WIth just 1 column the MSflexgrid does not show...
1
by: PVS | last post by:
Hi, I am new to VC++ 7.0. I want to use MSFlexGrid in my dialog based MFC project in VC++ 7.0 (in VS ..NET IDE). I added the MSFlexGrid control into my resource editor toolbox and I dragged and...
1
by: David Sawyer | last post by:
I am attempting to capture data from the serial port, place that data into a MSFlexGrid and then use that data to parse out Lat/Lon to plot to a map. The problem I am having is when I attempt to...
0
by: Martin K | last post by:
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder API problem, I was able to put together a public class that runs great! But I have another migration headache regarding the...
1
by: Mad Scientist Jr | last post by:
can someone explain how to simply populate a grid in .net ? the way i understand it, there is no more msflexgrid, and instead is this new control that has to be tied to a dataset, and it is a real...
1
by: zoneal | last post by:
Hi, I am involved in the process of migrating vb(6.0) application to vb.net. My application contains only vb controls namely MSFLEXGRID. I want to migrate my application to vb.net completely...
1
by: Steven | last post by:
I develop the application which contains MSFlexGrid to display data. When I try to fill the grid with the text data, I want to adjust the column width so that the width is adjusted to the maximum...
5
by: Ishmael | last post by:
Hi Is Been a 3 Yrs Now (I Still trying to do this) Please help me to do this with Visual Basic 6.0 using Msflexgrid Let say you are the Principal . You have 10 educators and 5 class (Grades)...
2
by: JuAn2226 | last post by:
hi,I got few question here. Hope some one can me. plz help me i running out of time 1. how to make my msflexgrid to display data for every 5 min(especially the number car and average speed. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.