Re: Row and Col property of MSHFlexGrid

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Ken,

I found that both grids have the same problem if I bind the grid with
an empty recordset by

Set grid.Datasource = oRs

When I reset the datasource to a recordset with records, I get the
problems.


Now I check for EOF and BOF like:

If oRs.EOF And oRs.BOF Then
MsgBox "EMPTY"
Set grid2.DataSource = Nothing
' Don't know how to make the grid empty, so no entries display on
screen.
Else
Set grid2.DataSource = oRs
grid2.ColAlignment = flexAlignRightCenter
End If

However, I don't know how to make the grid empty, so no entries display
on screen. Do you know how?

I try to search around the internet. Look like some people also have
problem when setting a grid to an empty recordset. There problems
different since they are not doing the same things. However, I can't
find a solution.

I saw something about the TopRow porperty. I tried by hardcoding the
grid2.TopRow = 30 where grid2 is now containing 30 rows....But it
doen't work. I also tried Refresh doesn't make any difference. I don't
how to use these properties or methods. I don't know how to make it
display no row except the heading.

Thanks,
Ella

.



Relevant Pages

  • Re: Row and Col property of MSHFlexGrid
    ... an empty recordset by ... ' Don't know how to make the grid empty, ... problem when setting a grid to an empty recordset. ... without a data bound control tying your ...
    (microsoft.public.vb.controls)
  • Re: Recordset.sort problem
    ... >I am using a recordset to populate a grid. ... all empty fields are displayed first. ... If recordset is read only, then you should construct you SQL statement ... Than, when you populate the grid, check content for that predetermined word ...
    (microsoft.public.vb.database.ado)
  • Re: Datagrid size ???
    ... You cannot create a lot of empty ... datagrid, however than you cannot dock it. ... > Then When no records in the grid, ... > Then when there is 2 recors in, I see the two rows + one empty row becasue ...
    (microsoft.public.dotnet.general)
  • Re: cant get dropdown list bound to data in template column of gri
    ... I need the grid to ... Should I just create an empty ... gridview. ... I was able to populate the dropdown box ok when it was outside of the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Either BOF or EOF is True - MDAC 2.8 - Delphi 6 SP3 - SQL2000 - Win XP
    ... It seems that I was referencing a bookmark that ofcourse no longer existed ... >with an empty recordset and try to CancelUpdates before and UpdateBatch. ...
    (borland.public.delphi.database.ado)